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

Update Jetson ffmpeg patch for Jetpack 5.1.2 compatibility #8914

Merged

Conversation

AndBobsYourUncle
Copy link
Contributor

@AndBobsYourUncle AndBobsYourUncle commented Dec 10, 2023

This PR updates the script that builds the custom ffmpeg version for Jetson devices to use an updated commit that intelligently does not link the nvbuf_utils library if it detects the presence of the NvUtils API.

This allows Frigate to run on a Jetson device running Jetpack 5.1.2 and newer that lacks the nvbuf_utils shared library.

The commit sha that is referenced is from a fork of the original repo used from @madsciencetist, with a change to the CMakeLists.txt file so that it leaves out the linked library.

It can always be switched back to point to @madsciencetist's repository later if this PR is merged in, but it might be a good idea to make the ffmpeg build script here in Frigate use a sha instead of master so that Docker caches are busted when new changes are required.

Here is the PR against jetson-ffmpeg:
madsciencetist/jetson-ffmpeg#3

I have built this locally, and ran it successfully on my Nvidia Jetson AGX Orin device, running Jetpack 5.1.2. Detections were working, and it appeared that everything was using GPU resources, verified by running jtop.

Copy link

netlify bot commented Dec 10, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 9fe9ef5
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/65760ad112b459000925b589

@NickM-27
Copy link
Sponsor Collaborator

Do we know this won't cause issues for users on Jetson 4?

@AndBobsYourUncle
Copy link
Contributor Author

AndBobsYourUncle commented Dec 10, 2023

@NickM-27

Do we know this won't cause issues for users on Jetson 4?

Great question. I could reflash my Jetson to Jetpack 4, but it would be a very big pain to reinstall everything all over again that I have installed on it.

Might be quicker to get someone else to retest to make sure.

However, just logically following how everything works, this shouldn't affect Jetson 4 at all. Honestly, from looking at it all, it doesn't even seem like Jetpack 4 devices needed the shared library either, since @madsciencetist was installing jetson_multimedia_api for Jetpack 4 as well:
https://github.com/blakeblackshear/frigate/blob/dev/docker/tensorrt/build_jetson_ffmpeg.sh#L19

@AndBobsYourUncle
Copy link
Contributor Author

@NickM-27

Actually, scratch that, I don't think I can use Jetpack 4 on my AGX Orin, because support for that board was added in Jetpack 5.

@AndBobsYourUncle
Copy link
Contributor Author

AndBobsYourUncle commented Dec 11, 2023

@NickM-27

Thank you for the approval! Any next steps for this PR? I'm new to contributions for this repository.

Also, would this getting merged mean that it would make its way into the next beta build?

@blakeblackshear
Copy link
Owner

A comment or approval from @madsciencetist would be good here since they are listed as the codeowner for these images.

@AndBobsYourUncle
Copy link
Contributor Author

@blakeblackshear

Sounds good. It would be great to be able to get this merged in time to make it into v0.13, but I understand waiting for the proper PR approvals.

@blakeblackshear blakeblackshear merged commit 49814b3 into blakeblackshear:dev Dec 31, 2023
10 checks passed
@madsciencetist
Copy link
Contributor

This change looks good to me. I can't test it, but it should work. If it doesn't, Jetpack 4 (Jetson Nano) users will complain about video not working, and ffmpeg logs will complain about a missing library.

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.

None yet

4 participants