<br><br>
<div><span class="gmail_quote">On 03/10/2007, <b class="gmail_sendername">Steve Smith</b> &lt;<a href="mailto:st3v3.sm1th@gmail.com">st3v3.sm1th@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div><span class="e" id="q_11566bacb332cca5_0"><br><br>
<div><span class="gmail_quote">On 02/10/2007, <b class="gmail_sendername">Justin Hornsby</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:justin.hornsby@gmail.com" target="_blank">justin.hornsby@gmail.com
</a>&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I&#39;ve noticed this on my minimyth-based frontend on every release since<br>0.20-19.&nbsp;&nbsp;It makes playback of BBC recordings (frankly the only stuff 
<br>I want to watch is on BBC channels) hard going with gappy playback<br>every 10 to 20 seconds.&nbsp;&nbsp;If I disabled deinterlacing (eew) it&#39;d play<br>just fine.&nbsp;&nbsp;Problem with xvmc on my box is that it _really_ needs it<br>
to play back SDTV so I can&#39;t say if turning it off helps!<br><br>I investigated the problem &amp; found that stripping the Audio<br>Description track with ffmpeg (ffmpeg -i $inputfile -acodec copy<br>-vcodec copy $outputfile), then redoing the seektable on the file 
<br>cures the problem.&nbsp;&nbsp;It&#39;s a workaround but too much of a headache to do<br>for every recording.<br>Running the file through ffmpeg also strips out junk which is part of<br>the stream, so maybe the AD track isn&#39;t the whole story in my case. 
<br><br>Anyway - Steve you said you&#39;ve got a hackish solution to the problem<br>where you don&#39;t bother recording the AD track.&nbsp;&nbsp;Could you ever see<br>yourself tidying that up so that it can become a setting?&nbsp;&nbsp;Or letting 
<br>us see the code change?&nbsp;&nbsp;worth a go.&nbsp;&nbsp;If nothing else it&#39;d end up<br>saving a lot of HDD space for those of us who don&#39;t need AD &amp;<br>subtitles.<br><br>Regards,<br>Justin<br>_______________________________________________ 
<br>mythtv-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank">
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users </a><br></blockquote></div></span></div>
<div><br>Justin,</div>
<div>&nbsp;</div>
<div>I&#39;ll see if I get time... at the moment it&#39;s linked to the recording profiles...so that if you select</div>
<div>&quot;TV only&quot; it only records Video+1st Audio.</div>
<div>&nbsp;</div>
<div>I&#39;ll look on Fri evening to see if I can dig out the code changes I made. They&#39;re not huge.</div>
<div>&nbsp;</div>
<div>I&#39;ve been using it now for several months without a hitch. (Even though theoretically, selecting</div>
<div>only the 1st audio track it finds, could result in a duff recording)</div>
<div>&nbsp;</div>
<div>Someone else could change it to a genuine setting perhaps....</div>
<div>&nbsp;</div>
<div>Cheers</div><span class="sg">
<div>&nbsp;</div>
<div>Steve</div>
<div>&nbsp;</div>
<div>&nbsp;</div></span></blockquote></div>
<div><br>Finally got chance to have a look at what I&#39;ve done:</div>
<div>&nbsp;</div>
<div>Unfortunately I didn&#39;t take a reference copy before I did the edits so no fancy diffs here...</div>
<div>The changes are to libs/libmythtv/dvbrecorder.cpp</div>
<div>The updated function CreatePMT is below:</div>
<div>(YES the coding is rubbish, YES I should submit a patch..etc...etc... it&#39;s a proof of concept I have got around to doing it properly!)</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>======================================</div>
<div><font size="2">
<p>void DVBRecorder::CreatePMT(void)</p>
<p>{</p>
<p>QMutexLocker read_lock(&amp;_pid_lock);</p>
<p>VERBOSE(VB_RECORD, LOC + &quot;CreatePMT(void) INPUT\n\n&quot; +</p>
<p>_input_pmt-&gt;toString());</p>
<p>// Figure out what goes into the PMT</p>
<p>uint programNumber = 1; // MPEG Program Number</p>
<p></p>
<p>desc_list_t gdesc = MPEGDescriptor::ParseAndExclude(</p>
<p>_input_pmt-&gt;ProgramInfo(), _input_pmt-&gt;ProgramInfoLength(),</p>
<p>DescriptorID::conditional_access);</p>
<p>vector&lt;uint&gt; pids;</p>
<p>vector&lt;uint&gt; types;</p>
<p>vector&lt;desc_list_t&gt; pdesc;</p>
<p>bool addVideoPid = true;</p>
<p>bool found_audio_already = false;</p>
<p>for (uint i = 0; i &lt; _input_pmt-&gt;StreamCount(); i++)</p>
<p>{</p>
<p>desc_list_t desc = MPEGDescriptor::ParseAndExclude(</p>
<p>_input_pmt-&gt;StreamInfo(i), _input_pmt-&gt;StreamInfoLength(i),</p>
<p>DescriptorID::conditional_access);</p>
<p>uint type = StreamID::Normalize(_input_pmt-&gt;StreamType(i), desc);</p>
<p>// Filter out streams not used for basic television</p>
<p>if (_recording_type == &quot;tv&quot; &amp;&amp;</p>
<p>!StreamID::IsAudio(type) &amp;&amp;</p>
<p>!StreamID::IsVideo(type) &amp;&amp;</p>
<p>!MPEGDescriptor::Find(desc, DescriptorID::teletext) &amp;&amp;</p>
<p>!MPEGDescriptor::Find(desc, DescriptorID::subtitling))</p>
<p>{</p>
<p>continue;</p>
<p>}</p>
<p>uint pid = _input_pmt-&gt;StreamPID(i);</p>
<p>if (_recording_type == &quot;tv&quot; &amp;&amp;</p>
<p>StreamID::IsAudio(type) &amp;&amp;</p>
<p>found_audio_already )</p>
<p>{</p>
<p>printf(&quot;Steves strict audio Discarding audio stream with pid %d\n&quot;,_input_pmt-&gt;StreamPID(i));</p>
<p>continue;</p>
<p>}</p>
<p>if ( StreamID::IsAudio(type) )</p>
<p>{</p>
<p>printf(&quot;Steves strict audio. Using audio stream with pid %d\n&quot;,_input_pmt-&gt;StreamPID(i));</p>
<p>found_audio_already = true;</p>
<p>}</p>
<p>pdesc.push_back(desc);</p>
<p>pids.push_back(pid);</p>
<p>types.push_back(type);</p>
<p>if (pid == _dummy_output_video_pid)</p>
<p>addVideoPid = false;</p>
<p>}</p>
<p>if (addVideoPid)</p>
<p>{</p>
<p>desc_list_t dummy;</p>
<p>pdesc.push_back(dummy);</p>
<p>pids.push_back(_dummy_output_video_pid);</p>
<p>types.push_back(StreamID::MPEG2Video);</p>
<p>}</p>
<p>// Create the PMT</p>
<p>ProgramMapTable *pmt = ProgramMapTable::Create(</p>
<p>programNumber, _pmt_pid, _input_pmt-&gt;PCRPID(),</p>
<p>_next_pmt_version, gdesc,</p>
<p>pids, types, pdesc);</p>
<p>// Set the continuity counter...</p>
<p>if (_pmt)</p>
<p>{</p>
<p>uint cc = (_pmt-&gt;tsheader()-&gt;ContinuityCounter()+1) &amp; 0xf;</p>
<p>pmt-&gt;tsheader()-&gt;SetContinuityCounter(cc);</p>
<p>}</p>
<p>VERBOSE(VB_RECORD, LOC + &quot;CreatePMT(void) OUTPUT\n\n&quot; +</p>
<p>pmt-&gt;toString());</p>
<p>SetOutputPMT(pmt);</p>
<p>}</p>
<p>====================================</p>
<p>I&#39;ll leave you guys to figure out what the diff should look like....</p>
<p>Cheers</p>
<p>&nbsp;</p>
<p>Steve</p>
<p>&nbsp;</p></font></div>