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

FR: Add Raspberry as an option for GPU #66

Closed
PiscisSwimeatus opened this issue Sep 9, 2019 · 6 comments
Closed

FR: Add Raspberry as an option for GPU #66

PiscisSwimeatus opened this issue Sep 9, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@PiscisSwimeatus
Copy link

Raspberry Pis can do hardware acceleration with h264_mmal decode and h264_omx encode.
Could we have this added as an option to GPU?

https://trac.ffmpeg.org/wiki/HWAccelIntro

@ehendrix23 ehendrix23 added the enhancement New feature or request label Sep 9, 2019
@ehendrix23
Copy link
Owner

I'll look into it. Next version has option to specify GPU (currently NVIDIA and Intel), hence I can add it in there for option.
Would you be able to pull the code from GitHub and test once I have it in there?

@PiscisSwimeatus
Copy link
Author

Great, just give me a notification when its ready and I'll test.

Been testing the nvidia one for now.
As far as I can see its only HW encoding, decoding looks to be SW and not HW?

@PiscisSwimeatus
Copy link
Author

Also the new --gpu_type throws me an error:

python tesla_dashcam.py --mirror --gpu --gpu_type="nvidia" --scale="0.5" --quality="MEDIUM" --output="C:\Users\xyz\Temp\Tesla_Dashcam" --monitor_trigger "C:\Users\xyz\Downloads"

GPU acceleration is enabled
Traceback (most recent call last):
File "tesla_dashcam.py", line 2657, in
sys.exit(main())
File "tesla_dashcam.py", line 2368, in main
video_encoding = video_encoding + ["-c:v", MOVIE_ENCODING[encoding]]
KeyError: 'x264nvidia'

@ehendrix23
Copy link
Owner

That error should be resolved now.
Further, added support for Raspberry Pi h.264 encoding. Looks like h.265 is not support for it.

For decoding, was just looking into this but docs for FFmpeg also state:
Note that most acceleration methods are intended for playback and will not be faster than software decoding on modern CPUs.

And when I added it I was having issues. So not sure based on what they state there if there would be a real benefit in it.

@PiscisSwimeatus
Copy link
Author

Thanks, tested the HW encoding now on a Zero and it works (Getting 1 fps so not usable for converting, will test the 4b later today).

Tested SW vs HW decoding on an NVidia 980ti & Intel 6700K, and as docs says there is really no difference between the two.

On the Pis however it might be different due to slower CPUs, but decoding is a pay to use function and not available for the 4b. I only have a Zero (Unusable for converting) and a 4b (No HW decoding) so not really in a position to test.

Thanks again, I'll close this issue now.

@ehendrix23
Copy link
Owner

Thank you.

Release 0.1.14 is out now including this enhancement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants