GNOME Bugzilla – Bug 532292
Freeze while play a mpg file(PREROLLING)
Last modified: 2008-05-09 08:37:25 UTC
Steps to reproduce: I try to playback a mpeg file with ac-3 audio. I try the following command: gst-launch-0.10 filesrc location=/tmp/ac3.mpg ! dvddemux .current_video {deque ! mpeg2dec ! ffmpegcolorspace ! videoscale ! xvimagesink} dvddemux0.current_audio {a52dec ! audioconvert ! osssink} some information is listed: Setting pipeline to PAUSED ... No accelerated IMDCT transform found Pipeline is PREROLLING ... <Here, this command will be freezed, i have to CTRL-C to continue> But, while i don't link audio or video branch, like thus gst-launch-0.10 filesrc location=/tmp/ac3.mpg ! dvddemux .current_video {deque ! mpeg2dec ! ffmpegcolorspace ! videoscale ! xvimagesink} gst-launch-0.10 filesrc location=/tmp/ac3.mpg ! dvddemux .current_audio {a52dec ! audioconvert ! osssink} It is work normally. i can see video pictures or listen correct audio. Anyone can tell me why and how to solve? Stack trace: Other information:
Additional, i can playback this file correctly using ToTem.
You have to add queues after splitting the pipeline and use mpegdemux instead of dvddemux... i.e. gst-launch-0.10 filesrc location=/tmp/ac3.mpg ! mpegdemux name=d d.video_00 ! queue ! mpeg2dec ! ffmpegcolorspace ! videoscale ! xvimagesink d.audio_00 ! queue ! a52dec ! audioconvert ! osssink You could also use decodebin, which will already decode the stream to raw video or audio and then simply plug that to audioconvert ! audiosink or ffmpegcolorspace ! videoscale ! videosink.
Thanks a lot, Sebastian Dröge. Your reply is correct. It work fine following your indicating. Would you tell me why a queue is need? Thanks more.
Because otherwise the first sink will get data and wait until the second one gets data, which will never happen because they're on the same thread. queue will split both parts into separate threads (only one queue should be required here btw).