With omxh264enc, using control-rate=constant (CBR) and target-bitrate=<value> just hangs. Am I doing it wrong?

Yu You youyu.youyu at gmail.com
Thu Aug 5 10:35:27 UTC 2021


I might be wrong, that the bitrate unit would be kB, not Bits.
And you could also try to add "is-live=true" to videotestsrc and add a
queue before the encoder.

Good luck.

Yu

On Thu, 5 Aug 2021, 10:23 Nick Robillard via gstreamer-devel, <
gstreamer-devel at lists.freedesktop.org> wrote:

> When using the OpenMax encoder omxh264enc, I have found that setting
> control-rate=constant and specifying a value for target-bitrate causes
> GStreamer to hang indefinitely. It does not encode any output and does not
> show any error message (with debug mode disabled). It is very possible that
> I am not using the correct configuration. My goal is to produce a constant
> bitrate (or something close to it) stream at a specified bitrate that is
> suitable for live streaming to Twitch, Facebook, Youtube, etc. Is there a
> better or more correct way to achieve this?
>
> I have come up with a minimal example that has no external dependencies.
>
> This command works as expected:
> $ gst-launch-1.0 videotestsrc ! omxh264enc ! avimux ! filesink
> location=output.avi
>
> This command results in the described issue. I am attempting to achieve
> constant 4500Kbps bitrate:
> $ gst-launch-1.0 videotestsrc ! omxh264enc target-bitrate=4500000
> control-rate=constant ! avimux ! filesink location=output.avi
>
> It should be noted that combining control-rate=variable with
> target-bitrate=<value> does not have this issue and appears to work as
> expected.
>
> My GStreamer version:
>
> $ gst-launch-1.0 --version
> gst-launch-1.0 version 1.18.4
> GStreamer 1.18.4
> http://packages.qa.debian.org/gstreamer1.0
>
> For the failure case, I have set different levels of debug and I’m not
> spotting anything obvious. Of course the debug output is massive at higher
> debug levels so I will link to some pastebins.
>
> Debug level 4. This log is full and complete. (I exited via control+c
> after a few minutes of seeing no more output.)
> https://pastebin.com/raw/C1nQrnpB
>
> Debug level 5. This is a truncated log that includes the first 10th of a
> second of output due to length. It seems very repetitive.
> https://pastebin.com/raw/zqBMduhC
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210805/8246867e/attachment.htm>


More information about the gstreamer-devel mailing list