Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Rip a DVD
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
guy
Apprentice
Apprentice


Joined: 31 Mar 2003
Posts: 286
Location: USA

PostPosted: Sun Apr 06, 2003 4:49 pm    Post subject: Rip a DVD Reply with quote

Hi everybody, I wrote this little script to easily rip DVDs. Before you get started, you'll need to
Code:

emerge lame
emerge mplayer

Also, your USE flags should include "encode" and "avi"

Now put this script somewhere useful (like /bin), switch to the folder you want the movie in, and run the script. (I call it "ripdvd")

This script uses mencoder, mpeg4 (divx), and a 3-pass encoding for the best quality. It also lets you specify the video bitrate before you begin or after the audio ripping, so that you can make it the exact size you want. Enjoy!

Code:

#! /bin/bash
echo "this will encode a dvd using the triple pass method.";
echo -n "audio bitrate? (rec: 120; 96 for long movie) ";
read abr;
echo -n "audio ID? (default = 128) ";
read lng;
echo -n "specify video bitrate now or wait for mencoder's recommendation (now/wait)? "
read whenvid;
if [ "$whenvid" = "now" ];
then
echo -n "video bitrate? (800?) ";
read vbr;
else
echo "waiting for video bitrate";
fi
echo -n "dvd title number? ";
read dvdtitle;
echo -n "press control-c when you know your crop settings.";
echo -n "You will know when the W:X:Y:Z numbers stay the same for a few seconds.";
echo "These are your crop settings.";
echo "hit enter to continue";
read blah;
mencoder -dvd $dvdtitle -sws 2 -ofps 23.976 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=800 -vop cropdetect,scale -zoom -xy 640 -oac copy -o getting.avi;
rm getting.avi;
echo -n "crop boundaries? ";
read crop;
echo "";

echo "now for the header:";
echo -n "title? ";
read title;
echo -n "artist? ";
read artist;
echo -n "genre? ";
read genre;
echo -n "year? ";
read year;
echo -n "comment? ";
read cmmnt;



echo -n "finally, file name? ";
read filename;
echo "thanks, I'm ripping to $filename. (you may want to check the language before the entire process completes)";


# pass 1
mencoder -dvd $dvdtitle -aid $lng -ofps 23.976 -ovc frameno -o frameno.avi -oac mp3lame -lameopts abr:br=$abr:vol=8;
if [ "$whenvid" = "now" ];
then echo "already got video bitrate";
else
echo -n "video bitrate?  ";
read vbr;
fi
# pass 2
mencoder -dvd $dvdtitle -sws 2 -info name="$title":artist="$artist":genre="$genre":copyright="$year":comment="$cmmnt" -ofps 23.976 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vqmin=2:vpass=1:vbitrate=$vbr -vop crop=$crop,scale -zoom -xy 640 -oac copy -o $filename;
# pass 3
mencoder -dvd $dvdtitle -sws 2 -info name="$title":artist="$artist":genre="$genre":copyright="$year":comment="$cmmnt" -ofps 23.976 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vqmin=2:vpass=2:vbitrate=$vbr -vop crop=$crop,scale -zoom -xy 640 -oac copy -o $filename;

echo ""
echo "done!";
echo "bitrate was: $abr for audio and $vbr for video.";
echo "cropped to $crop";
echo -n "clean up (yes/no)? ";
read cleanup;
if [ "$cleanup" = "yes" ];
then
rm frameno.avi;
rm divx2pass.log;
else
echo "";
fi


Last edited by guy on Mon Apr 07, 2003 2:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
Bonkie
Guru
Guru


Joined: 28 Oct 2002
Posts: 501
Location: Antwerpen, Belgium

PostPosted: Sun Apr 06, 2003 7:20 pm    Post subject: Reply with quote

nice script

but i'm still looking for a script to rip subtitles from a DVD ...
Back to top
View user's profile Send private message
kollega
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jul 2002
Posts: 127
Location: Munich, Germany

PostPosted: Mon Apr 07, 2003 9:25 am    Post subject: Reply with quote

Hi

Why don't you use dvd:rip? i think a very comfortable tool for ripping dvds!
Back to top
View user's profile Send private message
guy
Apprentice
Apprentice


Joined: 31 Mar 2003
Posts: 286
Location: USA

PostPosted: Mon Apr 07, 2003 2:46 pm    Post subject: Reply with quote

kollega wrote:
Hi

Why don't you use dvd:rip? i think a very comfortable tool for ripping dvds!


I used it a while ago on RH-- it worked decently, but I felt I was getting better quality out of mencoder with their 3-pass rip. So I threw together a script that left the good little quality-boosting-rip-slowing things on and asked for bitrates and stuff. It also lets you specify the bitrate at the beginning if you think you know what you want, or wait until mencoder can give a very accurate reading of what to use for say a 700 meg file.
Back to top
View user's profile Send private message
kollega
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jul 2002
Posts: 127
Location: Munich, Germany

PostPosted: Mon Apr 07, 2003 9:20 pm    Post subject: Reply with quote

i'm not really fit in that ripping thing... *shame on me*
i just started some days ago ripping dvds to svcd...
am i right that this script is used to rip into divx? or may i use it also for my svcd-stuff?
Back to top
View user's profile Send private message
guy
Apprentice
Apprentice


Joined: 31 Mar 2003
Posts: 286
Location: USA

PostPosted: Tue Apr 08, 2003 4:37 pm    Post subject: Reply with quote

kollega wrote:
i'm not really fit in that ripping thing... *shame on me*
i just started some days ago ripping dvds to svcd...
am i right that this script is used to rip into divx? or may i use it also for my svcd-stuff?


yea, sorry, should have mentioned that. It rips to divx.
Back to top
View user's profile Send private message
telex4
l33t
l33t


Joined: 21 Sep 2002
Posts: 704
Location: Reading, UK

PostPosted: Tue Apr 08, 2003 6:02 pm    Post subject: Reply with quote

*shamless plug*

Try QuickRip, a project of mine that might be what you're looking for. It's a DVD ripper written in Python that uses mencoder to do a 3-pass rip. Currently there's a PyQt interface implemented, which is really very easy to use, and I'm working atm on a CLI interface so it can be run without X up (I like to rip from the shell for speed).

Any suggestions for improvement, bug reports etc. are very welcome :)
Back to top
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Tue Apr 08, 2003 6:54 pm    Post subject: Reply with quote

telex4 wrote:
Any suggestions for improvement, bug reports etc. are very welcome


Here you are: the ebuild :).
Code:
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

inherit eutils

MY_PV="$(echo ${PV} | cut -d. -f1,2)"
S="${WORKDIR}/quickrip"
DESCRIPTION="Basic DVD ripper written in Python and PyQT."
SRC_URI="http://www.tomchance.uklinux.net/projects/quickrip-$MY_PV.tar.gz"
HOMEPAGE="http://www.tomchance.uklinux.net/projects/quickrip.shtml"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 -ppc -mips"

RDEPEND="virtual/glibc
        >=dev-lang/python-2.2
        >=x11-libs/qt-3.1
        >=dev-python/PyQt-3.5
        media-video/mplayer
        media-video/transcode"

src_unpack() {

    unpack ${A}

}

src_install() {

        dodir /usr/share/quickrip
        into /usr/share/quickrip
        cp *.py *.ui README LICENSE /usr/share/quickrip
        dosym /usr/share/quickrip/quickrip.py quickrip

}


I'm testing it.
_________________
Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito
Back to top
View user's profile Send private message
Harpalus
n00b
n00b


Joined: 16 Oct 2002
Posts: 26

PostPosted: Tue Apr 08, 2003 8:44 pm    Post subject: Reply with quote

I have been using drip. It is in portage, works great
Back to top
View user's profile Send private message
telex4
l33t
l33t


Joined: 21 Sep 2002
Posts: 704
Location: Reading, UK

PostPosted: Tue Apr 08, 2003 9:19 pm    Post subject: Reply with quote

cerri wrote:
telex4 wrote:
Any suggestions for improvement, bug reports etc. are very welcome


Here you are: the ebuild :).


Cool :)
Back to top
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Tue Apr 08, 2003 9:30 pm    Post subject: Reply with quote

I was unable to test it due to this bug. :(
_________________
Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito
Back to top
View user's profile Send private message
DefconAlpha
Apprentice
Apprentice


Joined: 25 Feb 2003
Posts: 151
Location: Alabama

PostPosted: Tue Apr 08, 2003 9:45 pm    Post subject: DVD::Rip Reply with quote

DVD::Rip works really well for me, even in the two-pass mode. It does subtitles (supposedly, never tested...), cropping, resizing, anti-aliasing and deinterlacing. It Just Works.

Can anyone notice the difference between two and three pass encoding? I'd be willing, to uh, "compare," differences if anyone can show me...
_________________
In the end, the love you get is equal to the love you make
--John Lennon & Paul McCartney (The End - Abbey Road,
Back to top
View user's profile Send private message
telex4
l33t
l33t


Joined: 21 Sep 2002
Posts: 704
Location: Reading, UK

PostPosted: Tue Apr 08, 2003 11:10 pm    Post subject: Reply with quote

I assume 2-pass encoding does audio then video? 3 pass does audio, then video with logging, then video going over the log looking for quick movements and possible problems. I've only ever found one really noticeable glitch caught by 3-pass encoding, where a spike in CPU activity somehow caused a slight jump, and I'm either imagining it or rapid movements do seem slightly smoother with a 3-pass encode.

I like dvd::rip... it's just too damn complicated for normal use :)

cerri... that's weird, and a shame... I have PyQt working fine with PyQt3.5 and Qt3.1.0-rc3. I've tried the ebuild and it doesn't work. I've managed to fix a few things, but for some reason it won't create the symlink, and I'm too tired atm to figure out why, so here's the amended ebuild:

Code:

# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

inherit eutils

MY_PV="$(echo ${PV} | cut -d. -f1,2)"
S="${WORKDIR}/quickrip"
DESCRIPTION="Basic DVD ripper written in Python and PyQT."
SRC_URI="http://www.tomchance.uklinux.net/projects/quickrip-$MY_PV.tar.gz"
HOMEPAGE="http://www.tomchance.uklinux.net/projects/quickrip.shtml"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 -ppc -mips"

RDEPEND="virtual/glibc
        >=dev-lang/python-2.2
        >=x11-libs/qt-3.1
        >=dev-python/PyQt-3.5
        media-video/mplayer
        media-video/transcode"

src_unpack() {

    unpack ${A}

}

src_install() {

        dodir /usr/share/quickrip
        into /usr/share/quickrip
        cp *.py *.ui README LICENSE ${D}/usr/share/quickrip
        dosym /usr/share/quickrip.py /usr/bin/quickrip

}
Back to top
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Wed Apr 09, 2003 6:16 am    Post subject: Reply with quote

Sorry, a little error.

Code:
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

inherit eutils

MY_PV="$(echo ${PV} | cut -d. -f1,2)"
S="${WORKDIR}/quickrip"
DESCRIPTION="Basic DVD ripper written in Python and PyQT."
SRC_URI="http://www.tomchance.uklinux.net/projects/quickrip-$MY_PV.tar.gz"
HOMEPAGE="http://www.tomchance.uklinux.net/projects/quickrip.shtml"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 -ppc -mips"

RDEPEND="virtual/glibc
        >=dev-lang/python-2.2
        >=x11-libs/qt-3.1
        >=dev-python/PyQt-3.5
        media-video/mplayer
        media-video/transcode"

src_unpack() {

    unpack ${A}

}

src_install() {

        into /usr/share/quickrip
        dodir ${DESTTREE}
        cp *.py *.ui README LICENSE ${DESTTREE}
        dosym ${DESTTREE}/quickrip.py /usr/bin/quickrip

}


I hope it's correct, now :)
_________________
Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito
Back to top
View user's profile Send private message
telex4
l33t
l33t


Joined: 21 Sep 2002
Posts: 704
Location: Reading, UK

PostPosted: Wed Apr 09, 2003 9:54 am    Post subject: Reply with quote

That ebuild doesn't even manage to create /usr/share/quickrip! It gives me the following messages:

>>> Install quickrip-0.4 into /var/tmp/portage/quickrip-0.4/image/ category media-video
cp: copying multiple files, but last argument `/usr/share/quickrip' is not a directory
Try `cp --help' for more information.
ln: creating symbolic link `/var/tmp/portage/quickrip-0.4/image//usr/bin/quickrip' to `/usr/share/quickrip/quickrip.py': No such file or directory
man:
strip:
>>> Completed installing into /var/tmp/portage/quickrip-0.4/image/
Back to top
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Wed Apr 09, 2003 2:13 pm    Post subject: Reply with quote

Code:
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

inherit eutils

MY_PV="$(echo ${PV} | cut -d. -f1,2)"
S="${WORKDIR}/quickrip"
D="/usr/share/quickrip"
DESCRIPTION="Basic DVD ripper written in Python and PyQT."
SRC_URI="http://www.tomchance.uklinux.net/projects/quickrip-$MY_PV.tar.gz"
HOMEPAGE="http://www.tomchance.uklinux.net/projects/quickrip.shtml"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 -ppc -mips"

RDEPEND="virtual/glibc
        >=dev-lang/python-2.2
        >=x11-libs/qt-3.1
        >=dev-python/PyQt-3.5
        media-video/mplayer
        media-video/transcode"

src_unpack() {

    unpack ${A}

}

src_install() {

        into /usr/share/quickrip
        mkdir ${D}
        cp *.py *.ui README LICENSE ${D}
        dosym /usr/bin/quickrip quickrip.py

}


The docs and the scripts are different. I think the docs are outdated (dodir isn't listed, but it does exist).
Anyway, I'm sorry but I was unable to test it.
_________________
Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito
Back to top
View user's profile Send private message
telex4
l33t
l33t


Joined: 21 Sep 2002
Posts: 704
Location: Reading, UK

PostPosted: Wed Apr 09, 2003 5:27 pm    Post subject: Reply with quote

You could always just remove the PyQt dependency and test the ebuid. And in about a week's time I should hopefully have v0.5 ready for release, with a CLI interface so you don't need PyQt :)
Back to top
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Wed Apr 09, 2003 7:25 pm    Post subject: Reply with quote

Finally, it works.
Code:
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

inherit eutils

MY_PV="$(echo ${PV} | cut -d. -f1,2)"
S="${WORKDIR}/quickrip"
DESCRIPTION="Basic DVD ripper written in Python and PyQT."
SRC_URI="http://www.tomchance.uklinux.net/projects/quickrip-$MY_PV.tar.gz"
HOMEPAGE="http://www.tomchance.uklinux.net/projects/quickrip.shtml"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 -ppc -mips"

RDEPEND="virtual/glibc
        >=dev-lang/python-2.2
        >=x11-libs/qt-3.1
        >=dev-python/PyQt-3.5
        media-video/mplayer
        media-video/transcode"

src_unpack() {

    unpack ${A}

}

src_install() {

        insinto /usr/share/quickrip
        doins *.py *.ui README LICENSE
        fperms 755 $INSDESTTREE/cli.py $INSDESTTREE/dvd.py $INSDESTTREE/gui.py $INSDESTTREE/quickrip.py
        dodir /usr/bin
        dosym $INSDESTTREE/quickrip.py /usr/bin/quickrip
                                                               
}

_________________
Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito
Back to top
View user's profile Send private message
telex4
l33t
l33t


Joined: 21 Sep 2002
Posts: 704
Location: Reading, UK

PostPosted: Wed Apr 09, 2003 11:36 pm    Post subject: Reply with quote

Great :) I've submitted the ebuild to bugzilla here :)
Back to top
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Thu Apr 10, 2003 5:21 am    Post subject: Reply with quote

;)
_________________
Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito
Back to top
View user's profile Send private message
mikepb78
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 171
Location: London

