This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
VPF Tegra support (HW enc acceleration missing) #515
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello world,
This PR adds MVP Tegra support for VPF.
What's new:
PyNvDecoder
andPyNvEncoder
classes aren't compiled and exported toPyNvCodec
module for Tegra. It happens because Tegra doesn't support Video Codec SDK and relies on V4L2 instead.PyFfmpegDecoder
class.How to build:
I did it on Tegra board itself, it takes couple minutes
apt install ffmpeg
. It has some limitations like the lack of MP4 containers support. Please be aware of that.TEGRA_BUILD
env. variable:export TEGRA_BUILD
. It's required because to my best knowledge there's no reliable way to auto-detect Tegra platform. Please correct me if I'm wrong, I'll be happy to get rid of this extra step.python3 -m pip install .
How to run:
To use HW decoding acceleration, use
PyFfmpegDecoder
and choose appropriate codec:That's the only difference, rest is the same.
There's more feature-reach Tegra FFmpeg build with decoding and encoding support: https://github.com/jocover/jetson-ffmpeg
But for some reason my build segfaults on Xavier NX board I've used for development.
Future directions:
Feature parity with Video Codec SDK builds.
Fix https://github.com/jocover/jetson-ffmpeg segfaults, then add HW acceleration for encoding.
P. S.
For those who like to build FFmpeg from source, here's how you can substitute
apt install ffmpeg
step: