[FFmpeg-user] How to specify Baseline Profile when using h264_omx encoder?

Ryan Griggs rgriggs at hilltop.net
Tue Sep 25 18:45:45 EEST 2018


Hello, I am attempting to encode live video on raspberry pi 3B using the
OpenMAX encoder (h264_omx).  The output video must be encoded with the
Baseline profile in order to be useful in my application.

I am unable to specify Baseline profile when encoding.  The h264_omx
encoder defaults to High 10, and when I attempt to specify using
"-profile:v baseline" I get the following error:

[h264_omx @ 0x7ca770] [Eval @ 0x7e9dd2e0] Undefined constant or missing '('
in 'baseline'
[h264_omx @ 0x7ca770] Unable to parse option value "baseline"
[h264_omx @ 0x7ca770] Error setting option profile to value baseline.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_mmal) -> h264 (h264_omx))
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height

ffmpeg version 3.2.10-1~deb9u1+rpt1

Note that if I use libx264, I *can* successfully specify a baseline
profile.  However, I must use OMX in order to take advantage of hardware
acceleration for this particular application.

Full command line:
ffmpeg -c:v h264_mmal -i "rtsp://192.168.1.115:554/stream0" -c:v h264_omx
-profile:v baseline -level:v 4.0 test.h264

In omx.c, there does appear to be support for the baseline, main, and high
profiles.  I just can't figure out how to select baseline via command-line
options.
(
https://github.com/FFmpeg/FFmpeg/blob/a0ac49e38ee1d1011c394d7be67d0f08b2281526/libavcodec/omx.c#L528
)


Thank you for any assistance or pointers.
Best,
Ryan


More information about the ffmpeg-user mailing list