PDA

View Full Version : How do players determine Playing Time (length)?


laserfan
24th November 2008, 17:29
When I make a .264 video (example: two-hour movie) using x264 (video only at that point), and I look at the .264, I get various results from different players:

1. Media Player Classic shows an inaccurate elapsed time along with a ~30 minute total runtime for a two hour movie (the elapsed time appearing to be a % of the 30 minutes)

2. PowerDVD is similar, but shows e.g. 68minutes as total runtime, again the "elapsed time" indicator looks like a percent of total e.g. halfway thru the movie is shown as 34mins

2. VLC Player and MPlayer shows zeros for elapsed & total time

3. Nero Showtime seems to match MPC, giving a 31minute total time

If I give the audio track the same name as the video, then MPC plays it, and the audiotrack gives MPC the correct running time somehow, though it doesn't play in-sync.

So basically nothing is reliable/accurate until video & audio get muxed together e.g. tsMuxeR or whathaveyou.

Can somebody educate me about this--is my assumption that muxing into a container, which I suppose creates some sort of File Header info that players can look at, is the only way to see a correct runtime on my x264 output? :confused:

neuron2
24th November 2008, 17:54
I'm not aware of any timing data in a raw H.264 ES comparable to the GOP timestamps that can be present in an MPEG2 ES. I'll look in the spec again, but assuming there isn't anything like that, there's no way to know the exact duration without scanning the whole file and counting the frames.

laserfan
25th November 2008, 01:40
Thanks very much. I was assuming as much but it's not the kind of question that lends itself to Searching.

You've eased the discomfort I had about my raw 264 encodes!

:thanks: