LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Ripping DVDs, for my iPod (https://www.linuxquestions.org/questions/debian-26/ripping-dvds-for-my-ipod-398280/)

microsoft/linux 12-31-2005 10:34 PM

Ripping DVDs, for my iPod
 
Ok, So I'm trying to figure out how to rip DVDs for my iPod(5G). I've got the 0.6 version of Handbrake installed(the .deb), but it gave me a segmentation fault, and I can't get the 0.7 version to compile. I tried to get Acidrip, but the hosting site is not up anymore. The repository at ftp.nerim.net is down, so I can't find a binary of dvd::rip, and I'd rather not compile it, because it has a bunch of dependencies. Does anyone have any ideas? I've heard about people using Mencoder, but I don't know enough as to how DVDs work, so I don't want to mess w/ that too much(unless someone wanted to be kind, and tell me how to do it:D)

The requirements, from the Apple Website
Quote:

H.264 video: up to 768 Kbps, 320 x 240, 30 frames per sec., Baseline Profile up to Level 1.3 with AAC-LC up to 160 Kbps, 48 Khz, stereo audio in .m4v, .mp4 and .mov file formats
MPEG-4 video: up to 2.5 mbps, 480 x 480, 30 frames per sec., Simple Profile with AAC-LC up to 160 Kbps, 48 Khz, stereo audio in .m4v, .mp4 and .mov file formats
Thanks in advance

saman007uk 01-01-2006 08:39 AM

You might want to try OGMRip:

http://ogmrip.sourceforge.net/

microsoft/linux 01-01-2006 10:29 PM

are there .debs for it somewhere? How would I use Menconder? Does anyone have suggestions as to other ideas?

microsoft/linux 01-02-2006 10:35 PM

I got handbrake installed, using nasm(netwide assembler) from the sourceforge site using the .rpm. I converted it to a .deb using alien.

rocksniffer 01-12-2006 09:35 PM

I am looking for something too. I looks like linux looses on this one. There is a free product for windows called vidora ipod converter, but it won't do wmv or vob I don't think. It will convert all others,though, and you can easily cat vobs together and convert to mpeg2 in linux.

microsoft/linux 01-12-2006 09:40 PM

did you see the post above about handbrake? I've got a more comprehensive explanation on my blog(see below). Hope this helps.

rocksniffer 01-14-2006 03:36 PM

I saw it and will look into it, but is that it? Rather than installing a new piece of software is there a transcode or ffmpeg or mencoder expert out there that can put together a quick command that can do it? I know I'm leaching but have you looked at the those man pages? I need a hero. All I want to do is convert a mpeg2 to a ipod compatable mpeg4.

Installing from source? All you have to do is ./configure, make and make install. Oh, if it were just that easy.

Now I have to install jam whatever that is. fortunately jam is in the urpmi database. Now, jam is downloading and installing god knows what on my PC, but it has been downloading and installing stuff for about 15 min. from a place called download.m0k.org. God, its still downloading stuff!

ultimately it ended with, what else, an error. Jam couldn't find some needed files from somewhere on the web I guess.

Resolving download.m0k.org... 195.140.141.204
Connecting to download.m0k.org[195.140.141.204]:80... connected.
HTTP request sent, awaiting response... 404 Not Found
10:47:40 ERROR 404: Not Found.


rm -rf contrib/xvidcore.tar.gz &&
wget -O contrib/xvidcore.tar.gz `cat contrib/version_xvidcore.txt` &&
( touch contrib/xvidcore.tar.gz || true )

...failed Wget contrib/xvidcore.tar.gz ...
...removing contrib/xvidcore.tar.gz
...skipped contrib/lib/libxvidcore.a for lack of contrib/xvidcore.tar.gz...
Cc libhb/common.o
Cc libhb/hb.o
Cc libhb/ports.o
Cc libhb/scan.o
Cc libhb/work.o
Cc libhb/decmpeg2.o
Cc libhb/encavcodec.o
Cc libhb/update.o
Cc libhb/demuxmpeg.o
Cc libhb/fifo.o
Cc libhb/render.o
Cc libhb/reader.o
Cc libhb/muxcommon.o
Cc libhb/muxmp4.o
libhb/muxmp4.c: In function `MP4End':
libhb/muxmp4.c:135: warning: unused variable `job'
Cc libhb/sync.o
Cc libhb/decsub.o
Cc libhb/deca52.o
Cc libhb/encfaac.o
Cc libhb/declpcm.o
Cc libhb/encx264.o
Cc libhb/decavcodec.o
Cc libhb/encxvid.o
libhb/encxvid.c:9:18: xvid.h: No such file or directory
libhb/encxvid.c: In function `hb_work_encxvid_init':
libhb/encxvid.c:35: error: `xvid_gbl_init_t' undeclared (first use in this function)
libhb/encxvid.c:35: error: (Each undeclared identifier is reported only once
libhb/encxvid.c:35: error: for each function it appears in.)
libhb/encxvid.c:35: error: syntax error before "xvid_gbl_init"
libhb/encxvid.c:36: error: `xvid_enc_create_t' undeclared (first use in this function)
libhb/encxvid.c:37: error: `xvid_plugin_single_t' undeclared (first use in this function)
libhb/encxvid.c:38: error: `xvid_plugin_2pass1_t' undeclared (first use in this function)
libhb/encxvid.c:39: error: `xvid_plugin_2pass2_t' undeclared (first use in this function)
libhb/encxvid.c:40: error: `xvid_enc_plugin_t' undeclared (first use in this function)
libhb/encxvid.c:52: error: `xvid_gbl_init' undeclared (first use in this function)
libhb/encxvid.c:53: error: `XVID_VERSION' undeclared (first use in this function)
libhb/encxvid.c:54: warning: implicit declaration of function `xvid_global'
libhb/encxvid.c:54: error: `XVID_GBL_INIT' undeclared (first use in this function)
libhb/encxvid.c:56: error: `create' undeclared (first use in this function)
libhb/encxvid.c:66: error: `single' undeclared (first use in this function)
libhb/encxvid.c:81: error: `plugins' undeclared (first use in this function)
libhb/encxvid.c:81: error: `xvid_plugin_single' undeclared (first use in this function)
libhb/encxvid.c:86: error: `rc2pass1' undeclared (first use in this function)
libhb/encxvid.c:89: error: `xvid_plugin_2pass1' undeclared (first use in this function)
libhb/encxvid.c:94: error: `rc2pass2' undeclared (first use in this function)
libhb/encxvid.c:98: error: `xvid_plugin_2pass2' undeclared (first use in this function)
libhb/encxvid.c:116: warning: implicit declaration of function `xvid_encore'
libhb/encxvid.c:116: error: `XVID_ENC_CREATE' undeclared (first use in this function)
libhb/encxvid.c: In function `Close':
libhb/encxvid.c:134: error: `XVID_ENC_DESTROY' undeclared (first use in this function)
libhb/encxvid.c: In function `Work':
libhb/encxvid.c:151: error: `xvid_enc_frame_t' undeclared (first use in this function)
libhb/encxvid.c:151: error: syntax error before "frame"
libhb/encxvid.c:159: error: `frame' undeclared (first use in this function)
libhb/encxvid.c:161: error: `XVID_VERSION' undeclared (first use in this function)
libhb/encxvid.c:165: error: `XVID_CSP_I420' undeclared (first use in this function)
libhb/encxvid.c:168: error: `XVID_VOP_HALFPEL' undeclared (first use in this function)
libhb/encxvid.c:168: error: `XVID_VOP_INTER4V' undeclared (first use in this function)
libhb/encxvid.c:169: error: `XVID_VOP_TRELLISQUANT' undeclared (first use in this function)
libhb/encxvid.c:169: error: `XVID_VOP_HQACPRED' undeclared (first use in this function)
libhb/encxvid.c:172: error: `XVID_VOP_GREYSCALE' undeclared (first use in this function)
libhb/encxvid.c:174: error: `XVID_TYPE_AUTO' undeclared (first use in this function)
libhb/encxvid.c:176: error: `XVID_ME_ADVANCEDDIAMOND16' undeclared (first use in this function)
libhb/encxvid.c:176: error: `XVID_ME_HALFPELREFINE16' undeclared (first use in this function)
libhb/encxvid.c:177: error: `XVID_ME_EXTSEARCH16' undeclared (first use in this function)
libhb/encxvid.c:177: error: `XVID_ME_ADVANCEDDIAMOND8' undeclared (first use in this function)
libhb/encxvid.c:178: error: `XVID_ME_HALFPELREFINE8' undeclared (first use in this function)
libhb/encxvid.c:178: error: `XVID_ME_EXTSEARCH8' undeclared (first use in this function)
libhb/encxvid.c:179: error: `XVID_ME_CHROMA_PVOP' undeclared (first use in this function)
libhb/encxvid.c:179: error: `XVID_ME_CHROMA_BVOP' undeclared (first use in this function)
libhb/encxvid.c:183: error: `XVID_ENC_ENCODE' undeclared (first use in this function)
libhb/encxvid.c:184: error: `XVID_KEYFRAME' undeclared (first use in this function)

gcc -c -o libhb/encxvid.o -Wall -g -O3 -funroll-loops -I./contrib/include -DSYS_LINUX -DHB_VERSION=\"0.7.0\" -DHB_BUILD=2005110400 -D__LIBHB__ -Ilibhb libhb/encxvid.c

...failed Cc libhb/encxvid.o ...
Cc libhb/muxavi.o
Cc libhb/enclame.o
Cc libhb/muxogm.o
Cc libhb/encvorbis.o
Cc libhb/dvd.o
...skipped libhb.a for lack of libhb.a(encxvid.o)...
Cc test/test.o
...skipped HBTest for lack of libhb.a...
...failed updating 3 target(s)...
...skipped 4 target(s)...
...updated 51 target(s)...
[root@localhost HandBrake-0.7.0]# handbrake
bash: handbrake: command not found

The install apparently couldn't find an mpeg2dec.tar and an xvid library. Xvid is alreeady installed. Now what do I do?

rock

saman007uk 01-14-2006 04:12 PM

Quote:

Originally Posted by rocksniffer
There is a free product for windows called vidora ipod converter, but it won't do wmv or vob I don't think. It will convert all others,though, and you can easily cat vobs together and convert to mpeg2 in linux.

Why don't you use Wine to run this on Linux?

microsoft/linux 01-14-2006 04:53 PM

in an answer to the handbrake question, I had the same problem. I believe you need nasm(netwide assembler). You can get it as the sourceforge site. Install nasm, and this will fix your errors. The stuff handbrake is installing is it's dependencies, I think. This way the user doesn't have to worry about having all that installed, handbrake does that for you. download.m0k.org is the website for handbrake

rocksniffer 01-14-2006 10:22 PM

I appreciate the response, ML. I wish it were that simple. I have nasm .98.39 installed. I went to the HandBrake site and asked at their forum. I was surprized to see they have only had a total of 73 articles posted. Is this software that new? Sadly, no one else has posted any such problem. All my problems seem to be unique to me.

saman007uk, I saw your suggestion too. I will try that, but I have never used wine (I can see that going smoothly). I was wrong before. Vidora does fo vob's and wmv's.

Thanks, guys

rocksniffer 01-16-2006 03:54 PM

Handbrake told me to install the svn sources; whatever those are.

microsoft/linux 01-16-2006 04:22 PM

the handbrake program istelf did? Or the forums at handbrake? What version of handbrake are you using? I did the cvs sources, and it's been working fine....

rocksniffer 01-16-2006 11:28 PM

Sorry, the forum response was simply that, "Build HandBrake from the SVN sources". I used HandBrake-0.7.0.tar.gz from their download page. It was a "sources" button. It was the only choice. I didn't think about cvs. I'll try that.

zoroaster 01-17-2006 10:43 AM

I looked into a similar problem in december 2005.

My solution was to rip each stream using mplayer, multiplex them using mplex, then use tovid to transcode to whatever you want. Requires considerable hard drive space. tovid takes a long time to run - I start it in the evening and let it run overnight.

tovid is not available as a deb - you must install the source.

The ripping technique is demonstrated here:

http://radagast.bglug.ca/linux/dvd_m...anscoding.html

later,
andrew.

microsoft/linux 01-18-2006 09:00 AM

SVN is similar to CVS, it stands for subversion, and is just another versioning system. I believe however, that Handbrake uses CVS, so I would try those.

rocksniffer 01-18-2006 02:03 PM

According to a forum notice they lost a server a short time ago too; lost a lot of files irrecoverably. I don't think they are back on their feet yet. I went to http://homepage.mac.com/johnmm/publi...e.DailyBuilds/ which is were they say builds are made daily from the cvs depository and the download link doesn't work.

johnson_steve 01-18-2006 03:09 PM

I have been using this script to make this a little more covenant for my self it's just a quick job and i don't think it will work right with aspect ratios other then 16:9 or 4:3.

Code:

# encodes video to ipod mpeg4 with aac audio

if [ -n "$1" ]
# Test if command line argument (file name) is present (non-empty).
then
  echo "Source file: "$1
else 
  echo "Usage:  enc2ipod <sourcefile> [16:9|4:3]" && exit
fi 

if [ -n "$2" ]
# Test if command line argument (aspect ratio) is present (non-empty).
then

  ffmpeg -i $1 -vcodec mpeg4 -b 640 -s 320x240 -aspect $2 -acodec aac -ab 96 $1.mp4

else

  echo "No aspect ratio specified assuming 16:9" &&  ffmpeg -i $1 -vcodec mpeg4 -b 640 -s 320x176 -aspect 16:9 -acodec aac -ab 96 $1.mp4

fi

exit


microsoft/linux 01-18-2006 05:10 PM

and this is just video correct? not ripping from DVD, but just conversion right? Thanks for posting

johnson_steve 01-18-2006 05:32 PM

this script encodes a video file but doesn't rip the dvd if you have mplayer installed you can rip a dvd like this:
Code:

mplayer -dumpstream -dumpfile rip.vob dvd://
then check the aspect ratio 4:3 - full screen or 16:9 - widescreen and run the script to to encode it (but I hope you have somewhere like 12gig free for working space) this should work if you have any problems let me know. but using this method I was watching a clock work orange the same day I got the ipod

rocksniffer 01-19-2006 08:36 PM

Thats what I am looking for, though when I run it I get "Unknown audio codec 'aac'". Afterward, I checked and installed faac and faad2 then attempted again and got the same. Do I have to enable at ffmpeg install to get it to work? If thats the case can I install from source over my urpmi installation of do I have to uninstall the rpm before. By doing the latter I would have to uninstall kino, klvemkdvd and lve whick would be a pain but I guess i could.

Maybe there is a conf I could edit?

rock

johnson_steve 01-24-2006 03:08 PM

uninstall ffmpeg. then reinstall it from the source. configure with the --enable-aac option. you shouldn't have to uninstall those other apps.

rocksniffer 02-13-2006 09:21 PM

If I try enc2ipod on a VOB derived from a commercially produced video ffmpeg gives a segmentation fault error if I use a home made VOB made with dvdauthor it all works fine. See results below.

$ mplayer -alang eng -dumpstream -dumpfile rip.vob dvd:// (commercial video)
MPlayer dev-CVS-051220-04:08-3.4.3 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Celeron 4 Northwood; Pentium 4 EE/Xeon Prestonia,Gallatin(Family: 15, Stepping: 9)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.


89 audio & 203 video codecs
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.
Playing dvd://.
Reading disc structure, please wait...
There are 62 titles on this DVD.
There are 22 chapters in this DVD title.
There are 1 angles in this DVD title.
DVD successfully opened.
Core dumped ;)

