[mythtv] MythRoku - trying to mimic mythfrontend frame seeking

Daniel Walton dwalton at cisco.com
Wed Feb 1 20:48:09 UTC 2006


I'm trying to improve the accuracy of 30sec FF and 10sec RW in MythRoku and this
has led me to several questions on how the mythfrontend handles this.  MythRoku
is a basic frontend for mythtv that runs on the Roku HD1000.  The box doesn't
have a lot of CPU horsepower but it is diskless, fanless, and has a hardware
MPEG2 decoder so it makes a nice HD frontend.

Currently frame seeking is done in mythroku by determining the average bytes
used per second of video and then jumping forward/backward that many bytes for
each second that you wish to skip.  Needless to say this isn't very accurate.

I have been reading the myth code to see how it handles frame seeking and from
what I can gather it:

- builds a position array so that it knows what the byte offset is in the mpeg
file for each frame

- knows the framerate for the mpeg file

- knows what frame is currently being displayed and can skip FF or RW X seconds
by multiplying the framerate * X and then lookup the byte offset for the
destination frame in the position array.

The MythRoku software doesn't have to do a lot of work to play the file,
basically it reads data from the backend and puts it in a buffer for the
hardware decoder to crunch though.  This means that MythRoku doesn't know what
the framerate is, doesn't know what frame is currently being displayed, and
doesn't have a position map to correlate each frame to a byte offset.  Someone
is already working on a way to figure out what frame is currently being
displayed so that leaves me with two questions:

- how can I determine the framerate for the file that is being played?

- how does the mythfrontend build it's position map without downloading the
entire file and crunching through it?  There has to be something here that I'm
missing because that just doesn't seem feasible.


Thanks
Daniel



More information about the mythtv-dev mailing list