I'm having an impossible time setting up a filtergraph to read from a recording that I made from my DVB video4linux device. Any help would be vastly appreciated.<div><br></div><div>How I made the recording:</div><div><br>
</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>To tune the channel:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>azap -c ~/channels.conf "Florida"</div>
</blockquote><div><br></div><div>To record the channel: </div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>cat /dev/dvb/adapter0/dvr0 > /tmp/test</div></blockquote></blockquote><div>
<br></div><div>This is the way that recordings must be made (I can not use any GST plugins to do this for me).</div><div><br></div><div>I used tstools to identify that the recording is a TS stream:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div>tstools/bin$ ./stream_type ~/recordings/20130129-202049</div></div><div><div>Reading from /home/dustin/recordings/20130129-202049</div></div><div><div>It appears to be Transport Stream</div></div></blockquote><div>
<br></div><div>...but that there are no PAT/PMT frames:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>tstools/bin$ ./tsinfo ~/recordings/20130129-202049</div></div><div><div>
Reading from /home/dustin/recordings/20130129-202049</div>
</div><div><div>Scanning 10000 TS packets</div></div><div><div><br></div></div><div><div>Found 0 PAT packets and 0 PMT packets in 10000 TS packets</div></div></blockquote><div><br></div><div>I was able to produce a single ES (elementary stream) stream, by running ts2es:</div>
<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>tstools/bin$ ./ts2es -pid 97 ~/recordings/20130129-202049 ~/recordings/<a href="http://20130129-202049.es">20130129-202049.es</a></div>
</div><div><div>Reading from /home/dustin/recordings/20130129-202049</div></div><div><div>Writing to /home/dustin/recordings/<a href="http://20130129-202049.es">20130129-202049.es</a></div></div><div><div>Extracting packets for PID 0061 (97)</div>
</div><div><div>!!! 4 bytes ignored at end of file - not enough to make a TS packet</div></div><div><div>Extracted 219258 of 248113 TS packets</div></div></blockquote><div><br></div><div><div>I am able to play the ES stream (even though the video is frozen on the first frame):</div>
</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>gst-launch-0.10 filesrc location=~/recordings/<a href="http://20130129-202049.es">20130129-202049.es</a> ! decodebin2 ! autovideosink</div>
</div><div><div>gst-launch-0.10 filesrc location=~/recordings/<a href="http://20130129-202049.es">20130129-202049.es</a> ! decodebin2 ! xvimagesink</div></div><div><div>gst-launch-0.10 playbin2 uri=file:///home/dustin/recordings/<a href="http://20130129-202049.es">20130129-202049.es</a></div>
</div></blockquote><div><br></div><div>No matter what I do, though, I can't get the original TS file to open. However, it opens in Mplayer/FFMPEG, perfectly (but not VLC). This is the output of FFMPEG:</div><div><br>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>ffmpeg -i 20130129-202049</div><div><br></div><div>ffmpeg version 0.8.5-4:0.8.5-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers</div>
</div>
<div><div> built on Jan 24 2013 18:03:14 with gcc 4.6.3</div></div><div><div>*** THIS PROGRAM IS DEPRECATED ***</div></div><div><div>This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.</div>
</div><div><div>[mpeg2video @ 0x9be7be0] mpeg_decode_postinit() failure</div></div><div><div> Last message repeated 4 times</div></div><div><div>[mpegts @ 0x9be3aa0] max_analyze_duration reached</div></div><div><div>[mpegts @ 0x9be3aa0] PES packet size mismatch</div>
</div><div><div>Input #0, mpegts, from '20130129-202049':</div></div><div><div> Duration: 00:03:39.99, start: 9204.168844, bitrate: 1696 kb/s</div></div><div><div> Stream #0.0[0x61]: Video: mpeg2video (Main), yuv420p, 528x480 [PAR 40:33 DAR 4:3], 15000 kb/s, 30.57 fps, 29.97 tbr, 90k tbn, 59.94 tbc</div>
</div><div><div> Stream #0.1[0x64]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s</div></div><div><div>At least one output file must be specified</div></div></blockquote><div><br></div><div>This tells us that the video stream has PID 0x61 (97).</div>
<div><br></div><div>I have been trying for a few days, so the following are only examples of a couple of attempts. I'll provide the playbin2 example first, since I know that thousands of people will respond, insisting that I just use that. It doesn't work.</div>
<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>gst-launch-0.10 playbin2 uri=file:///home/dustin/recordings/20130129-202049</div></div><div><div><br></div><div>Setting pipeline to PAUSED ...</div>
</div><div><div>Pipeline is PREROLLING ...</div></div><div><div>ERROR: from element /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMpegTSDemux:mpegtsdemux0: Could not determine type of stream.</div>
</div><div><div>Additional debug info:</div></div><div><div>gstmpegtsdemux.c(2931): gst_mpegts_demux_sink_event (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMpegTSDemux:mpegtsdemux0:</div>
</div><div><div>No valid streams found at EOS</div></div><div><div>ERROR: pipeline doesn't want to preroll.</div></div><div><div>Setting pipeline to NULL ...</div></div><div><div>Freeing pipeline ...</div></div></blockquote>
<div><br></div><div>It fails [probably] because no PID has been specified with which to find the video (the "EOS" error, I think).</div><div><br></div><div>Naturally, I tried the following to start by demuxing the TS format. I believe it's the "es-pids" property that receives the PID in the absence of PMT information (which tstools said there weren't any, above), but I tried "program-number", too, just in case. gst-inspect indicates that one is hex and the other is decimal:</div>
<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>gst-launch-0.10 -v filesrc location=20130129-202049 ! mpegtsdemux es-pids=0x61 ! fakesink</div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>gst-launch-0.10 -v filesrc location=20130129-202049 ! mpegtsdemux program-number=97 ! fakesink</div></blockquote><div><br></div><div>Output:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div>gst-launch-0.10 filesrc location=20130129-202049 ! mpegtsdemux es-pids=0x61 ! fakesink</div></div><div><div>Setting pipeline to PAUSED ...</div></div><div><div>Pipeline is PREROLLING ...</div></div><div><div>ERROR: from element /GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0: Could not determine type of stream.</div>
</div><div><div>Additional debug info:</div></div><div><div>gstmpegtsdemux.c(2931): gst_mpegts_demux_sink_event (): /GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0:</div></div><div><div>No valid streams found at EOS</div>
</div><div><div>ERROR: pipeline doesn't want to preroll.</div></div><div><div>Setting pipeline to NULL ...</div></div><div><div>Freeing pipeline ...</div></div><div><div>dustin@dustinmicro:~/recordings$ gst-launch-0.10 -v filesrc location=20130129-202049 ! mpegtsdemux es-pids=0x61 ! fakesink</div>
</div><div><div>Setting pipeline to PAUSED ...</div></div><div><div>Pipeline is PREROLLING ...</div></div><div><div>ERROR: from element /GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0: Could not determine type of stream.</div>
</div><div><div>Additional debug info:</div></div><div><div>gstmpegtsdemux.c(2931): gst_mpegts_demux_sink_event (): /GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0:</div></div><div><div>No valid streams found at EOS</div>
</div><div><div>ERROR: pipeline doesn't want to preroll.</div></div><div><div>Setting pipeline to NULL ...</div></div><div><div>Freeing pipeline ...</div></div><div><div>dustin@dustinmicro:~/recordings$ gst-launch-0.10 -v filesrc location=20130129-202049 ! mpegtsdemux es-pids=0x61 ! fakesink</div>
</div><div><div>Setting pipeline to PAUSED ...</div></div><div><div>Pipeline is PREROLLING ...</div></div><div><div>ERROR: from element /GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0: Could not determine type of stream.</div>
</div><div><div>Additional debug info:</div></div><div><div>gstmpegtsdemux.c(2931): gst_mpegts_demux_sink_event (): /GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0:</div></div><div><div>No valid streams found at EOS</div>
</div><div><div>ERROR: pipeline doesn't want to preroll.</div></div><div><div>Setting pipeline to NULL ...</div></div><div><div>Freeing pipeline ...</div></div></blockquote><div><br></div><div>However, when I try mpegpsdemux (for program streams (PS), as opposed to transport streams (TS)), I get further:</div>
<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>gst-launch-0.10 filesrc location=20130129-202049 ! mpegpsdemux ! fakesink</div></div><div><div><br></div><div>Setting pipeline to PAUSED ...</div>
</div><div><div>Pipeline is PREROLLING ...</div></div><div><div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_event_new_new_segment_full: assertion `position != -1' failed</div></div><div>
<div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_mini_object_ref: assertion `mini_object != NULL' failed</div></div><div><div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_pad_push_event: assertion `event != NULL' failed</div>
</div><div><div>Pipeline is PREROLLED ...</div></div><div><div>Setting pipeline to PLAYING ...</div></div><div><div>New clock: GstSystemClock</div></div><div><div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_event_new_new_segment_full: assertion `position != -1' failed</div>
</div><div><div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_mini_object_ref: assertion `mini_object != NULL' failed</div></div><div><div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_pad_push_event: assertion `event != NULL' failed</div>
</div><div><div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_event_new_new_segment_full: assertion `position != -1' failed</div></div><div><div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_mini_object_ref: assertion `mini_object != NULL' failed</div>
</div><div><div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_pad_push_event: assertion `event != NULL' failed</div></div><div><div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_event_new_new_segment_full: assertion `position != -1' failed</div>
</div><div><div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_mini_object_ref: assertion `mini_object != NULL' failed</div></div><div><div><br></div></div><div><div>(gst-launch-0.10:14805): GStreamer-CRITICAL **: gst_pad_push_event: assertion `event != NULL' failed</div>
</div><div><div><br></div></div><div><br></div><div>...</div><div><br></div><div><br></div><div><div>Got EOS from element "pipeline0".</div></div><div><div>Execution ended after 1654760008 ns.</div></div><div><div>
Setting pipeline to PAUSED ...</div></div><div><div>Setting pipeline to READY ...</div></div><div><div>Setting pipeline to NULL ...</div></div><div><div>Freeing pipeline ...</div></div></blockquote><div><br></div><div><br>
</div><div>I'll still get the same problem whenever I use the mpegtsdemux, even if it follows mpegpsdemux, above.</div><div><br></div><div>I don't understand this, since I haven't even picked a PID yet.</div>
<div>
<br></div><div><br></div><div>What am I doing wrong?</div><div><br></div><div>Dustin</div><div><br></div>