Exiting... (End of file)

$ tcprobe -i rip.vob
[tcprobe] MPEG program stream (PS)
[tcprobe] summary for rip.vob, (*) = not default, 0 = not detected
import frame size: -g 720x480 [720x576] (*)
aspect ratio: 4:3 (*)
frame rate: -f 29.970 [25.000] frc=4 (*)
PTS=0.2806, frame_time=33 ms, bitrate=9800 kbps
audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]
PTS=0.2806, bitrate=192 kbps
-D 0 --av_fine_ms 0 (frames & ms) [0] [0]

$ enc2ipod rip.vob 4:3
Source file: rip.vob
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --prefix=/usr --enable-mp3lame --enable-libogg --enable-vorbis --enable-theora --enable-faad --enable-faadbin --enable-faac --enable-xvid --enable-a52 --enable-a52bin --enable-shared --enable-gpl
libavcodec version: 51.1.0
libavformat version: 50.0.0
built on Jan 22 2006 15:41:03, gcc: 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)
/usr/bin/enc2ipod: line 21: 9557 Segmentation fault ffmpeg -i $1 -vcodecmpeg4 -b 640 -s 320x240 -aspect $2 -acodec aac -ab 96 $1.mp4
[/COLOR]

But then if I try enc2ipod with a VOB made from dvdauthor of my own home video it all works great. Is there a copy protection issue at work here?

