On Mon, Aug 16, 2010 at 11:52 PM, Gregory Petrosyan
<[hidden email]> wrote: > On Mon, Aug 16, 2010 at 11:35 PM, Gregory Petrosyan > <[hidden email]> 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 ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi,
I am seeing the same problem on Ubuntu 10.10. Has there any fix for this already? Thanks! Yiliang |
In reply to this post by Gregory Petrosyan
Hello,
The queue will block the supplier when there is no more space in it. Please refer http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-queue.html Since x264enc may take more time to consume, setting leaky property (as suggested in the doc) on the queue before xvimagesink might help. Senthil |
Hi Senthil,
Thanks for the reply. I have done more tests after the post. After some simplification (remove tee and queue, etc), here is the pipeline that gives me the problem. It will be stuck a couple of seconds after start, then it will exit abnormally. gst-launch -e v4l2src device=/dev/video0 ! x264enc byte-stream=true ! qtmux ! filesink location=a.mov If I change byte-stream=false, the pipeline will go on, but the movie file recorded can not be played. If I change qtmux to ffmux_mp4, the recording can go on no matter I set byte-stream to true or false. The movie can be played, but the movie file has lots of artifacts. Lastly, if I use avimux, the pipeline works fine, and the movie file recorded can be played smoothly. So after all the test, it seems to be more a problem related how the qtmux (or ffmux_mp4) interacts with other elements. Also it seems to be a different problem from that reported in the original post, since I can use avimux with x264enc. I may post a message with a different subject. Thanks! Yiliang |
> I have done more tests after the post. After some simplification (remove tee > and queue, etc), here is the pipeline that gives me the problem. It will be > stuck a couple of seconds after start, then it will exit abnormally. Exit abnormally? How? What's the error message? (presumably a not-negotiated error, which is qtmux rejecting H.264 in bytestream format) > gst-launch -e v4l2src device=/dev/video0 ! x264enc byte-stream=true ! > qtmux ! filesink location=a.mov > > If I change byte-stream=false, the pipeline will go on, but the movie file > recorded can not be played. Works fine for me with git/latest pre-releases. Is gst-launch finishing up the file properly? (ie. sending the EOS and waiting for the EOS) Cheers -Tim ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |