Watching old television on a media player

I recently bought a media player. There are basically Linux based two models out there these days each with benefits and flaws. I’ll get into what I am use in a later post. Right now, I wanted to post about how I got my DVDs onto the bloody thing !

Linux may not be for the novice but there is one thing that can be said for it - It’s damn efficient … once you figure out how to do what every it is you want to do. In my case it was to move a bunch of TV shows from DVD to the media device. Originally I thouhgt I needed to convert everything the Xvid AVI files but it turns out most of these media devices can play DVD VOB files directly.

TV series DVDs are a bit different from movie DVDs. The biggest difference is that movies tend to have one big VOB of hte movie and a few small ones of out takes, director’s notes, etc. So for a movie, you want the get the biggest VOB and seldom care for the rest. TV series DVDs have 6 or 7 episodes plus the little bits of fluff. Further, the show is broken up into seasons and episodes but DVDs have “disks” and “titles”. Mapping from one to the other can be easy if there were a small number of episodes and the show was a 30 minute comedy series as opposed to a one hour drama. Fortunately, if you solve the multiple episode problem for the 30 minute comedy and the multiple DVDs per season issue for the dramas, you got all your bases covers.

Initially I thought I needed something with a simple graphical user interface, and had I found one, I would have stopped there. I didn’t which turned out to be just fine. Here is what I ended up with …

Step #1 Find out how many “titles” aka episodes are on a DVD and where they are. This is easy using “lsdvd”. With a DVD in the computer, this tool spits out something that looks like the following:

prompt> lsdvd
Disc Title: THE_RABBIT_AND_THE_HARE_S6_DISC1
Title: 01, Length: 00:28:45.133 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 00
Title: 02, Length: 00:29:33.086 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 00
Title: 03, Length: 00:29:03.220 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 00
Title: 04, Length: 00:29:09.186 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 00
Title: 05, Length: 00:29:05.276 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 00
Title: 06, Length: 00:29:14.066 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 00
Title: 07, Length: 00:28:53.020 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 00
Title: 08, Length: 00:03:09.300 Chapters: 05, Cells: 05, Audio streams: 01, Subpictures: 00
Title: 09, Length: 00:01:03.186 Chapters: 01, Cells: 01, Audio streams: 05, Subpictures: 00
Title: 10, Length: 00:00:44.020 Chapters: 01, Cells: 01, Audio streams: 05, Subpictures: 00
Title: 11, Length: 00:01:02.000 Chapters: 01, Cells: 01, Audio streams: 05, Subpictures: 00
Title: 12, Length: 00:01:36.300 Chapters: 01, Cells: 01, Audio streams: 05, Subpictures: 00
Title: 13, Length: 00:00:37.286 Chapters: 01, Cells: 01, Audio streams: 05, Subpictures: 00
Longest track: 02

You can tell from this that the episode in season six are stored as title 01-07. Next, I found that “tccat” does a nice job of copying the VOB for a single “title”. I wanted something a bit more automated so I wrote a script. It takes a “prefix” for the output file names along with title number of the first episode and the total number of episodes to copy. Here is the syntax for the above DVD:

prompt> ./get-vob.sh TheRabbitAndTheHare-S06 1 7

And here is the script …

# get-vob.sh
#
# $1 is the prefix name;
# $2 is the title number;
# $3 is the number of titles to process;
# $4 offset title number (optional);

if [ "$4" == "" ]; then
offset=0
else
offset=”$4″
fi

if [ "$3" == "" ]; then
echo “Usage: $0 []”
else
total=$[$2 + $3]
for ((title=$2;title<$total;title+=1)); do
filen=$[$title + $offset]
if [ $filen -lt 10 ]; then
zeros=”00″
else
zeros=”0″
fi
echo “processing title $title to create $1-$zeros$filen.vob”
tccat -i /media/cdrom0 -t dvd -T $title,-1 -d511 > $1-$zeros$filen.vob
done
fi

So, while Linux may not be the most user friendly environment for loading up my media center with my old DVDs it is very efficient !

One Response to “Watching old television on a media player”

  1. TV Movies Soaps » Watching old television on a media player Says:

    [...] theSalmonFarm Blog created an interesting post today on Watching old television on a media playerHere’s a short outlineTV series DVDs have 6 or 7 episodes plus the little bits of fluff. … Mapping from one to the other can be easy if there were a small number of episodes and the show was a 30 minute comedy series as opposed to a one hour drama…. [...]