This patch permits to use the timing map present in the IFO files and next refine the search in the demuxer, consequently -ss (and seeking in general) works better. With the old code (still usable with -noifoseek) I've seen up to 30 seconds of difference between the required time and the one obtained, so IMO this new seeking method is a serious improvement over the previous one. If no one objects I'll commit this patch tomorrow. Nico
Nico Sabbi wrote:
This patch permits to use the timing map present in the IFO files and next refine the search in the demuxer, consequently -ss (and seeking in general) works better.
With the old code (still usable with -noifoseek) I've seen up to 30 seconds of difference between the required time and the one obtained, so IMO this new seeking method is a serious improvement over the previous one.
If no one objects I'll commit this patch tomorrow.
For those to whom my response seems a bit out of context, I tested a couple earlier revisions of this patch before Nico posted it to the list. Anyway: This works very well now on The Fellowship of the Ring, but still has problems with Star Wars. I assume the problem is due to the PTS resets -- it happens in their vicinity, both in the beginning of the movie and at the reset near the middle. Here's a bit more detail. - When the current position is a little past one of the early resets, seeking forward by 10s or 60s jumps back to an earlier position. - When the current position is far past the early resets, all seeking is fine, until: - When the current position is past the mid-movie reset, seeking by 10s, 60s, or 600s jumps back to near the beginning of the movie. - 'mplayer -ss xxxx' hits EOF when xxxx is past the mid-movie PTS reset, even if xxxx is less than the actual movie length. Actually, the old code can't handle that either, but it would be really nice to have, since -ss is nearly useless for seeking in such DVDs. Nico, is there any more information I can provide short of mailing you the DVD? :) -Corey
Corey Hickey wrote:
For those to whom my response seems a bit out of context,
what response? did I lose something?
I tested a couple earlier revisions of this patch before Nico posted it to the list. Anyway:
This works very well now on The Fellowship of the Ring, but still has problems with Star Wars. I assume the problem is due to the PTS resets -- it happens in their vicinity, both in the beginning of the movie and at the reset near the middle. Here's a bit more detail.
- When the current position is a little past one of the early resets, seeking forward by 10s or 60s jumps back to an earlier position. - When the current position is far past the early resets, all seeking is fine, until: - When the current position is past the mid-movie reset, seeking by 10s, 60s, or 600s jumps back to near the beginning of the movie. - 'mplayer -ss xxxx' hits EOF when xxxx is past the mid-movie PTS reset, even if xxxx is less than the actual movie length. Actually, the old code can't handle that either, but it would be really nice to have, since -ss is nearly useless for seeking in such DVDs.
Nico, is there any more information I can provide short of mailing you the DVD? :)
-Corey
please, resend the output of ifo_dump of Star Wars: the one you sent me is either broken or plain wrong, because there are no timings. And make sure you are using this last patch, please. Thanks, Nico
Nico Sabbi wrote:
Corey Hickey wrote:
For those to whom my response seems a bit out of context,
what response? did I lose something?
No, that was just so other people wouldn't get confused. :)
I tested a couple earlier revisions of this patch before Nico posted it to the list. Anyway:
This works very well now on The Fellowship of the Ring, but still has problems with Star Wars. I assume the problem is due to the PTS resets -- it happens in their vicinity, both in the beginning of the movie and at the reset near the middle. Here's a bit more detail.
- When the current position is a little past one of the early resets, seeking forward by 10s or 60s jumps back to an earlier position. - When the current position is far past the early resets, all seeking is fine, until: - When the current position is past the mid-movie reset, seeking by 10s, 60s, or 600s jumps back to near the beginning of the movie. - 'mplayer -ss xxxx' hits EOF when xxxx is past the mid-movie PTS reset, even if xxxx is less than the actual movie length. Actually, the old code can't handle that either, but it would be really nice to have, since -ss is nearly useless for seeking in such DVDs.
Nico, is there any more information I can provide short of mailing you the DVD? :)
please, resend the output of ifo_dump of Star Wars: the one you sent me is either broken or plain wrong, because there are no timings. And make sure you are using this last patch, please.
Yes, I'm using the latest patch. for ((i=0 ; i <= 16 ; ++i)) ; do ifo_dump /cdrom $i &> ifo_dump.$i ; done I'm going to send you the output of that command separately -- it's 117K compressed. -Corey
Corey Hickey wrote:
Nico Sabbi wrote:
please, resend the output of ifo_dump of Star Wars: the one you sent me is either broken or plain wrong, because there are no timings. And make sure you are using this last patch, please.
Yes, I'm using the latest patch.
for ((i=0 ; i <= 16 ; ++i)) ; do ifo_dump /cdrom $i &> ifo_dump.$i ; done
I'm going to send you the output of that command separately -- it's 117K compressed.
-Corey
from the log you sent me I've seen that timers may reset at MAP boundaries, in this case the patch won't work correctly. Obviously it needs more work, so commit delayed. Nico
This patch permits to use the timing map present in the IFO files and next refine the search in the demuxer, consequently -ss (and seeking in general) works better.
Should have read the patch.. It won't work no as you must find what vts you are playing. Think that should be available somewhere. This is the only part you should start counting time in. The you have the problem that many dvd's have quite a lot of discontinuities in their pts times. Atleast as what is given from the demuxer. I'm not sure how mplayer handles that. If you are able to get the current playback time without discontinuities (ie this is not the pts as given from demuxer), you should be able to find the correct sector from the tmap data. The problem is that pts - startingpts isn't good enough. Dvd's have many many places in them where the pts loops back. In the tmap data you can see those places by that extra flag set. Best way is to follow cells that are to played and accumulate the cell times up till the time you wish to get to (not counting cells that are not part of the angle being played). It's a pain to get this right even when playing dvd's properly using libdvdnav. not to mention that it is wrong in current libdvdnav source since it handles multple angles incorreclty, there is a patch for that on their sf page thou. I say, don't even bother untill the dvdnav patch is in place :). /elupus
Should have read the patch.. It won't work no as you must find what vts you are playing. Think that should be available somewhere. This is the only part you should start counting time in. The you have the problem that many dvd's have quite a lot of discontinuities in their pts times. Atleast as what is given from the demuxer. I'm not sure how mplayer handles that.
Hmm.. Sorry abit wrong.. The tmap index is the same as the pgc currently being played. Since pgc isn't being played in mplayer I'm not sure how to do it properly. /elupus
participants (3)
-
Corey Hickey -
elupus -
Nico Sabbi