[mythtv-users] Smooth playback on BBC HD 1080 h.264 - at last a solution :-)
John
reidjr at btconnect.com
Thu May 31 21:57:32 UTC 2007
John wrote:
> However Mythtv is still doing somthing odd with the Sync between
> Audio and Video which is leading to it detecting the audio falling out
> of sync with the video, and then dropping video frames to resync.
>
I found that vlc did not drop frames, but Mythtv internal player did, so
in desperation I tried re-muxing the BBC-HD stream with vlc. It works :-)
Myth internal player is dropping frames for reasons other than pure cpu
grunt. I can't solve that myself, and I have yet to raise any interest
from the people who can. I guess there are no BBC watching devs around
at the moment :-( http://cvs.mythtv.org/trac/ticket/3465
So for any of you UK based people, what I did find was a workaround. It
has no error checking, so make sure you try it out on recordings you can
replace.
Add a User job in mythtv-setup,
[mythtv-setup ->General -> User Jobs.]
User Job #1
/myth/scripts/hdremuxreplace.sh %DIR% %FILE%
This calls a simple (too simple - no error checking) bash script , and
passes the recording directory and filename to it.
#!/bin/bash
# $1 %DIR% $2 %File%
echo "remux $1/$2 and replace - deleting original"
vlc -I dummy "$1/$2" --sout
"#duplicate{dst=std{access=file,mux=ts,dst=$1/$2.new}" :sout-all vlc:quit
mv $1/$2.new $1/$2
mythcommflag --rebuild -f $1/$2
This remuxes using vlc, replaces the original, and rebuilds the seek
table. (does NOT reencode, so only takes a few minutes for an hour
program). Before the re-mux, my frontend was dropping huge numbers of
frames. After re-mux, the same recording was playing smoothly :-))
I also set up a second user Job, which leaves the original alone, and
places a named copy of the program in the video directory, this is a
non-destructive way to play around, and you then watch the result with
the internal player but through the video menu. As I have ommited the
":sout-all" only the video, and the Mpa audio channels are retained. My
video directory is /myth/video
User Job #2
/myth/scripts/hdremuxcopyvidmp3only.sh %DIR% %FILE% "%TITLE%"
"%STARTTIMEISO%" /myth/video
Calls this script:
#!/bin/bash
# $1 %DIR% $2 %File% $3 %TITLE% $4 %STARTTIMEISO% $5 destination directory
echo "remux $1/$2 and copy to $5 as $3_$4.mpa.mpg"
vlc -I dummy "$1/$2" --sout
"#duplicate{dst=std{access=file,mux=ts,dst=$5/$3_$4.mpa.mpg}}" vlc:quit
mythcommflag --video "$5/$3_$4.mpa.mpg"
So I can set up my BBC HD recordings now to automatically remux
themselves, or use the frontend to remux them before watching. Watching
under mythtvfrontend now only drops frames due to CPU overload.
This is all pretty brute force, but it works, and is the best I can do
till somebody who really knows what they are doing looks at the internal
Player.
Please post back if this works for you, or if you have any better ideas.
I cant be the only Mythtv user trying to watch BBC-HD .........can I ?
John
More information about the mythtv-users
mailing list