GNOME Bugzilla – Bug 621696
Can only encode with x264enc from a live source using a constant quantizer
Last modified: 2010-06-18 12:48:24 UTC
I am using v4lsrc to capture from a live source and trying to use the x264enc element. I use the -e argument to allow for a proper EOS to be sent to the pipeline, but the pipeline will always hang while it waits to receive the EOS, unless I use pass=4 (for x264enc). It is not ideal for me to use a constant quantizer when encoding x264 video.
Following pipeline run and terminate just fine for me (using -e and Ctrl-C): videotestsrc is-live=true ! x264enc ! fakesink v4l2src ! ffmpegcolorspace ! x264enc ! fakesink
You're right about that. I forget to give certain details in my bug description, my apologies. The pipeline's that I am creating require the use of the tee element, and when that is used I am unable to propagate an EOS properly. ideotestsrc is-live=true ! queue ! tee name=t ! x264enc ! fakesink t. ! queue ! fakesink
Indeed, that one seems to hang, but (adding some -v) afaics it already hangs before any EOS handling comes into play, as it fails to preroll. It seems that x264enc performs some large lookahead, so it takes in a lot of buffers (40) and produces no output for some time. The "some time" here seems more than other queue can handle, so a deadlock occurs trying to preroll. The above can be made to preroll (and then also handling EOS fine) by: * using async=false on fakesink * larger queue limits * tweaking x264enc behaviour (e.g. bitrate vs constant quality, or by other properties, note e.g. also bug #607798).