# Cannot build ffmpeg for Jetpack 4.6.1

**URL:** <https://forums.developer.nvidia.com/t/cannot-build-ffmpeg-for-jetpack-4-6-1/275949>\
**Category:** Jetson AGX Xavier\
**Tags:** ffmpeg\
**Created:** [December 13, 2023, 9:39am UTC](https://forums.developer.nvidia.com/t/cannot-build-ffmpeg-for-jetpack-4-6-1/275949 "2023-12-13T09:39:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user21273](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@user21273](https://forums.developer.nvidia.com/u/user21273)\
**Post date:** [December 13, 2023, 9:39am UTC](https://forums.developer.nvidia.com/t/cannot-build-ffmpeg-for-jetpack-4-6-1/275949/1 "2023-12-13T09:39:05Z")

</div>

Hi,

I followed the ffmpeg building instruction in [https://forums.developer.nvidia.com/t/jetpack-5-1-2-error-while-loading-shared-libraries-libnvbuf-utils-so-1-0-0/268992/9，but](https://forums.developer.nvidia.com/t/jetpack-5-1-2-error-while-loading-shared-libraries-libnvbuf-utils-so-1-0-0/268992/9%EF%BC%8Cbut) get error “fatal error: nvbufsurface.h: No such file or directory”.

Although I’ve found that header in my device, but the building still failed and the error goes to like “implicit declaration of xxx”.

Is this because while my jetpack version is 4.6.1 and it uses “nvbuf\_utils” api, the latest ffmpeg src code uses “NvUtils” api and thus causes the building error?

If so, how can I get the older version of ffmpeg src code which supports hardware acceleration decoding?

Here is my jetson-release:

 ![image](https://global.discourse-cdn.com/nvidia/original/4X/f/1/3/f137de32686ff07e5063daf09ada48a1b31b04cc.png)

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [December 14, 2023, 4:05am UTC](https://forums.developer.nvidia.com/t/cannot-build-ffmpeg-for-jetpack-4-6-1/275949/3 "2023-12-14T04:05:20Z")

</div>

Hi,  
Please try the commands to fetch the package for Jetpack 4:

```auto
$ echo "deb-src https://repo.download.nvidia.com/jetson/ffmpeg main main" | sudo tee -a /etc/apt/sources.list
$ sudo apt update
$ apt source ffmpeg=7:4.2.2-nvidia

```

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [January 3, 2024, 6:09am UTC](https://forums.developer.nvidia.com/t/cannot-build-ffmpeg-for-jetpack-4-6-1/275949/5 "2024-01-03T06:09:40Z")

</div>

Closed on January 3, 2024, 6:09am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
