[MPlayer-users] DVD seeking and byte position

Thorben Kröger thorbenk at gmx.net
Fri Jan 28 13:54:09 CET 2005


Hello,
I want to rip small sequences from a dvd using mplayer/mencoder to cut 
different scenes from different movies together. Let's say I want the segment 
starting from position 00:35:06, I could use "mplayer dvd://1 -ss 00:35:06". 
However, this does not always work, because dvd seeking isn't accurate. So I 
might end up at position 00:40:00 or somewhere else and get a totally 
different segment.
Reading the manpage, I noticed that there is a -sb option to seek to a byte 
position, and this does work with DVDs, too.
However, I have no idea how to display the current byte position with mplayer.
If I could do that (and seeking to byte position is more accurate than seeking 
with -ss) I could simply play the dvd with mplayer and find the scene I want, 
then note down the byte position which mplayer could display in some sort of 
debug output and then fire up mencoder and encode the sequence I want.

Would this be possible?
All I think would be needed is for someone who knows about mplayer code to 
tell me where I should put some printfs, so the current byte position is spit 
out for example when pause is pressed. I can compile mplayer myself and would 
be quite happy to test any suggestions.

I already asked on #mplayerdev and someone suggested to look at 
libmpdvdkit2/dvd_reader.c, Function DVDFileSeek. I put a printf there but 
apparently this function is only called when reading the menustructure. 

Thanks for any ideas,
Thorben




More information about the MPlayer-users mailing list