LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-02-2013, 02:15 AM   #16
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73

Quote:
Originally Posted by Pedroski View Post
handbrake-gtk_0.9.8ppa1~precise1_i386.deb

Also I downloaded the above package, installed it via Ubuntu Software Centre. It said use ghb from the command line. I did. I get this.

pedro@pedro-bedro:~$ sudo gbh
[sudo] password for pedro:
sudo: gbh: command not found
pedro@pedro-bedro:~$


Something is not right. Any tips??
The command is ghb not gbh.
 
Old 01-02-2013, 03:24 AM   #17
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
You're absolutely right! I must have been having violent thoughts!
 
Old 01-02-2013, 08:03 AM   #18
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
you can make uncompressed copies of the whole dvd by doing:
Code:
lsdvd && dd if=/dev/dvd of=moo-vee.iso
(ddrescue will probably work better since some dvd's add copy-protection schemes that can hinder plain old dd).

lidvdcss is not in the repository by default because in the us it is considered patented software and no one wants to get sued by the mpaa.

also, to compress dvd's to mkv, avi, mpg, ... i use xvidenc or h264enc.

Last edited by schneidz; 01-02-2013 at 08:05 AM.
 
Old 01-02-2013, 04:40 PM   #19
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Thanks for that. I mean, I hardly ever do this, but I would like to know how.

The point is, a dvd is nearly 8GB, a copy only 1 or 2GB.

So how do you do it? You do:

lsdvd && ddrescue if=/dev/dvd of=moo-vee.iso, then

xvidenc moo-vee.iso and end up with a 1GB file? Is the quality ok?

Or can you do:

xvidenc /dev/dvd directly??

Where can I get xvidenc and H264enc??

Also, it took handbrake nearly an hour to copy one dvd. Will your suggestion be faster??

Last edited by Pedroski; 01-02-2013 at 05:11 PM.
 
Old 01-02-2013, 05:25 PM   #20
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
You will have one heck of a time copying DVDs using dd or even ddrescue. Plan on hours or days to get through it, if you make it at all. And then what you end up with probably won't work for your purposes. Modern DVD copy protection schemes make use of intentional bad sectors which blow dd out of the water. ddrescue can theoretically work around these bad sectors, but it is SLOW. ddrescue also assumes you want to try, try, try again to recover each bad sector. This is a total waste of time when the bad sectors are there intentionally. And modern DVDs throw in a LOT of bad sectors.

I would recommend something like these two commands to rip first the video, then the audio from a DVD (you will need libdvdcss2 installed if they are copy-protected DVDs):

mplayer -nocache -dumpvideo -dumpfile video.m2v dvdnav://$TITLE//$DEVICE
mplayer -nocache -alang en -dumpaudio -dumpfile audio.ac3 dvdnav://$TITLE//$DEVICE

Notice above that it mentions "dvdnav" in the command line. That is a decoder than knows how to follow DVD structure that bypasses the intentional bad sectors. So you don't waste time with ddrescue trying to recover the unrecoverable. Depending on your distro, mplayer may or may not have been compiled with dvdnav support. If you find yours does not have it, you can download source, change a compile flag, and recompile. You will obviously replace $TITLE and $DEVICE with appropriate values.

The above is the first step in backing up a DVD manually (i.e., not using a program like "Handbrake"). Other steps include calculating sizes and shrinking the video, recombining the video and audio, authoring the DVD, and then burning it to a blank DVD media.

The above is for entertainment value only. I do not plan to provide other steps on how to copy a DVD, because this COULD be used for illegal purposes, and we don't want that.
 
Old 01-02-2013, 05:29 PM   #21
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by Pedroski View Post
Also, it took handbrake nearly an hour to copy one dvd. Will your suggestion be faster??
That depends on many things. What is the horsepower of your computer? As part of the copy are you also shrinking things to fit on a single layer DVD? Are you including DVD burn time in that one hour? What speed are your burning at?

Generically speaking, one hour would not be considered bad at all IMHO.
 
Old 01-02-2013, 06:16 PM   #22
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
I use Toshiba 600 laptop 2GB RAM. Also, I am not good at command line, so I'll stick with handbrake or mkvtoolnix-gui, which apt-get suggested (how cool is that!) when I looked for xvidenc. I really only wanted to see if it works, because some collegues were having trouble doing it. They are film fans and have hundreds or thousands of dvds which they want to back up to external hds. I think they are in for a long process!! I was going to tell them to get a life, but I didn't want to be unkind!
 
Old 01-02-2013, 07:09 PM   #23
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by Pedroski View Post
They are film fans and have hundreds or thousands of dvds which they want to back up to external hds.
Then it will probably take them even more time. I am assuming here that they will want to back up the entire DVD, which would include the main feature, all the featurettes and other extras, trailers, and such. Many of the backup programs only backup the main feature (which would be one specific "title"). Typically the main feature is one title, the menus are one title, so is each extra feature, each trailer, each advertisement, etc. So a typical DVD contains many "titles" - only one of those you need to backup if you just care about the movie. Ditto for multiple audio tracks and subtitles. You don't typically need/want to back all those up, but maybe you do if you are a "film fan". If they want actual "backup DVDs" (not hard drive backup) then to hold all that stuff, and not compress things (which would probably be a no-no for a film fan), you will need to buy double layer blank DVDs. Those cost much more than single layer DVDs and present more challenges in burning successfully and playback across a wide range of devices.

It might just be easier, cheaper, more reliable, and certainly less time consuming to recommend that your friends buy two of each DVD - one for normal use and one to save as a backup. Unfortunately, IMHO, most movies these days are not worth the price of even one DVD, let alone two. And you can forget about paying the ridiculous theater admission prices to see a movie on the big screen. I've never gotten into BluRay either - high definition crap is still, well, crap. Just very clear and stunning crap.
 
Old 01-02-2013, 09:02 PM   #24
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
there is a difference between backup copy (dd/ddrescue/vobcopy) and re-encoding (mplayer -dump/mencoder/xvidenc/h264enc/handbreak/...) a dvd into a compressed format.

this takes me about 20 minutes
Code:
lsdvd && ddrescue --no-split --verbose --block-size=2048 /dev/dvd moo-vee.iso
but it creates a byte-for-byte replica of the data on the disk (approx 8 gb).

if i want to rip a movie into an mkv i tend to use this mencoder script which was generated from xvidenc (sudo apt-get install xvidenc h264enc to install)
Code:
[schneidz@hyper ~]$ cat bin/xvidenc-ac3-mkv.ksh
#!/bin/bash
################### START OF COMMANDS ###################

dvd=`lsdvd $1 | head -n 1 | awk '{print tolower($3)}' | sed s/_/-/g`
#mkdir /home/xbmc/win/stuff/clips/$dvd
titles=`lsdvd $1 | grep ^Title: | cut -b 8-9 | tail -n 1`
i=1
while [ $i -le $titles ]
do

/usr/bin/mencoder "dvd://$i" -dvd-device $1 -o /dev/null -vc mpeg12 -vf pp=al:c,softskip,unsharp=l5x5:.25:c5x5:.25,harddup -aid 128 -channels 6 -oac lavc -lavcopts acodec=ac3:abitrate=192 -a52drc 1 -ovc xvid -xvidencopts pass=1:turbo:me_quality=6:vhq=4:threads=2:max_bframes=2:bvhq=1:nopacked:quant_type=h263:noqpel:nogmc:trellis:nointerlacing:chroma_me:chroma_opt:hq_ac:nolumi_mask:rc_reaction_delay_factor=0:rc_averaging_period=100:closed_gop:autoaspect -passlogfile "$dvd-$i.log"

/usr/bin/mencoder "dvd://$i" -dvd-device $1 -o "$dvd-`zero-pad-2.x $i`".avi -vc mpeg12 -vf pp=al:c,softskip,unsharp=l5x5:.25:c5x5:.25,harddup -aid 128 -channels 6 -oac lavc -lavcopts acodec=ac3:abitrate=192 -a52drc 1 -ovc xvid -xvidencopts pass=2:bitrate=2000:me_quality=6:vhq=4:threads=2:max_bframes=2:bvhq=1:nopacked:quant_type=h263:noqpel:nogmc:trellis:nointerlacing:chroma_me:chroma_opt:hq_ac:nolumi_mask:rc_reaction_delay_factor=0:rc_averaging_period=100:closed_gop:autoaspect -passlogfile "$dvd-$i.log"




sleep 2

/usr/bin/mkvmerge   --title "$dvd-$title-ac3" --track-name 0:"$dvd-$title-ac3" --language 1:en --track-name 1:"AC3 5.1" "$dvd-`zero-pad-2.x $i`.avi"      -o "$dvd-`zero-pad-2.x $i`.mkv"
sleep 2

i=`expr $i + 1`
done
#################### END OF COMMANDS ####################
this takes more than 3 hours on my single core atom 1 gb ram machine but you can see that this provides hundreds more options than handbreak has. the output will be about 1 - 2 gb (adjust bitrate to your liking).

Last edited by schneidz; 01-02-2013 at 09:08 PM.
 
Old 01-02-2013, 09:24 PM   #25
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Wow, I'm impressed! I will try it!

Question: if I copied the dvd with ddrescue, I could then mount the iso via loop and play it as an ordinary dvd??

I'm not quite sure how to mount an iso, but I have done it before.

Last edited by Pedroski; 01-02-2013 at 09:31 PM.
 
Old 01-02-2013, 10:23 PM   #26
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by Pedroski View Post
Question: if I copied the dvd with ddrescue, I could then mount the iso via loop and play it as an ordinary dvd??
No. ddrescue would copy the DVD verbatim. Which means "including copy protection". It would not play if you simply mounted the iso.
 
Old 01-02-2013, 10:28 PM   #27
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
What, not even if I have libdvdcss2 installed??
 
Old 01-03-2013, 12:54 AM   #28
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by Pedroski View Post
What, not even if I have libdvdcss2 installed??
Don't know if you could finagle that into a working solution. Never tried messing around with that. I highly doubt it would work. If it did, that would imply you could copy a DVD using two optical drives like this: "dd if=/dev/dvd of=/dev/dvd2" and then be able to successfully play the DVD that was burned in /dev/dvd2 (ignoring intentional bad sector problems that would interfere with the copy for this discussion). Copying a copy-protected DVD is not that easy. Think about it - you would never need Handbrake or any other DVD copy program if that simple method worked. You could just dd your source DVD to a blank DVD, copy protection and all, and then play the result in your regular DVD player. Doesn't work. Even though your regular DVD player has a libdvdcss2 equivalent built in. You have to strip the copy protection off WHILE you are playing/ripping the original DVD, not afterwards.
 
Old 01-03-2013, 03:07 AM   #29
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Sorry, but then I must ask this question: how does my Totem play the dvd at all? How would it know the difference between the mounted iso and /dev/dvd?

Or is a dvd like a CD, which, I am told, has no file system and thus cannot be mounted. That said, I can insert a music CD and look at the contents! song1.mp3, song2.mp3 ....

I really am ignorant when it comes to computers!
 
Old 01-03-2013, 07:32 AM   #30
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by haertig View Post
No. ddrescue would copy the DVD verbatim. Which means "including copy protection". It would not play if you simply mounted the iso.
my experience is that by running lsdvd before dd it would unlock the dvd and play without macrovision protection.

no need to loop mount the iso; something like this would play it:
Code:
mplayer dvd://1 -dvd-device moo-vee.iso
(iso's also play in xbmc/vlc/xine/...).

Last edited by schneidz; 01-03-2013 at 12:08 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: DVD -> VOB -> ISO -> DVD ... or, duplicate DVD5 exact copy demerson3 Linux - Software 21 04-20-2018 10:59 AM
Cannot make a bootable DVD copy of original Linux DVD. aimee01 Linux - General 2 06-02-2008 02:19 PM
LXer: Copy Protection on German Video DVD Impairs CD/DVD Writers LXer Syndicated Linux News 0 02-10-2006 05:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration