<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Feb 5, 2016 at 9:33 AM, David Parker <span dir="ltr"><<a href="mailto:parker.david.a@gmail.com" target="_blank">parker.david.a@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, Feb 5, 2016 at 7:33 AM, John Pilkington <span dir="ltr"><<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On 05/02/16 04:35, David Parker wrote:<br>
<br>
<snip><span><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I haven't had a chance to try the lossless transcode yet, but I did<br>
verify that this is only a MythTV issue. I recorded a program from this<br>
troublesone channel, and it has consistently had choppy audio and video<br>
every time I've watched the recording in MythTV. I copied the mpeg file<br>
from the "recorded" directory to another PC with far worse hardware and<br>
an older version of Debian. The video played flawlessly in Xine on the<br>
other PC.<br>
</blockquote>
<br></span>
Have you looked at the frontend log, perhaps with -v playback? There are other tools you could use to examine the file (vlc, mediainfo) but it doesn't sound as if your problems are with faulty or noisy capture.<br>
<br>
There are ways of filtering out unwanted streams; mythutil --help shows several tools for mpeg-ts files (which I have never tried) and I routinely use a script to do it - but it would be better to get the recorder to do that rather than try to fix things later. There are a few options in mythtvsetup.<br>
<br>
HP-mini had some good suggestions too, but I won't copy them here.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
What's really got me scratching my head is the fact that this one single<br>
channel is choppy when I watch it live through MythTV, too. So for some<br>
reason, MythTV is having issues with the data coming from the tuner for<br>
this one particular channel. Same channel which MythTV couldn't even<br>
find until I told it where to look.<br>
<br>
The channel is crystal clear on the TV.<br></blockquote></span></blockquote><div><br></div></span>Thanks for the suggestions, guys. I'll give these a try. I want to avoid troubleshooting this as an issue with the stream itself, though. As I said before, if I take the mpeg recorded by MythTV and play it in another player (such as Xine), it's fine. So this seems to only be an issue with MythTV's playback of the recording, and only seems to be with recordings from that particular channel. It's very strange.<div><br></div><div>I'll try some of these suggestions and post back my results.</div><div><br></div><div>Thanks! </div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">As a quick first test, I tried playing a few videos through MythTV with "-v playback" set, as John suggested.</div><div class="gmail_extra"><br></div><div class="gmail_extra">For a problematic recording, the following lines were logged by avformatdecorder.cpp which may be useful (timestamps and thread info removed for brevity):</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">CoreContext avformatdecoder.cpp:980 (InitByteContext) - AFD: Buffer size: 32768 streamed 0 seekable 1</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2099 (ScanStreams) - AFD: Stream #0, has id 0x6f codec id MPEG2VIDEO, type Video, bitrate 0 at 0x308b360</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2099 (ScanStreams) - AFD: Stream #1, has id 0x70 codec id AC3, type Audio, bitrate 384000 at 0x30708e0</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2141 (ScanStreams) - AFD: codec AC3 has 6 channels</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2198 (ScanStreams) - AFD: Looking for decoder for AC3</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2632 (OpenAVCodec) - AFD: Opened codec 0x3084b40, id(AC3) type(Audio)</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2099 (ScanStreams) - AFD: Stream #2, has id 0x71 codec id AC3, type Audio, bitrate 192000 at 0x3084fa0</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2141 (ScanStreams) - AFD: codec AC3 has 2 channels</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2198 (ScanStreams) - AFD: Looking for decoder for AC3</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2632 (OpenAVCodec) - AFD: Opened codec 0x3095900, id(AC3) type(Audio)</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2340 (ScanStreams) - AFD: Trying to select best video track</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2376 (ScanStreams) - AFD: Selected track #0 (id 0x6f codec id MPEG2VIDEO, type Video, bitrate 500000 at 0x308b360)</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2511 (ScanStreams) - AFD: Using 0 CPUs for decoding</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:1556 (InitVideoCodec) - AFD: InitVideoCodec() 0x308b640 id(MPEG2VIDEO) type (Video).</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:1460 (normalized_fps) - AFD: Selected FPS is 59.9401 (avg 59.9401 codec 59.9401 container 90000 estimated 59.9401)</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:1918 (UpdateATSCCaptionTracks) - AFD: EIA-608 caption service #1 is in the Unknown language.</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2523 (ScanStreams) - AFD: Using ffmpeg for video decoding</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2632 (OpenAVCodec) - AFD: Opened codec 0x308b640, id(MPEG2VIDEO) type(Video)</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:1359 (OpenFile) - AFD: Position map found</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:1364 (OpenFile) - AFD: Successfully opened decoder for file: "/mnt/data/recorded/1115_20160204170000.mpg". novideo(0)</div><div class="gmail_extra"><br></div><div class="gmail_extra">Then the video began playing, choppy as always. The log was filled with lines like this:</div><div class="gmail_extra"><br></div></div><div class="gmail_extra"><div class="gmail_extra">CoreContext mythplayer.cpp:1967 (AVSync) - Player(0): Video is 3.2288 frames ahead of audio,<br></div><div class="gmail_extra"> doubling video frame interval to slow down.</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1115_20160204170000.mpg): safe_read(...@786432, 32768) -> 32768, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">CoreContext mythplayer.cpp:1967 (AVSync) - Player(0): Video is 3.50501 frames ahead of audio,</div><div class="gmail_extra"> doubling video frame interval to slow down.</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1115_20160204170000.mpg): safe_read(...@819200, 32768) -> 32768, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">CoreContext mythplayer.cpp:1967 (AVSync) - Player(0): Video is 3.45711 frames ahead of audio,</div><div class="gmail_extra"> doubling video frame interval to slow down.</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1115_20160204170000.mpg): safe_read(...@851968, 32768) -> 32768, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">CoreContext mythplayer.cpp:1967 (AVSync) - Player(0): Video is 3.1661 frames ahead of audio,</div><div class="gmail_extra"> doubling video frame interval to slow down.</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1115_20160204170000.mpg): safe_read(...@884736, 32768) -> 32768, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1115_20160204170000.mpg): safe_read(...@917504, 65536) -> 65536, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1115_20160204170000.mpg): safe_read(...@983040, 32768) -> 32768, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1115_20160204170000.mpg): safe_read(...@1015808, 32768) -> 32768, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">CoreContext mythplayer.cpp:1967 (AVSync) - Player(0): Video is 3.25613 frames ahead of audio,</div><div class="gmail_extra"> doubling video frame interval to slow down.</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1115_20160204170000.mpg): safe_read(...@1048576, 65536) -> 65536, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">CoreContext mythplayer.cpp:1967 (AVSync) - Player(0): Video is 3.34328 frames ahead of audio,</div><div class="gmail_extra"> doubling video frame interval to slow down.</div><div class="gmail_extra">CoreContext mythplayer.cpp:1967 (AVSync) - Player(0): Video is 3.15387 frames ahead of audio,</div><div class="gmail_extra"> doubling video frame interval to slow down.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Then I played a video recorded off a different HD channel, which plays fine. The avformatdecoder.cpp messages for this file were as follows:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">CoreContext avformatdecoder.cpp:980 (InitByteContext) - AFD: Buffer size: 32768 streamed 0 seekable 1</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2099 (ScanStreams) - AFD: Stream #0, has id 0x79 codec id MPEG2VIDEO, type Video, bitrate 0 at 0x33ed0a0</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2099 (ScanStreams) - AFD: Stream #1, has id 0x7a codec id AC3, type Audio, bitrate 384000 at 0x33deb60</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2141 (ScanStreams) - AFD: codec AC3 has 2 channels</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2198 (ScanStreams) - AFD: Looking for decoder for AC3</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2632 (OpenAVCodec) - AFD: Opened codec 0x3589be0, id(AC3) type(Audio)</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2099 (ScanStreams) - AFD: Stream #2, has id 0x7b codec id AC3, type Audio, bitrate 128000 at 0x35c1f20</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2141 (ScanStreams) - AFD: codec AC3 has 2 channels</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2198 (ScanStreams) - AFD: Looking for decoder for AC3</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2632 (OpenAVCodec) - AFD: Opened codec 0x33ffe80, id(AC3) type(Audio)</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2340 (ScanStreams) - AFD: Trying to select best video track</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2376 (ScanStreams) - AFD: Selected track #0 (id 0x79 codec id MPEG2VIDEO, type Video, bitrate 500000 at 0x33ed0a0)</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2511 (ScanStreams) - AFD: Using 0 CPUs for decoding</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:1556 (InitVideoCodec) - AFD: InitVideoCodec() 0x360c000 id(MPEG2VIDEO) type (Video).</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:1460 (normalized_fps) - AFD: Selected FPS is 29.97 (avg 29.97 codec 29.97 container 90000 estimated 29.97)</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:1918 (UpdateATSCCaptionTracks) - AFD: EIA-708 caption service #1 is in the English language.</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2523 (ScanStreams) - AFD: Using ffmpeg for video decoding</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:2632 (OpenAVCodec) - AFD: Opened codec 0x360c000, id(MPEG2VIDEO) type(Video)</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:1359 (OpenFile) - AFD: Position map found</div><div class="gmail_extra">CoreContext avformatdecoder.cpp:1364 (OpenFile) - AFD: Successfully opened decoder for file: "/mnt/data/recorded/1241_20160204160000.mpg". novideo(0)</div><div class="gmail_extra"><br></div><div class="gmail_extra">There were a handful of those "doubling video frame interval to slow down" messages logged within the first second that the video was playing, but after that, all of the messages while it played looked like this:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1241_20160204160000.mpg): safe_read(...@3145728, 32768) -> 32768, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1241_20160204160000.mpg): safe_read(...@3178496, 32768) -> 32768, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1241_20160204160000.mpg): safe_read(...@3211264, 32768) -> 32768, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1241_20160204160000.mpg): safe_read(...@3244032, 98304) -> 98304, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra">RingBuffer ringbuffer.cpp:1037 (run) - RingBuf(/mnt/data/recorded/1241_20160204160000.mpg): safe_read(...@3342336, 65536) -> 65536, took 0 ms (1000Mbps) avg 187 ms</div><div class="gmail_extra"><br></div><div class="gmail_extra">I noticed that the AC3 audio bitrate of the choppy video is 192000, while that of the stable video is 128000. I also noticed that the selected framerate of the choppy video was ~60 FPS, whereas that of the stable video was ~30 FPS. Still, it seems that 60 FPS and an audio bitrate of 192000 should be handled easily by this PC (AMD Phenom II X3 2.8 GHz, 4 GB RAM).</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks!</div><div class="gmail_extra">Dave</div></div></div></div></div>