# Ffmpeg encode error

**URL:** <https://forums.developer.nvidia.com/t/ffmpeg-encode-error/126022>\
**Category:** Jetson AGX Xavier\
**Tags:** encoder\
**Created:** [June 3, 2020, 9:16am UTC](https://forums.developer.nvidia.com/t/ffmpeg-encode-error/126022 "2020-06-03T09:16:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wenbin.leong](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@wenbin.leong](https://forums.developer.nvidia.com/u/wenbin.leong)\
**Post date:** [June 3, 2020, 9:16am UTC](https://forums.developer.nvidia.com/t/ffmpeg-encode-error/126022/1 "2020-06-03T09:16:54Z")

</div>

Hi, I am trying to use ffmpeg to encode, following the steps on:

> **[NVIDIA FFmpeg Transcoding Guide | NVIDIA Technical Blog](https://developer.nvidia.com/blog/nvidia-ffmpeg-transcoding-guide/)**
>
> All NVIDIA GPUs starting with the Kepler generation support fully-accelerated hardware video encoding, and all GPUs starting with Fermi generation support fully-accelerated hardware video decoding.

I got ffmpeg build, however when I want to encode a video with it shows the following error:

> #ffmpeg -i input.avi -c:v h264\_nvenc output.mp4  
> …  
> [swscaler @ 0x55d34678d0] deprecated pixel format used, make sure you did set range correctly  
> [h264\_nvenc @ 0x55d3405ca0] Cannot load libnvidia-encode.so.1  
> [h264\_nvenc @ 0x55d3405ca0] The minimum required Nvidia driver for nvenc is 435.21 or newer  
> 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  
> Conversion failed!

It seems CUDA SDK is up to date:

> # apt-get install cuda-toolkit-\*  
> Reading package lists… Done  
> Building dependency tree  
> Reading state information… Done  
> Note, selecting ‘cuda-toolkit-10-0’ for glob ‘cuda-toolkit-\*’  
> cuda-toolkit-10-0 is already the newest version (10.0.326-1).  
> 0 upgraded, 0 newly installed, 0 to remove and 361 not upgraded.

Is there a older version of ffmpeg that supports h264\_nvenc ?  
Or how do I check or update the nvidia drivers ?

---

<div class="post-metadata">

**Author:** ![Honey\_Patouceul](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/honey_patouceul/32/389777_2.png) [@Honey\_Patouceul](https://forums.developer.nvidia.com/u/Honey_Patouceul)\
**Post date:** [June 3, 2020, 10:49pm UTC](https://forums.developer.nvidia.com/t/ffmpeg-encode-error/126022/2 "2020-06-03T22:49:15Z")

</div>

You may check [this](https://forums.developer.nvidia.com/t/the-nvidia-ffmpeg-package-supports-hardware-accelerated-decode-on-jetson-platforms/123694/7).

---

<div class="post-metadata">

**Author:** ![pfontanelli](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@pfontanelli](https://forums.developer.nvidia.com/u/pfontanelli)\
**Post date:** [October 13, 2020, 9:20am UTC](https://forums.developer.nvidia.com/t/ffmpeg-encode-error/126022/3 "2020-10-13T09:20:22Z")

</div>

Hi, has been found a solution to this issue? I’m facing the same

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 18, 2021, 6:21pm UTC](https://forums.developer.nvidia.com/t/ffmpeg-encode-error/126022/4 "2021-10-18T18:21:21Z")

</div>

Closed on October 18, 2021, 6:21pm UTC


