VideoHelp Forum




+ Reply to Thread
Results 1 to 19 of 19
  1. i have a video file with H.265, and i want to transcode it into H.264 in a Nvidia T4 vm, here is my command
    Image
    [Attachment 72840 - Click to enlarge]

    ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i UPL_MmrXRhwoub.mp4 -c:v h264_nvenc output.mp4

    but i got a error like this:

    [hevc @ 0x5567877726c0] Skipping NAL unit 62
    [hevc @ 0x5567876e2c00] Skipping NAL unit 62
    [hevc @ 0x5567876f3040] Skipping NAL unit 62
    [h264_nvenc @ 0x5567869ba480] Provided device doesn't support required NVENC features
    Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    does anyone who know how to solve this problem?
    Quote Quote  
  2. Try
    ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i UPL_MmrXRhwoub.mp4 -c:v h264_nvenc -c:a copy -dn output.mp4
    Quote Quote  
  3. But NVEnc is not CUDA... NVidia suggest something like this https://developer.nvidia.com/blog/turing-h264-video-encoding-speed-and-quality/

    I will be not surprised if vm prevent to use NVEnc by ffmpeg.
    Quote Quote  
  4. Originally Posted by pandy View Post
    But NVEnc is not CUDA... NVidia suggest something like this https://developer.nvidia.com/blog/turing-h264-video-encoding-speed-and-quality/

    I will be not surprised if vm prevent to use NVEnc by ffmpeg.
    Read:
    https://trac.ffmpeg.org/wiki/HWAccelIntro
    Quote Quote  
  5. Originally Posted by ProWo View Post
    Try
    ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i UPL_MmrXRhwoub.mp4 -c:v h264_nvenc -c:a copy -dn output.mp4
    this command is same error, it doesn't work
    Quote Quote  
  6. Originally Posted by pandy View Post
    But NVEnc is not CUDA... NVidia suggest something like this https://developer.nvidia.com/blog/turing-h264-video-encoding-speed-and-quality/

    I will be not surprised if vm prevent to use NVEnc by ffmpeg.
    do you know how to solve this problems?
    Quote Quote  
  7. Originally Posted by slick zheng View Post
    Originally Posted by ProWo View Post
    Try
    ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i UPL_MmrXRhwoub.mp4 -c:v h264_nvenc -c:a copy -dn output.mp4
    this command is same error, it doesn't work
    And with
    ffmpeg -vsync 0 -hwaccel cuvid -i UPL_MmrXRhwoub.mp4 -c:v h264_nvenc -an -dn output.mp4
    Your Nvidia GPU is updatet with the newest drivers?
    Last edited by ProWo; 2nd Aug 2023 at 10:08.
    Quote Quote  
  8. If all you want to do is encode using the built in Nvidia encoding chip. all you need is:

    ffmpeg -i input -c:v h264_nvenc -profile high444p -pixel_format yuv444p -preset default output.mp4

    This is an example. you can leave out -profile high444p -pixel_format yuv444p doe 8-bit 420 encoding.

    The -hwaccel cuda -hwaccel_output_format cuda is for hardware accelerated decoding of the source, this is useful if you have a slower cpu and the source format can be accelerated by nvdec.

    For the sake of simplicity, i recommend you let ffmpeg decode the way it sees fit.
    Quote Quote  
  9. Originally Posted by ProWo View Post
    Originally Posted by slick zheng View Post
    Originally Posted by ProWo View Post
    Try
    ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i UPL_MmrXRhwoub.mp4 -c:v h264_nvenc -c:a copy -dn output.mp4
    this command is same error, it doesn't work
    And with
    ffmpeg -vsync 0 -hwaccel cuvid -i UPL_MmrXRhwoub.mp4 -c:v h264_nvenc -an -dn output.mp4
    Your Nvidia GPU is updatet with the newest drivers?
    i work with this command:
    ffmpeg -loglevel verbose -hwaccel cuvid -hwaccel_output_format cuda -i input.mp4 -vf format=yuv420p -c:v h264_nvenc output.mp4
    but the speed is too slow, just 1.6x, it's not normal, my CUDA version is 12.2, ffmpeg version is 4.2.7-0ubuntu0.1
    Quote Quote  
  10. Originally Posted by sophisticles View Post
    If all you want to do is encode using the built in Nvidia encoding chip. all you need is:

    ffmpeg -i input -c:v h264_nvenc -profile high444p -pixel_format yuv444p -preset default output.mp4

    This is an example. you can leave out -profile high444p -pixel_format yuv444p doe 8-bit 420 encoding.

    The -hwaccel cuda -hwaccel_output_format cuda is for hardware accelerated decoding of the source, this is useful if you have a slower cpu and the source format can be accelerated by nvdec.

    For the sake of simplicity, i recommend you let ffmpeg decode the way it sees fit.
    this command has below error:
    [h264_nvenc @ 0x55e5a1f276c0] No NVENC capable devices found
    Quote Quote  
  11. Originally Posted by slick zheng View Post

    this command has below error:
    [h264_nvenc @ 0x55e5a1f276c0] No NVENC capable devices found
    There's your answer, either the video card you have does not support nvenc, meaning it's quite old because this has been around for years or the drivers you are using are faulty.

    What are your system specs, specifically OS and video card?
    Quote Quote  
  12. Originally Posted by ProWo View Post
    Originally Posted by pandy View Post
    But NVEnc is not CUDA... NVidia suggest something like this https://developer.nvidia.com/blog/turing-h264-video-encoding-speed-and-quality/

    I will be not surprised if vm prevent to use NVEnc by ffmpeg.
    Read:
    https://trac.ffmpeg.org/wiki/HWAccelIntro
    Did you read provided link - CUVID is for decode, for encode there is only NVEnc. Also NVidia provided syntax has nothing with CUDA.
    Quote Quote  
  13. Originally Posted by slick zheng View Post
    Originally Posted by pandy View Post
    But NVEnc is not CUDA... NVidia suggest something like this https://developer.nvidia.com/blog/turing-h264-video-encoding-speed-and-quality/

    I will be not surprised if vm prevent to use NVEnc by ffmpeg.
    do you know how to solve this problems?
    Use already provided link - there is ffmpeg usage case - copy it and verify if you have access to NVEnc - ffmpeg returns information that there is no NVENC - verify iof you have proper ffmpeg build and all required resources.
    Quote Quote  
  14. Originally Posted by sophisticles View Post
    Originally Posted by slick zheng View Post

    this command has below error:
    [h264_nvenc @ 0x55e5a1f276c0] No NVENC capable devices found
    There's your answer, either the video card you have does not support nvenc, meaning it's quite old because this has been around for years or the drivers you are using are faulty.

    What are your system specs, specifically OS and video card?
    os is ubuntu 20.04,video card is Nvidia T4, CUDA version is 12.2, ffmpeg version is 4.2.7
    Quote Quote  
  15. Originally Posted by pandy View Post
    Originally Posted by slick zheng View Post
    Originally Posted by pandy View Post
    But NVEnc is not CUDA... NVidia suggest something like this https://developer.nvidia.com/blog/turing-h264-video-encoding-speed-and-quality/

    I will be not surprised if vm prevent to use NVEnc by ffmpeg.
    do you know how to solve this problems?
    Use already provided link - there is ffmpeg usage case - copy it and verify if you have access to NVEnc - ffmpeg returns information that there is no NVENC - verify iof you have proper ffmpeg build and all required resources.
    i test the nvidia test command ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4, also has this problem
    test command is from here
    also from https://trac.ffmpeg.org/wiki/HWAccelIntro#CUDANVENCNVDEC i see full transcode command is
    ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input -c:v h264_nvenc -preset slow output
    and this is also error
    Last edited by slick zheng; 2nd Aug 2023 at 21:53.
    Quote Quote  
  16. Originally Posted by slick zheng View Post
    i test the nvidia test command ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4, also has this problem
    test command is from here
    also from https://trac.ffmpeg.org/wiki/HWAccelIntro#CUDANVENCNVDEC i see full transcode command is
    ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input -c:v h264_nvenc -preset slow output
    and this is also error
    NVidia for NVEnc propose this:
    High Quality: -c:v h264_nvenc -preset medium -b:v BITRATE -bufsize BITRATE*2 -profile:v high -bf 3 -b_ref_mode 2 -temporal-aq 1 -rc-lookahead 20 -vsync 0
    Transcode may imply explicit call for NVDec decoder.

    Once again - verify if your ffmpeg build support NVEnc - try this
    ffmpeg -h encoder=h264_nvenc >h264_nvenc.txt
    and
    ffmpeg -h decoder=hevc_cuvid >hevc_cuvid.txt
    Quote Quote  
  17. Originally Posted by pandy View Post
    Originally Posted by slick zheng View Post
    i test the nvidia test command ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4, also has this problem
    test command is from here
    also from https://trac.ffmpeg.org/wiki/HWAccelIntro#CUDANVENCNVDEC i see full transcode command is
    ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input -c:v h264_nvenc -preset slow output
    and this is also error
    NVidia for NVEnc propose this:
    High Quality: -c:v h264_nvenc -preset medium -b:v BITRATE -bufsize BITRATE*2 -profile:v high -bf 3 -b_ref_mode 2 -temporal-aq 1 -rc-lookahead 20 -vsync 0
    Transcode may imply explicit call for NVDec decoder.

    Once again - verify if your ffmpeg build support NVEnc - try this
    ffmpeg -h encoder=h264_nvenc >h264_nvenc.txt
    and
    ffmpeg -h decoder=hevc_cuvid >hevc_cuvid.txt

    i tested two command.
    1: ./ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i UPL_1vKBpdd4iX.mp4 -c:a copy -c:v h264_nvenc -b:v 5M -vf scale_cuda=format=yuv420p output2.mp4
    2: ./ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i UPL_1vKBpdd4iX.mp4 -c:a copy -c:v h264_nvenc -b:v 5M -vf output2.mp4

    1 is work, 2 will display the error message, i wan't to know why nvenc encoder require scale_cuda filter
    Last edited by slick zheng; 4th Aug 2023 at 00:37.
    Quote Quote  
  18. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by slick zheng View Post
    Originally Posted by pandy View Post
    Originally Posted by slick zheng View Post
    i test the nvidia test command ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4, also has this problem
    test command is from here
    also from https://trac.ffmpeg.org/wiki/HWAccelIntro#CUDANVENCNVDEC i see full transcode command is
    ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input -c:v h264_nvenc -preset slow output
    and this is also error
    NVidia for NVEnc propose this:
    High Quality: -c:v h264_nvenc -preset medium -b:v BITRATE -bufsize BITRATE*2 -profile:v high -bf 3 -b_ref_mode 2 -temporal-aq 1 -rc-lookahead 20 -vsync 0
    Transcode may imply explicit call for NVDec decoder.

    Once again - verify if your ffmpeg build support NVEnc - try this
    ffmpeg -h encoder=h264_nvenc >h264_nvenc.txt
    and
    ffmpeg -h decoder=hevc_cuvid >hevc_cuvid.txt

    i tested two command.
    1: ./ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i UPL_1vKBpdd4iX.mp4 -c:a copy -c:v h264_nvenc -b:v 5M -vf scale_cuda=format=yuv420p output2.mp4
    2: ./ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i UPL_1vKBpdd4iX.mp4 -c:a copy -c:v h264_nvenc -b:v 5M -vf output2.mp4

    1 will display the error message, 2 is work, i wan't to know why nvenc encoder require scale_cuda filter
    try adding either -preset hq or preset p4 after your input file and see if it'll work - https://www.reddit.com/r/ffmpeg/comments/juvioh/ffmpeg_error_provide_device_doesnt_support/
    Last edited by october262; 4th Aug 2023 at 00:54.
    Quote Quote  
  19. Originally Posted by october262 View Post
    Originally Posted by slick zheng View Post
    Originally Posted by pandy View Post
    Originally Posted by slick zheng View Post
    i test the nvidia test command ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4, also has this problem
    test command is from here
    also from https://trac.ffmpeg.org/wiki/HWAccelIntro#CUDANVENCNVDEC i see full transcode command is
    ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input -c:v h264_nvenc -preset slow output
    and this is also error
    NVidia for NVEnc propose this:
    High Quality: -c:v h264_nvenc -preset medium -b:v BITRATE -bufsize BITRATE*2 -profile:v high -bf 3 -b_ref_mode 2 -temporal-aq 1 -rc-lookahead 20 -vsync 0
    Transcode may imply explicit call for NVDec decoder.

    Once again - verify if your ffmpeg build support NVEnc - try this
    ffmpeg -h encoder=h264_nvenc >h264_nvenc.txt
    and
    ffmpeg -h decoder=hevc_cuvid >hevc_cuvid.txt

    i tested two command.
    1: ./ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i UPL_1vKBpdd4iX.mp4 -c:a copy -c:v h264_nvenc -b:v 5M -vf scale_cuda=format=yuv420p output2.mp4
    2: ./ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i UPL_1vKBpdd4iX.mp4 -c:a copy -c:v h264_nvenc -b:v 5M -vf output2.mp4

    1 will display the error message, 2 is work, i wan't to know why nvenc encoder require scale_cuda filter
    try this command - ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input -c:v h264_nvenc -preset slow output
    https://superuser.com/questions/1676886/i-need-ffmpeg-command-to-convert-some-video-fi...264-with-nvidi
    this command is same error
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!