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

FFmpeg on jetson #1894

Closed
MMMMMine opened this issue Sep 26, 2022 · 7 comments
Closed

FFmpeg on jetson #1894

MMMMMine opened this issue Sep 26, 2022 · 7 comments

Comments

@MMMMMine
Copy link

hello, my server is jetson nano
--jetpack:5.0.1
--cuda:11.4.14
what dependencies do I need to get FFmpegFrameGrabber to work with gpu

i use h264_cuvid/hevc_cuvid, it still worked with cpu, this is my dependencies
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacv</artifactId>
<version>1.5.7</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg-platform</artifactId>
<version>5.0-1.5.7</version>
</dependency>

@saudet
Copy link
Member

saudet commented Sep 26, 2022 via email

@MMMMMine
Copy link
Author

Check the log for any warnings.

no warnings. it worked normally with cpu , not gpu.
i use this jar run on x86_64-linux , it worked with gpu.

@MMMMMine
Copy link
Author

@saudet I installed nvidia ffmpeg on jetson nano and run ffmpeg -c:v hevc_nvv4l2dec -vf fps=1 image_%05d.jpg
it worked without cpu and outputted image successfully , does FFmpegFrameGrabber support it and how to set option ?

saudet added a commit to bytedeco/javacpp-presets that referenced this issue Sep 27, 2022
@saudet
Copy link
Member

saudet commented Sep 27, 2022

Hum, it just looks like CUDA wasn't enabled on that platform.
I've just done that in commit bytedeco/javacpp-presets@5877628.
Please give it a try with the snapshots: http://bytedeco.org/builds/

@MMMMMine
Copy link
Author

I tried, but it didn't work.
NVIDIA officially states that jetson ffmpeg uses a separate codec module, does that mean it is not accelerated by CUDA?
image

@saudet
Copy link
Member

saudet commented Sep 28, 2022

We need a libnvcuvid.so.1 library that supports the GPU, yes. I suppose the version of FFmpeg they provide is a proprietary fork of the original project, and we don't have access to the source code, but if they provide binaries for its libraries as well, we can use those with JavaCV and JavaCPP by setting the "org.bytedeco.javacpp.pathsFirst" system property to "true". They need to be for the same exact version of FFmpeg though. If not, you'll need to build the JavaCPP Presets for FFmpeg from source:
https://github.com/bytedeco/javacpp-presets#build-instructions

@MMMMMine
Copy link
Author

Thank you for your reply. I will continue to explore. This is difficult for me.

@MMMMMine MMMMMine changed the title FFmpeg on linux-arm64 FFmpeg on jetson Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants