Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Do all of these media files: .mov, .mpg, .mp4, .ts, and .vob, have a tag that indicates play length? If not all, which ones? And can they be read by any machine?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

QuickTime Movie File (.mov)

We see the duration in: moov > trak > mdia > mdhd > duration

enter image description here

Source: echo one - Inside the Quicktime File Format

Movie Picture Experts Group - MPEG-1 (.mpg)

CBR Formula: File Size / Bitrate * 8

VBR Formula: Number of Frames * Samples Per Frame / Sampling Rate

Source: Code Project - MPEG Audio Info

Movie Picture Experts Group - MPEG-4 (.mp4)

This is a container for different file formats, you need to figure out the format first.

Once known, you can then either read or use a formula to get more information, it's either:

Source: Wikipedia - MPEG-4

Movie Picture Experts Group - Transport Stream (.ts)

Boils down to the same thing...

It's meant for transmission of already existing video.

Source: Wikipedia - MPEG Transport Stream

Movie Picture Experts Group - Video Object (.vob)

Again boils down to the same thing...

Analogous to the MPEG program stream, VOB file can contain H.262/MPEG-2 Part 2 or MPEG-1 Part 2 video, MPEG-1 Audio Layer II or MPEG-2 Audio Layer II audio, but usage of these compression formats in a VOB file has some restrictions in comparison to the MPEG program stream. In addition, VOB can contain Linear PCM, AC-3 or DTS audio and subpictures (subtitles). VOB file cannot contain AAC audio (MPEG-2 Part 7), MPEG-4 compression formats and others, which are allowed in MPEG program stream standard.

Source: Wikipedia - VOB

share|improve this answer
    
Thank you very much for your help, Tom. I really appreciate it. –  user33666 Mar 1 '11 at 21:31
    
@user33666: This is how far I go. Some allow you to read it out as shown for QuickTime Movie Format, other require formulas which need to read out values from the header and use the file size as shown for MPEG-1. The codecs (to help play the video) and explorer shell extensions (to help generate the thumbnail) determine these for you... :-) –  Tom Wijsman Mar 1 '11 at 21:41
    
One more note: Length is always read from the file header and file size, there is no such thing as a tag (like seen with .mp3 files) where you can universally see and modify the length. –  Tom Wijsman Mar 1 '11 at 21:49
    
That is incredibly valuable information for me. Thank you. Are you saying that unless it's an .mp3 or a .mov (any others that you know of?), that the play-length value isn't reported on the file as an actual time, e.g., 00:04:06 or something? That it's calculated from other figures? –  user33666 Mar 1 '11 at 22:36
1  
.....Thank you Tom. –  user33666 Mar 6 '11 at 18:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.