[gst-devel] x264enc not working with tee + video output sink

Gregory Petrosyan gregory.petrosyan at gmail.com
Mon Aug 16 22:52:25 CEST 2010


On Mon, Aug 16, 2010 at 11:52 PM, Gregory Petrosyan
<gregory.petrosyan at gmail.com> wrote:
> On Mon, Aug 16, 2010 at 11:35 PM, Gregory Petrosyan
> <gregory.petrosyan at gmail.com> wrote:
>> I am having some problems with GStreamer. Basically, I have a
>> pipeline, which used to work (with Ubuntu 9.04 GStreamer packages).
>> Here it is:
>>
>> ...
>>
>> Basically, it captures video from a DV camera, stores raw DV data,
>> encodes it to H.264 on the fly and shows video preview window.
>
> Here are the minimal pipelines, which reproduce the problem:
>
> This works:
> gst-launch-0.10 -e dv1394src ! queue ! dvdemux ! ffdec_dvvideo ! queue
> ! ffmpegcolorspace ! x264enc ! mpegtsmux ! queue ! filesink
> location=test.avi
>
> And this:
> gst-launch-0.10 -e dv1394src ! queue ! dvdemux ! ffdec_dvvideo ! tee
> name=t ! queue ! ffmpegcolorspace ! x264enc ! mpegtsmux ! queue !
> filesink location=test.avi t. ! queue ! ffmpegcolorspace ! xvimagesink
> sync=false
>
> results in frozen preview window + zero-length test.avi file.

After a little investigation, it seems like a x264enc-pipeline becomes
frozen, if there's a preview window in it. So,

gst-launch-0.10 -e dv1394src ! queue ! dvdemux ! ffdec_dvvideo ! queue
! tee name=t ! queue ! ffmpegcolorspace ! x264enc ! mpegtsmux ! queue
! filesink location=test.avi

(pure encoding) works fine, but

gst-launch-0.10 -e dv1394src ! queue ! dvdemux ! ffdec_dvvideo ! queue
! tee name=t ! queue ! ffmpegcolorspace ! x264enc byte-stream=true !
queue ! filesink location=test.avi t. ! queue ! ffmpegcolorspace !
xvimagesink sync=false

is completely frozen (same with glimagesink). When I change x264enc +
mpegtsmux to e.g. ffenc_msmpeg4v2 + avimux, everything works fine.

P.S. You can replace dv1394src stuff in the pipelines with filesrc +
decodebin2, results are the same.

P.P.S. But, tee to double x264enc instead of x264enc + video preview
(gst-launch-0.10 -e dv1394src ! queue ! dvdemux ! ffdec_dvvideo !
queue ! tee name=t ! queue ! ffmpegcolorspace ! x264enc
byte-stream=true ! queue ! filesink location=test.avi t. ! queue !
ffmpegcolorspace ! x264enc byte-stream=true ! queue ! filesink
location=test2.avi) works fine.

I am completely puzzled.

                Gregory




More information about the gstreamer-devel mailing list