Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Maybe there's a simple answer for this, but when looking at the files on a DVD (IFOs, VOBs,etc), is there a way to easily determine the longest/main track? I'm trying to automate the process of finding the main movie track on a DVD and am running into issues.

I thought this could be done by finding the BIGGEST track (look through VTS_XX_N.VOB files, where XX is the track number, and find the track with the largest filesize (sum sizes of VOB files for that track)), but apparently that isn't correct. One DVD had track 7 as the largest track (by my method), but mencoder didn't produce the correct output with this track, but worked with track 9 instead.

Am I missing something?

EDIT: I've heard of the utility 'lsdvd' for getting track information, but I was hoping to avoid compiling this, and use a basic method instead (ie: what I tried above). Does anyone have any idea WHY my idea didn't work?

share|improve this question

If you don't mind doing one extra step in your process, you can have a look at lsdvd, a command line program which lists the content of a DVD, including the track lengths.

share|improve this answer
I've heard about this utility before, though I didn't want to worry about trying to compile it if there was an easier way to just figure out the track, with something like my method. I was also secretly hoping that my issue was due to some sort of bug with mencoder :) – Ampp3 Dec 13 '12 at 13:58
@Ampp3 Unfortunately I don't know if mencoder can show such information... – user1301428 Dec 14 '12 at 11:42
Mplayer, or maybe mencoder, can show track info, but it doesn't appear to be correct... Maybe I do just need to compile lsdvd – Ampp3 Dec 14 '12 at 16:28
up vote 0 down vote accepted

I ended up just using mplayer -identify to get the lengths of each track, identifying the longest, and working with that track. While this method doesn't work 100% of the time (especially with certain DVD protection mechanisms), it worked great for what I was doing. Here's my final command I ended up using:

mplayer -dvd-device e: -nocache -identify dvd:// -vo NUL -ao NUL -frames 0

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .