-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add vmaf --cuda option #178
base: main
Are you sure you want to change the base?
Conversation
"[0:v]scale_cuda=format={pix_fmt},scale_cuda={w}:{h},setpts=PTS-STARTPTS[dis];\ | ||
[1:v]scale_cuda=format={pix_fmt},scale_cuda={w}:{h},{ref_vf},setpts=PTS-STARTPTS[ref];[dis][ref]" | ||
) | ||
} else { | ||
format!( | ||
"[0:v]scale_cuda=format={pix_fmt},setpts=PTS-STARTPTS[dis];\ | ||
[1:v]scale_cuda=format={pix_fmt},{ref_vf}setpts=PTS-STARTPTS[ref];[dis][ref]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct for cuda vmaf?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the vmaf documentation isnt a great help here... maybe this?
let prefix = if let Some((w, h)) = self.vf_scale(model.unwrap_or_default(), distorted_res) {
format!(
"[0:v]scale_cuda=format={pix_fmt},scale={w}:{h},setpts=PTS-STARTPTS[dis];
[1:v]scale_cuda=format={pix_fmt},scale={w}:{h},{ref_vf}setpts=PTS-STARTPTS[ref];[dis][ref]"
)
} else {
format!(
"[0:v]scale_cuda=format={pix_fmt},setpts=PTS-STARTPTS[dis];
[1:v]scale_cuda=format={pix_fmt},{ref_vf}setpts=PTS-STARTPTS[ref];[dis][ref]"
)
};
So I had a chance to test this version and was able to confirm that some things works and some don't. What worksRunning For example, av1 => av1, x264 => x264, x265 => x265. What doesn't workWhenever the reference and distorted content doesn't use the same codec. For example, x264 => av1, x265 => av1, x264 => x265 How to reproduceI can reproduce this using the "Big Buck Bunny" test video:
The command will fail with the following output: Details
DEBUG: Using ffmpeg -filter_complex [0:v]scale_cuda=format=yuv420p10le,setpts=PTS-STARTPTS[dis];[1:v]scale_cuda=format=yuv420p10le,setpts=PTS-STARTPTS[ref];[dis][ref]libvmaf_cuda=
|
Add support for CUDA accelerated vmaf. See #163.
Run vmaf command with arg
--cuda
to enable.This is experimental/incomplete. I can't test this properly myself as I lack nvidia hardware.