Page 1 of 1

Seeking MPEGs very imprecise

Posted: 09 Apr 2009 16:01
by bfcapell
Hello,
I noticed a problem when playing mpeg files. If I try to seek to a specific time, it will do it but with a poor precision. That means that e.g. if I seek to 00:04:00, it may go to 00:03:50, or to 00:04:20, seems quite arbitrary. The problem is bigger with bigger videos (trying to go to 30' in a 1h video can go to some minutes before or after). But it works more acceptably if I seek to near the beginning or the end of the video.
Here are the details of my environment. Tried in:
- Ubuntu / Windows xp
- VLC 0.9.8a, 0.9.9a
- mpeg1 and mpeg2 ps files, from different sources, and they all fail. FLV or AVI files seek perfectly, that's why I think this is mpeg-specific.
Any thoughts about why this is happening?

Re: Seeking MPEGs very imprecise

Posted: 10 Apr 2009 18:25
by The DJ
Quite correct, this is because mpeg files are not indexed file formats, and also can be very "lossy" (dropped data packets, corruptions etc). As such, it is much more difficult to do exact searching, without pre-parsing the entire file.

Re: Seeking MPEGs very imprecise

Posted: 13 Apr 2009 19:25
by bfcapell
Hi again, thanks for your answer. Is there a way to do this pre-parsing? Or if I want to seek with more precision, my best bet is simply to use another format?