ps I threw the -alang switch in thinking there may have been a problem with the mulitple languages in the resulting VOB but results are the same with or without it.

Any clues?

rock

johnson_steve 02-15-2006 07:26 PM

the dvd is css encrypted do you have libdvdcss installed? can you watch said dvd in mplayer? sometimes they switch the stream orders on these to make them more dificult to duplicate (you can use the -map option with ffmpeg to rearange these to a more sensible order, or can you run them through dvdauthor before you run this) A lot of the movies I've been using were previously riped and encoded for 4.7Gb DVD-R but this is working fine for me with these and most of the stuff I get off bittorrent.

rocksniffer 02-15-2006 08:27 PM

I have always been able to play the dvd on xine, mplayer and the rest, and I backed it up using dvdbackup and can play the resulting vob files. I can convert the file to an avi or mpeg with transcode using ffmpeg, and encode that to mp4 with the with your ffmpeg command, Steve.

I just installed all the libdvdstuff available on mandriva's rpm database and the devel versions to no avail, unless I have to reinstall ffmpeg from the cvs source to make use of them. I had libdvdread installed already that should have been all I needed or I wouldn't have been able to play the video as you pointed out.

The workaround is to convert to avi and then enc2ipod. I guess I can do that, unless I have to reinstall from source for ffmpeg to recognize the newly installed lidvdcss and the others. Its a protection issue no doubt. I have tried other ffmpeg encoding options with the same results; my personal vobs work, commercial ones don't.

