2011-10-20 100 views
0

我試圖發揮本地的MPEG2 TS文件在GStreamer與此:
的GStreamer:播放MPEG2

gst-launch filesrc location=open_season.mpg ! mpeg2dec ! xvimagesink 

第一幀出現顏色的大塊,然後停止。關於我在這裏做錯了的任何想法? -TS文件是否需要以不同的方式處理?

這裏的日誌:

$ gst-launch filesrc location=open_season.mpg ! mpeg2dec ! xvimagesink 
Setting pipeline to PAUSED ... 
Pipeline is PREROLLING .... 
WARNING: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Internal data flow problem.. 
Additional debug info:. 
gstbasesink.c(3492): gst_base_sink_chain_unlocked(): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: 
Received buffer without a new-segment. Assuming timestamps start from 0. 
Pipeline is PREROLLED ... 
Setting pipeline to PLAYING ... 
New clock: GstSystemClock 
Got EOS from element "pipeline0". 
Execution ended after 6866757291 ns. 
Setting pipeline to PAUSED ... 
Setting pipeline to READY ... 
Setting pipeline to NULL ... 
Freeing pipeline .. 

回答

3

我覺得首先你應該首先嚐試播放的文件與playbin2的幫助。如果你能夠播放它,那麼你應該使用decodebin2,調試它的輸出並相應地構建你的管線。

爲playbin2的語法如下: -

gst-launch playbin2 uri = file:///home/user1031040/Desktop/file.mpg 

爲decodebin2的語法如下: -

gst-launch filesrc location = file.mpg ! decodebin2 ! autovideosink 
相關問題