Closed caguas closed 7 years ago
@jasaw thanks so much for your reply! I'll check out the code - - I'm needing this for a different t project, but your code will probably show me what I need. I'm needing to encode true lossless h264 on a Raspberry PI, which needs the "crf=0" option.
@jasaw could you please be so kind and see if the latest nightly build (dev20181126) makes use of the h264 OMX acceleration? I've tried to bring thingOS/motionEyeOS as closely as possible to BuildRoot and the ffmpeg
package currently only incorporates disable-rpi-omx-input-zerocopy.patch
. By the way, do you think we still need this, given the 3.4.4 release we now use?
@ccrisan I've tested H264 OMX hw accel with dev20181126 and it's still working as expected.
Regarding disable-rpi-omx-input-zerocopy.patch
, it's to workaround a memory mapping issue between raspberry pi userland library and the kernel. As far as I know, the issue is not resolved yet. Long story short, I think we still need it.
@jasaw thanks. Then we're ready for a new release.
to compile ffmpeg with hardware assist h264 encoding: ./configure --enable-mmal --enable-omx-rpi --enable-omx
if you have an RPI3 , you can use multiple cores to speed up compilation: make -j4
to test: ./ffmpeg -f v4l2 -input_format yuv420p -framerate 25 -video_size 640x480 -i /dev/video0 -frames 500 -an -c:v h264_omx test.mp4
ffmpeg will generate warnings just ignore them for now.
The omx h264 hardware assist encoding was ported from libav by Aman Gupta.
Amancio