2015-05-24 48 views
0

我想用樹莓派上的Gstreamer對我的電視錄製內容進行編碼。通過this post啓發,下面的代碼工作的下載MKV:解碼器:跳過流

/usr/bin/gst-launch-1.0 -e filesrc location=/media/Seagate/complete/TV/Better\ Call\ Saul/Season\ 01/Better\ Call\ Saul\ -\ S01E10\ -\ Marco.mkv ! decodebin name=demux ! queue ! audioconvert ! audio/x-raw ! audiorate ! avenc_ac3 bitrate=320000 ! mux. mpegtsmux name=mux ! filesink location=/media/Seagate/pvr/Buitenhof_compressed.mkv demux. ! queue ! videoconvert ! deinterlace ! omxh264enc target-bitrate=2000000 control-rate=1 inline-header=true periodicty-idr=250 interval-intraframes=250 ! "video/x-h264,profile=high" ! h264parse ! mux. 

使用的文件具有這種結構(GST-發現者輸出):

Topology: 
    container: Matroska 
    audio: AC-3 (ATSC A/52) 
    video: H.264 

Properties: 
    Duration: 0:49:18.048000000 
    Seekable: yes 
    Tags: 
     container format: Matroska 
     audio codec: AC-3 audio 
     language code: und 
     video codec: H264 
     minimum bitrate: 7288 
     bitrate: 24263 
     maximum bitrate: 9206 

我的錄音軟件(TVHeadend),但是輸出格式:

Topology: 
container: Matroska 
    subtitles: application/x-subtitle-unknown 
    subtitles: application/x-subtitle-unknown 
    audio: MPEG-1 Layer 2 (MP2) 
    audio: AC-3 (ATSC A/52) 
    audio: MPEG-1 Layer 2 (MP2) 
    video: H.264 

Properties: 
    Duration: 0:00:06.440000000 
    Seekable: yes 
    Tags: 
     title: Buitenhof 
     extended comment: DATE_BROADCASTED=2015-05-24 10:05:00 
     container format: Matroska 
     audio codec: MPEG 1 Audio, Layer 2 
     language code: nl 
     nominal bitrate: 256000 
     has crc: true 
     channel mode: stereo 
     video codec: H264 
     minimum bitrate: 8972400 
     bitrate: 16546750 
     maximum bitrate: 22841600 

如何告訴管道跳過子標題流並使用AC-3和H264流?我試過decodebin name=demux demux.audio_01無濟於事。輸出是

Setting pipeline to PAUSED ... 
Pipeline is PREROLLING ... 
Missing element: application/x-subtitle-unknown decoder 
Missing element: application/x-subtitle-unknown decoder 

這將是很好,也包括字幕,但我可以生活在沒有他們。

回答

0

流的順序與問題無關。沒有足夠的視頻內存可用。對於全高清mkv,我需要將視頻內存分割爲128MB。

這樣做的一種方法是運行sudo raspi-config對於我的raspbian版本的視頻內存拆分是在高級菜單下。需要重新啓動。

在此之後,命令我張貼的作品

+0

如果輸入包含MPEG視頻的額外提示:在RPI的OMX硬件解碼器需要您購買MPEG2解碼許可證:http://www.raspberrypi.com/mpeg -2-許可證密鑰/ –