PostPosted: Sat Apr 12, 2003 2:37 pm    Post subject: Mencoder can also do Subtitles and can do some nice filters Reply with quote

Mencoder can do subtitle and various filters :

Code:
 mencoder -sws 2 -aid 128 -oac mp3lame -lameopts br=96
   -info name="Ninja Scrolls":artist="Michael    Brewer":genre="Anime":subject="action
   anime":srcform="DVD":comment="The DVD was heavily interlaced"
    -vobsubout ninja_scrolls_cd1 -vobsuboutindex 0 -sid 0 -vop
    scale=640:480,lavcdeint -ovc lavc -lavcopts
   vcodec=mpeg4:vhq:aspect=4/3:vbitrate=1600:v4mv:trell:keyint=125
   :vqmin=1:vqmax=8::vlelim=-4:vcelim=9:lumi_mask=0.05
   :dark_mask=0.01:::v4mv:vqblur=0.0:precmp=2:cmp=2
   :subcmp=2::vpass=1 -o ninja_scrolls_cd1.avi ninja_scrolls_1.vob
Back to top
View user's profile Send private message
JoeG
Apprentice
Apprentice


Joined: 30 Jul 2003
Posts: 179
Location: Kentucky, USA

PostPosted: Wed Aug 06, 2003 3:37 pm    Post subject: Reply with quote

just one comment...scripts ROCK....gui sucks. I don't know about you guys(gals), but I type faster than I click.

my 2 cents
_________________
Linux User#226477
Back to top
View user's profile Send private message
tam
Guru
Guru


Joined: 04 Mar 2003
Posts: 569
Location: freiburg.de

PostPosted: Fri Aug 29, 2003 6:38 pm    Post subject: Reply with quote

telex4 wrote:
It's a DVD ripper written in Python that uses mencoder to do a 3-pass rip.


Hey, I miss an ebuild for stable 0.8 :)
Back to top
View user's profile Send private message
telex4
l33t
l33t


Joined: 21 Sep 2002
Posts: 704
Location: Reading, UK

PostPosted: Fri Aug 29, 2003 7:48 pm    Post subject: Reply with quote

The 0.8 ebuild went into gentoo's bug system a long time ago, and never came out :(

See: https://bugs.gentoo.org/show_bug.cgi?id=25648
Back to top
View user's profile Send private message
meulie
l33t
l33t


Joined: 17 Jun 2003
Posts: 845
Location: a Dutchman living in Norway

PostPosted: Wed May 19, 2004 11:08 pm    Post subject: Reply with quote

So... what is currently the best method to turn a DVD into a DivX on a CLI-system...? 8)
_________________
Greetz,
Evert Meulie
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
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 vote in polls in this forum