[mythtv] [mythtv-commits] Ticket #4222: Update MythMusic to continue playing in the background after exiting it.
Stuart Morgan
stuart at tase.co.uk
Tue Jan 1 14:47:41 UTC 2008
On Tuesday 01 January 2008 13:52:43 Ashley Bostock wrote:
> mplayer, xine, etc... will play most files you throw at them and
> ffwd/rewind without issue. For the Internal player you have to make sure
> you have pre-built a seek table for each file otherwise it doesn't
> ffwd/rewind at all, or is very jumpy, and/or you get sound still playing
> while it does so. I think most people are put off straight away when that
> doesn't work and just switch to using an external player. Once that part
> gets automated I think more people will use it. On a side note, any idea
> why myth needs the seek table to be built when mplayer, xine, etc... don't
> have any problems at all? Only time I've been prompted by mplayer or xine
> to rebuld one (assuming that's the same thing) is if I have a slightly
> broken avi file. Aren't these stored in the file already?
>
> Ash
The seeking without a seektable is a little broken in trunk, it needs fixing
but it's off the radar of most devs because recordings will generally have
seektables. It shouldn't be hard to do though and if someone opens a ticket
it will probably get fixed for 0.21.
To explain the reason for building seektables I'm just going to
copy/edit/paste what I said in IRC last night to this same question:
By building a seektable mythtv can do frame accurate skipping and smoother
ffw/rew etc. Notice that mplayer/xine don't really offer ffw/rew.
In order to skip etc you need to move the read pointer ahead in the file. So
you need to know what point in the file is equal to the time unit used. e.g.
1 minute might be 36,163 bytes ahead in the file.
Mplayer/xine etc just make guesses based on average bitrate, so although you
are asking them to skip 1 minute forward in the video, they might actually do
anything from 45 seconds to 1 minutes 15 seconds.
When you build a seektable in mythtv, we go through the file at high speed and
record the location of every keyframe, so when you skip 1 minute you move
exactly one minute in the video. We are not performing calculations to work
out the correct byte/jump amount and can skip much faster, thus allowing
FFW/REW as well as accuracy down to the exact frame of video.
--
Stuart Morgan
More information about the mythtv-dev
mailing list