[mythtv-users] Intermittent playback skips and log errors
steve
networks1 at cox.net
Fri Dec 30 00:41:08 UTC 2011
On 11/29/2011 9:06 AM, Mark Lord wrote:
> On 11-11-29 10:36 AM, Steve wrote:
>> On Nov 28, 2011, at 7:56 AM, Mark Lord<mythtv at rtr.ca> wrote:
> ..
>>> Easy fix: run ffmpeg to convert the audio tracks to AC3.
>>> I wrote a shell script to do this last evening, and the results
>>> are just fine -- everything I tried it on was instantly cured.
>>>
>>> Here's the script. Requires the "mediainfo" command.
>>> Feed it a list of video path/filenames as input.
>>> Output is to same_name.avi, or same_name-new.avi if old file was a .avi:
>>>
>>> #!/bin/bash
>>> # Fix stuttering audio:
>>>
>>> while [ "$1" != "" ]; do
>>> f="$1"
>>> shift
>>> aformat=$(mediainfo --inform="Audio;%Format%" "$f")
>>> if [ "$aformat" = "AAC" ]; then
>>> fname="${f%%.???}"
>>> out="$fname.avi"
>>> [ "$f" = "$out" ]&& out="$fname-new.avi"
>>> ffmpeg -i "$f" -vcodec copy -acodec ac3 -ab 384k "$out"
>>> else
>>> echo "$f: not AAC, skipped ($aformat)"
>>> fi
>>> done
>>>
>> Do you run that manually or is it automatically triggered somehow?
> I use it only for downloads that have the issue.
> You probably are thinking of using it for our HD-PVR recordings,
> in which case you should first just try it manually and see if
> the resulting file works better than the original or not.
>
> If it does work better, then it could be arranged to run
> as a "user job" after each new recording completes.
>
> You'd still have to run it manually (once) to treat your existing recordings.
> But first, just try it on one, and see if the result is better or not for you.
>
> Note that the script above does NOT overwrite or delete the original file,
> so there's no real risk. If you do end up wanting to use it on everything,
> you'll also probably want to modify that behaviour, to replace the original files.
>
> Cheers
>
OK I finally got some time to look into this. First, I couldn't find
the mediainfo command (or yum couldn't find it) so I verified via ffmpeg
that the audio is AAC then ran the suggested ffmpeg command manually.
While it was running, it put up these errors at several points:
packet too large, ignoring buffer limits to mux it
buffer underflow i=0 bufi=xxxxxx size=263972
where xxxxxx is a varying six digit integer. When it got done I tried
to play the resulting file with mplayer and got
[root at mythtv recordings]# mplayer testfix.mpg
MPlayer SVN-r33996-4.6.0 (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote
control.
Playing testfix.mpg.
MPEG-PS file format detected.
Too many video packets in the buffer: (4096 in 8354566 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
MPEG: No audio stream found -> no sound.
MPEG: FATAL: EOF while searching for sequence header.
Video: Cannot read properties.
No stream found.
Exiting... (End of file)
So clearly something did not go well with the rewrite.
BTW when I try to play the original file with mplayer it throws
multiples of the errors I originally wrote about, i.e.
2011-11-22 06:42:11.701 [h264 @ 0x35326f4f20]non-existing PPS 0
referenced
2011-11-22 06:42:11.701 [h264 @ 0x35326f4f20]decode_slice_header error
2011-11-22 06:42:11.701 [h264 @ 0x35326f4f20]no frame!
2011-11-22 06:42:11.753 [h264 @ 0x35326f4f20]mmco: unref short failure
Then says
Too many audio packets in the buffer (4096 in 1426713 bytes)
Maybe you are playing a non-interlaced stream/file or the codec failed?
Then it plays the file with the same audio stutters. Playing with the
non-interlaced option doesn't help.
The odd thing about all this is that I was playing things fine with the
exact same hardware before a system rebuild, except that I had to get a
new HDPVR (the reason I had to rebuild).
What to do?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20111229/744a2be9/attachment.html
More information about the mythtv-users
mailing list