View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 3 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Dec 08, 2006 6:15 pm 
Offline
Joined: Sun Aug 28, 2005 7:07 pm
Posts: 821
Location: Melbourne, Australia
Hi Folks,
My parents gave my daughter a new DVD of Madagascar a few months ago, and it wouldn't rip with the standard Knoppmyth DVD rip.

The problem:
The DVD ripped the first few seconds of the main title then stopped. The ETA went up infinitely, and pressing cancel just sent the machine into an open file hang (to fix this: ``lsof|grep mythtv'' - one of the last few will refer to your DVD device. Note the process id then as root, send a kill -9 <pid> and wait 10 seconds for the process to die).
Googling revealed that these DVDs have a deliberate data error introduced to make computers re-read that spot in the disc ad infinitum. DVD players, on the other hand, have to play at a constant speed, so they ignore the error (clever).


The solution:
Knowing that either xine or mplayer could play to stdout, I searched the man pages. The theory is that a media player plays DVDs on your computer exactly like a DVD player and will also skip the error. This was indeed the case and the DVD plays flawlessly on the computer using "Play DVD".
Xine didn't have an obvious solution, but mplayer has an option for playing to stdout and captures both audio and video (and mux them nicely).
The command is
Quote:
mplayer -vo xv dvd://1 -dumpstream -dumpfile outfile.mpg
.


You can easily make this into a script, and the resultand file can also easily be compressed to a much smaller avi. The latter is something I have written a script for:

Code:
#!/bin/bash
THEFILE=$1
NEWFILE=`echo $THEFILE|sed 's/mpg/avi/'`
unlink $NEWFILE 2> /dev/null
nice -n 19 mencoder $THEFILE -oac mp3lame -lameopts abr:br=128  -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=920:vpass=1 -ofps 25 -vf pp=de,scale=720:405 -o "/dev/null"
nice -n 19 mencoder $THEFILE -oac mp3lame -lameopts abr:br=128  -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=920:vpass=2 -ofps 25 -vf pp=de,scale=720:405 -o $NEWFILE unlink divx2pass.log  2> /dev/null


Just pass the script the name of the .mpg.

I'm sure you can script the rip to do everything easily if you have a lot of these discs, but I've only come across a few to date. It works with non-introduced errors in most cases, too

Regards

Mike

_________________
*********************
LinHES 7.4
Australian Dragon
*********************


Last edited by manicmike on Mon May 07, 2007 1:17 am, edited 1 time in total.


Top
 Profile  
 
PostPosted: Sat Dec 30, 2006 2:44 pm 
Offline
Joined: Mon Nov 15, 2004 4:05 pm
Posts: 15
Location: Oregon, USA
manicmike -

Thanks for this post! I've been very frustrated trying to rip a lot of new DVDs lately, especially ones I've wanted to rip for my kids. They tend to ruin them 5 minutes after I open them, and my entire point of building a KnoppMyth box was as a movie storage and playback computer. Overall it's been a smashing success.

As you've noticed a few movies like Madagascar, Little Mermaid, et. al have these bogus tracks that DVD players can skip over. The PC world has figured out how to remove them, but Linux is a little late to the game on that end.

I'm interested in your script, but I've got a couple of questions:

1. Why the unlink of a file in the top of the script? Is this just leftover debug code?

2. Why is the resolution set to 720x405 ? Is that specific for that particular movie?

Thanks,
wasabi


Top
 Profile  
 
PostPosted: Sat Dec 30, 2006 6:27 pm 
Offline
Joined: Sun Aug 28, 2005 7:07 pm
Posts: 821
Location: Melbourne, Australia
wasabi wrote:
manicmike -

I'm interested in your script, but I've got a couple of questions:

1. Why the unlink of a file in the top of the script? Is this just leftover debug code?

2. Why is the resolution set to 720x405 ? Is that specific for that particular movie?

Thanks,
wasabi


Hi Wasabi,

Heh, yeah the unlink was left over after I merged my "mpg2avi" script. You can delete that.

The resolution is set to the PAL standard for widescreen. I added it because I'd a lot of trouble with files having the wrong aspect ratio. You can change it if you like and, incidentally, for NTSC you should change the 25fps to 29.97fps.

Cheers

Mike

_________________
*********************
LinHES 7.4
Australian Dragon
*********************


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu