[mythtv-users] Help with playback issue on recordings from a single channel

John Pilkington johnpilk222 at gmail.com
Mon Dec 27 09:06:06 UTC 2021

On 27/12/2021 01:53, Stephen Worthington wrote:
> On Sun, 26 Dec 2021 15:16:01 +0000 (UTC), you wrote:
>> So yesterday was not a good day to lock up my machine so I didn't test ffmpeg on the sample I uploaded.   Honestly I was worried 6 minutes wasn't going to be enough but I tried it today and it did lock up my machine about three or four minutes in.  I got impatient and switched away from terminal while it was running so I don't have the exact timestamp/frame where it locked up.   I can do it again if this would be helpful.
>> Please try
>> ffmpeg -i 1504_20211225153600.ts  -vcodec libx264 -crf 24 -tune film -acodec copy 1504_20211225153600.libx264.ts
>> and let me know if it completes.
>> Since mine locks up, does this mean there is a bug in my AMD CPU?
>> I notice this in my output:
>> [libx264 @ 0x5567615eaac0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA3 BMI1
> So running the ffmpeg command causes the PC to lock up?  That should
> not be able to lock up the PC, as it does not involve the use of
> drivers or anything else that runs on ring 0 of the CPU, so even if
> something went badly wrong with the ffmpeg process, it would be easy
> to just kill it from the command line and everything else would just
> keep working.
> So if ffmpeg is locking up the PC, the obvious cause of that is
> overheating.  When you run ffmpeg with a "-vcodec libx264" option,
> that is causing it to convert the existing video stream to H.264,
> which is a very CPU intensive operation.  If the CPU is having
> problems with its cooling, that much CPU use is likely to trigger
> either an emergency shutdown of the CPU, or a lockup.  When did you
> last clean the CPU heatsink and fan to remove all the dust?
> It is also possible in a PC that old that the heatsink compound
> between the CPU and the heatsink has dried out and is no longer
> transferring the heat to the heatsink properly.  That is a bit more
> difficult to fix, as you would have to get some new heatsink compound,
> remove the heatsink from the CPU, clean off the old heatsink compound,
> apply the new (making sure it was spread around properly and not too
> thin or thick) and then reinstall the heatsink and fan.  There is
> likely video out there to show you exactly how.

Specifying the -vcodec libx264 was presumably to clean up an h264 input 
file, but that isn't what you've got.  It's mpeg2video.  So -vcodec copy 
would be more appropriate and *much* less cpu intensive.  Maybe you have 
thermal problems anyway, or maybe the recording process was defective, 
but the tools I used suggested that the timestamps weren't as expected, 
and rebuilding the seektable by itself may not be enough.

For one of the muxes that I get here, the initial recording appears to 
be at 50 fps, interlaced, bottom first.  After a -vcodec copy it emerges 
as 25 fps and things work as intended.   My extra tweaks in the ffmpeg 
command line usually work for me but probably aren't essential here.

John P

More information about the mythtv-users mailing list