Matthieu Weber wrote: > On Mon 21.06.2004 at 09:26:38AM +0200, Dirk Meyer wrote: >> o does someone has a link to a ts spec? I would like to include > > I don't, but if you're not afraid of reading code, take a look at > libdvbmpeg.
I'm not afraid, I did it for some mpeg length stuff. But I prefer a nice doc. I found one and your link is a good addition. I have a small piece of code detecting that the file is a ts or not by scanning the first 2 * 188 - 1 bytes. >> support for it into mmpython: >> - get length of the file > > Probably by calculating a difference between the first and last PTS in > one of the streams? But the PTS can be reset to 0 at some point in the > stream, so scanning of the whole file might be needed in this case (and > scanning 5 GB takes time...). Resetting is bad :-( Maybe scan in 10 MB intervall, not everything. I need to find out. One second: resetting may not be bad. Maybe they reset when a new show. It could be possible to use this to faster skip through the file. I need some test recordings to find out. But this is something post 1.5 > You cannot rely on the bitrate announced in the stream to calculate > the length based on the file's size(in Finland, it is always set to > 10 Mbps, but the actual bitrate of the video stream is different). I know. > Btw, my (old, from last December) Freevo always shows wrong durations > for MPEG (either DVD, rips from DVDs, or PS converted from DVB's TS). > What's the reason for that? Is it fixed in the current version? Yes Dischi -- Always remember you're unique, just like everyone else. ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users