Skip to content
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

fix wrong ENTRYPOINT in Dockerfile.cuda #1377

Merged
merged 1 commit into from
Jul 9, 2024
Merged

fix wrong ENTRYPOINT in Dockerfile.cuda #1377

merged 1 commit into from
Jul 9, 2024

Conversation

guyoun
Copy link
Contributor

@guyoun guyoun commented Jul 8, 2024

Adjust the order and format of inputs to libvmaf_cuda according to https://ffmpeg.org/ffmpeg-filters.html#toc-libvmaf_005fcuda

The libvmaf_cuda filter allows only AV_FIX_FMT_CUDA but NV12(sw_format) is not supported.

https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/vf_libvmaf.c#L821C26-L821C41

So the current config raises [libvmaf @ 0x7f95d00050c0] Unsupported input format: nv12 like below.

Stream mapping:
  Stream #0:0 (h264) -> libvmaf_cuda
  Stream #1:0 (h264) -> libvmaf_cuda
  libvmaf_cuda:default -> Stream #0:0 (wrapped_avframe)
Press [q] to stop, [?] for help
[libvmaf @ 0x7f95d00050c0] Unsupported input format: nv12
[Parsed_libvmaf_cuda_0 @ 0x7f95d0004fc0] Failed to configure output pad on Parsed_libvmaf_cuda_0
[fc#0 @ 0x55b0b17da800] Error reinitializing filters!
[fc#0 @ 0x55b0b17da800] Task finished with error code: -22 (Invalid argument)
[fc#0 @ 0x55b0b17da800] Terminating thread with return code -22 (Invalid argument)
[vost#0:0/wrapped_avframe @ 0x55b0b181a8c0] Could not open encoder before EOF
[vost#0:0/wrapped_avframe @ 0x55b0b181a8c0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/wrapped_avframe @ 0x55b0b181a8c0] Terminating thread with return code -22 (Invalid argument)
[out#0/null @ 0x55b0b181be80] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A

Conversion failed!

Adjust the order and format of inputs to libvmaf_cuda  according to https://ffmpeg.org/ffmpeg-filters.html#toc-libvmaf_005fcuda


The libvmaf_cuda filter allows only AV_FIX_FMT_CUDA(sw NV12) (https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/vf_libvmaf.c#L821C26-L821C41). So the current code raises 'Unsupported input format: nv12' like below

```
Stream mapping:
  Stream #0:0 (h264) -> libvmaf_cuda
  Stream #1:0 (h264) -> libvmaf_cuda
  libvmaf_cuda:default -> Stream #0:0 (wrapped_avframe)
Press [q] to stop, [?] for help
[libvmaf @ 0x7f95d00050c0] Unsupported input format: nv12
[Parsed_libvmaf_cuda_0 @ 0x7f95d0004fc0] Failed to configure output pad on Parsed_libvmaf_cuda_0
[fc#0 @ 0x55b0b17da800] Error reinitializing filters!
[fc#0 @ 0x55b0b17da800] Task finished with error code: -22 (Invalid argument)
[fc#0 @ 0x55b0b17da800] Terminating thread with return code -22 (Invalid argument)
[vost#0:0/wrapped_avframe @ 0x55b0b181a8c0] Could not open encoder before EOF
[vost#0:0/wrapped_avframe @ 0x55b0b181a8c0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/wrapped_avframe @ 0x55b0b181a8c0] Terminating thread with return code -22 (Invalid argument)
[out#0/null @ 0x55b0b181be80] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A

Conversion failed!
```
@nilfm99
Copy link
Collaborator

nilfm99 commented Jul 8, 2024

Thanks @guyoun for the contribution.

FYI @kylophone and @gedoensmax, this looks correct to me based on documentation but can't verify it now.

@gedoensmax
Copy link
Contributor

For 420 video this is the correct command. 444 for example would work with the previous one already.

@nilfm99
Copy link
Collaborator

nilfm99 commented Jul 8, 2024

I think 420 video is more common, so it makes sense to have the Dockerfile be able to handle this.

@nilfm99 nilfm99 self-requested a review July 8, 2024 20:00
Copy link
Collaborator

@nilfm99 nilfm99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will wait a bit to merge in case there are other opinions

@nilfm99 nilfm99 merged commit ad9d53c into Netflix:master Jul 9, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants