<br><br>
<div><span class="gmail_quote">On 03/10/2007, <b class="gmail_sendername">Steve Smith</b> <<a href="mailto:st3v3.sm1th@gmail.com">st3v3.sm1th@gmail.com</a>> 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> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:justin.hornsby@gmail.com" target="_blank">justin.hornsby@gmail.com
</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I've noticed this on my minimyth-based frontend on every release since<br>0.20-19. 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. If I disabled deinterlacing (eew) it'd play<br>just fine. Problem with xvmc on my box is that it _really_ needs it<br>
to play back SDTV so I can't say if turning it off helps!<br><br>I investigated the problem & 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. It'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't the whole story in my case.
<br><br>Anyway - Steve you said you've got a hackish solution to the problem<br>where you don't bother recording the AD track. Could you ever see<br>yourself tidying that up so that it can become a setting? Or letting
<br>us see the code change? worth a go. If nothing else it'd end up<br>saving a lot of HDD space for those of us who don't need AD &<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> </div>
<div>I'll see if I get time... at the moment it's linked to the recording profiles...so that if you select</div>
<div>"TV only" it only records Video+1st Audio.</div>
<div> </div>
<div>I'll look on Fri evening to see if I can dig out the code changes I made. They're not huge.</div>
<div> </div>
<div>I'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> </div>
<div>Someone else could change it to a genuine setting perhaps....</div>
<div> </div>
<div>Cheers</div><span class="sg">
<div> </div>
<div>Steve</div>
<div> </div>
<div> </div></span></blockquote></div>
<div><br>Finally got chance to have a look at what I've done:</div>
<div> </div>
<div>Unfortunately I didn'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's a proof of concept I have got around to doing it properly!)</div>
<div> </div>
<div> </div>
<div>======================================</div>
<div><font size="2">
<p>void DVBRecorder::CreatePMT(void)</p>
<p>{</p>
<p>QMutexLocker read_lock(&_pid_lock);</p>
<p>VERBOSE(VB_RECORD, LOC + "CreatePMT(void) INPUT\n\n" +</p>
<p>_input_pmt->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->ProgramInfo(), _input_pmt->ProgramInfoLength(),</p>
<p>DescriptorID::conditional_access);</p>
<p>vector<uint> pids;</p>
<p>vector<uint> types;</p>
<p>vector<desc_list_t> pdesc;</p>
<p>bool addVideoPid = true;</p>
<p>bool found_audio_already = false;</p>
<p>for (uint i = 0; i < _input_pmt->StreamCount(); i++)</p>
<p>{</p>
<p>desc_list_t desc = MPEGDescriptor::ParseAndExclude(</p>
<p>_input_pmt->StreamInfo(i), _input_pmt->StreamInfoLength(i),</p>
<p>DescriptorID::conditional_access);</p>
<p>uint type = StreamID::Normalize(_input_pmt->StreamType(i), desc);</p>
<p>// Filter out streams not used for basic television</p>
<p>if (_recording_type == "tv" &&</p>
<p>!StreamID::IsAudio(type) &&</p>
<p>!StreamID::IsVideo(type) &&</p>
<p>!MPEGDescriptor::Find(desc, DescriptorID::teletext) &&</p>
<p>!MPEGDescriptor::Find(desc, DescriptorID::subtitling))</p>
<p>{</p>
<p>continue;</p>
<p>}</p>
<p>uint pid = _input_pmt->StreamPID(i);</p>
<p>if (_recording_type == "tv" &&</p>
<p>StreamID::IsAudio(type) &&</p>
<p>found_audio_already )</p>
<p>{</p>
<p>printf("Steves strict audio Discarding audio stream with pid %d\n",_input_pmt->StreamPID(i));</p>
<p>continue;</p>
<p>}</p>
<p>if ( StreamID::IsAudio(type) )</p>
<p>{</p>
<p>printf("Steves strict audio. Using audio stream with pid %d\n",_input_pmt->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->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->tsheader()->ContinuityCounter()+1) & 0xf;</p>
<p>pmt->tsheader()->SetContinuityCounter(cc);</p>
<p>}</p>
<p>VERBOSE(VB_RECORD, LOC + "CreatePMT(void) OUTPUT\n\n" +</p>
<p>pmt->toString());</p>
<p>SetOutputPMT(pmt);</p>
<p>}</p>
<p>====================================</p>
<p>I'll leave you guys to figure out what the diff should look like....</p>
<p>Cheers</p>
<p> </p>
<p>Steve</p>
<p> </p></font></div>