i am still working on it but I am pretty stumped. The next thing I am going to do is remove it and install a rpm version, if that works on the commercial vobs I will try the cvs again. The reason I went with the source install is the urpmi install did not enable aac for ipod mp4, but that will be a different error.

I will report the results this weekend. If you can think of anything else let me know.

Thanks,

rock

johnson_steve 02-16-2006 05:04 PM

Sorry, I haven't been out to blockbuster in a while; I owe them money and why get off my ass when I can just get it off bittorrent. so I don't believe I've tested this with commercial dvds at all mostly tv shows off bittorrent. also this worked for me right away so I had no reason to improve it (very crude) but I have everything (I mean everything it's gentoo) installed from source and this could have something to do with it.

rocksniffer 02-18-2006 04:27 PM

A search of the ffmpeg cvs bug report archives revealed this:

Hi

On Fri, Feb 10, 2006 at 09:02:32PM +0000, Tyler Loch wrote:
> In the latest CVS builds, .vob program streams, giving an "Unknown format" when
> read.

should be fixed

[...]

--
Michael

The rest of the thread can be seen at:

http://mplayerhq.hu/pipermail/ffmpeg...ry/007386.html

Note the date. I downloaded another cvs and the problem of vobs went away.

Live and learn

rock

johnson_steve 02-21-2006 11:09 AM

So it works now?

rocksniffer 02-23-2006 04:28 PM

Yes, now it works, though I can't explain why it affected only commercial vobs.


All times are GMT -5. The time now is 10:47 PM.