LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Linux Answers > Applications / GUI / Multimedia
User Name
Password

Notices

By Steel_J at 2004-10-27 20:41
DVD ripping guide

I have read many guides on how to this in Linux and decided that I would create my own keeping it as simple for newbies as it can be.

This guide lets you rip a DVD (all titles or just the main movie) and burn it on a DVD-R (4.7) that will play on your standalone player.

It is mainly command line, but fear not. It's easy.

One precision before we start. When I say in the guide open a console. I mean go in whatever file manager you use and open the console from the folder you want to work in.
You could also just ' cd ' to it manually. Also you can just copy and paste my commands.

Tools needed: DVD:Rip / dvdauhtor / transcode / mjpegtools / k3b

Optional: Kavi2svcd / AviDemux2 / QDVDAuthor or Klvemkdvd

1) Rip the DVD title(s) to harddisk with DVD:RIP in a project folder. This will create VOB files of the chosen title in that folder containing the movie and the soundtrack you picked.


2) Most of the time you will get around 5 or 6 numbered VOB's from a ripped title in your project folder.

Concatenate (merge)those VOB files into one by running in a console:

cat *.vob > movie.vob



3) You now have 1 VOB file. We need to demutliplex it and get the M2V and AC3 files out of there. From the folder, again using the console run:

tcextract -i movie.vob -t vob -x mpeg2 > movie.m2v
tcextract -i movie.vob -a 0 -x ac3 -t vob > movie.ac3

They will run one after the other, don't worry and will produce an M2V and an AC3 file.

4) To requantize (shrink like DVDShrink on Windows) your movie so it will fit on a single DVD-R (4.7) do as such:

tcrequant -i movie.m2v -o shrink ed.m2v -f 1.5

The 1.5 at the end is the shrink factor if you like. 1 keeps the movie the same (just a reference) and 2.0 would reduce it to 50% of its size. So 1.5 seems reasonable as it equals 75% of the original size once processed.

If you prefer you can calculate the exact factor yourself with this formula:

requant_factor = (video_size / (4700000000 - audio_size)) * 1.04

If you are including more than one audio stream or a subtitle stream, those file sizes must also be subtracted from the maximum dvd image size.

All sizes are in bits.


5) Now we need to re multiplex those 2 files into a compliant DVDauthor file:

mplex -f 8 -o final.mpg shrinked.m2v movie.ac3

Note: mplex will detect if a pulldown is necessary and do it.

After multiplexing, always test your mpg by playing it in XINE or other. Navigate the movie file and watch dialog to see if audio and video are in sync.

If we see that the audio is out of sync a good way of finding the exact value is opening the mpg with AviDemux2. Using tcprobe -i final.mpg also outputs the shift values for video and audio , you have to add them up.

To fix audio sync problems we would add the -O option with a value in milliseconds. (A / V sync is a large issue that I will not analyze here, this is for reference only if ever you would have sync issues with a DVD.)

For example, if tcprobe -i or Avidemux2 upon opening the mpg file, informed us that an audio/ video shift of 66ms existed in between the streams we would add the "-O 66ms" like so:


6) You can now add the mpg to QDVDAuthor or Klvemkdvd authoring programs and create your DVD or use dvdauthor from the command line as such:

dvddirgen -o newdvd (create a dvd structure in a folder named newdvd)

- Populate de filesystem like so:

dvdauthor -o newdvd final.mpg

- Create DVD information (IFO) files:

dvdauthor -o newdvd -T


7)Burn the Video_TS and Audio_TS created with K3B DVD Video mode.



So here is a quick summary:

1) Rip the DVD with DVD:RIP in a project folder

2) Concatenate VOB files into one by running:

cat *.vob > movie.vob


3) Demux it:

tcextract -i movie.vob -t vob -x mpeg2 > movie.m2v
tcextract -i movie.vob -a 0 -x ac3 -t vob > movie.ac3


4) Requantize it:

tcrequant -i movie.m2v -o shrinked.m2v -f 1.5

formula:

requant_factor = (video_size / (4700000000 - audio_size)) * 1.04

If you are including more than one audio stream or a subtitle stream, those filesizes must also be subtracted from the maximum dvd image size.


5) Remultiplex:

mplex -f 8 -o final.mpg shrinked.m2v movie.ac3

To fix AV sync, add the -O XXms option like so:

mplex -f 8 -O 66ms -o final.mpg shrinked.m2v movie.ac3

Thus correcting the sync problem.


6) Author DVD



Happy authoring!

Steel_J;)
























by bruno buys on Wed, 2004-11-17 21:18
Its funny how things happen synchronically... I just managed to get a dvd writer, and got a bit frustrated to know there aren't dvd9's on the market yet. At least here in Rio, the vendors told me they are still expensive and not cost-effective.
So, your document fits like a glove. I can only thank you for putting this to public!

My observations are:

1. In debian sarge, you can easily install the needed programs by adding this source to your sources.list, or ftping this link, as you wish:
ftp://ftp.nerim.net/debian-marillat/...n/binary-i386/
This is a non-official debian repository, with lots of dvd and video related debs. Very good.

2. Its kind to warn people that this process takes a lot of disk space. Be prepared to allocate ~15-20GB, depending on the dvd. Some old filesystems (fat) won't support files bigger than 4GB, and can't be used to rip dvd's.

3. Its a good idea to have a spare partition to do this, as you are gonna be writing and erasing very big files.

4. mplex is a bit intolerant about inputs. Some of my trials failed due to misripped files. Also, apparently, I can't remove the first vob of the chain and encode the rest, mplex complains of missing things and won't finish. To be precise, it complained of files ripped using dvdbackup.

That's it. Thanks again!

by sk545 on Wed, 2004-12-08 16:05
Alright, i tried out the pre-Alpha script from the other thread, here is what i thought:

1) Colors, colors, colors. Wow, very neat. Keep em there. Only problem i see is that if someone has a different background color for the console, some colors might appear weird to them. My console background is black, and they look good to me. Maybe have it change the background of the console, dunno how one would do that since people use so many different consoles.

2) /dev/dvd didn't work for me and i had to change all the /dev/dvd's to /dev/hdc.

3) dvrequant is spelled wrong when script is launched (or is that one purpose??):

DeeVRequant v0.1a

3) Last but not least, it appears the script didn't work for me. It starts up, then dies a few seconds later

$ bash dvrequant.sh

====================
* DeeVRequant v0.1a *
====================

Requirement: mplayer / libdvdcss / transcode / mjpegtools / dvdauhtor

We will create a work folder called dv_output in the path of your choice. Make sure you have at least 12 gigabytes of space available.

Enter the path to create the directory (ex. /home/bobby/video) >/tmp

libdvdread: Using libdvdcss version 1.2.8 for DVD access
[tcprobe] DVD image/device
libdvdread: Using libdvdcss version 1.2.8 for DVD access
(dvd_reader.c) mpeg2 ntsc 4:3 U0 720x480 video
(dvd_reader.c) ac3 en drc 48kHz 6Ch
(dvd_reader.c) ac3 en drc 48kHz 6Ch
(dvd_reader.c) ac3 en drc 48kHz 6Ch
(dvd_reader.c) ac3 en drc 48kHz 6Ch
(dvd_reader.c) ac3 en drc 48kHz 6Ch
(dvd_reader.c) ac3 en drc 48kHz 6Ch
(dvd_reader.c) ac3 en drc 48kHz 6Ch
(dvd_reader.c) ac3 en drc 48kHz 6Ch
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) -- Unspecified Subs --
(dvd_reader.c) DVD title 1/23: 1 chapter(s), 1 angle(s), title set 1
(dvd_reader.c) title playback time: 00:00:05.00 6 sec
(dvd_reader.c) [Chapter 01] 00:00:00.000 , block from 0 to 97
[tcprobe] summary for /dev/hdc, (*) = not default, 0 = not detected
import frame size: -g 720x480 [720x576] (*)
aspect ratio: 4:3 (*)
frame rate: -f 23.976 [25.000] frc=1 (*)
audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]
audio track: -a 1 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]
audio track: -a 2 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]
audio track: -a 3 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]
audio track: -a 4 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]
audio track: -a 5 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]
audio track: -a 6 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]
audio track: -a 7 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]
[tcprobe] V: 144 frames, 6 sec @ 23.976 fps
[tcprobe] A: 0.09 MB @ 128 kbps
[tcprobe] CD: 650 MB | V: 649.9 MB @ 908634.8 kbps
[tcprobe] CD: 700 MB | V: 699.9 MB @ 978539.9 kbps
[tcprobe] CD: 1300 MB | V: 1299.9 MB @ 1817400.7 kbps
[tcprobe] CD: 1400 MB | V: 1399.9 MB @ 1957210.8 kbps
MPlayer 1.0pre5-3.3.5 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Athlon Thunderbird 998.6 MHz (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled for Debian.
Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/sk545/.mplayer/config
Reading /home/sk545/.mplayer/codecs.conf: Can't open '/home/sk545/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 73 audio & 180 video codecs
Font /home/sk545/.mplayer/font/font.desc loaded successfully! (206 chars)
Failed to open /dev/rtc: Permission denied (it should be readable by the user.)
Using usleep() timing
Can't open input config file /home/sk545/.mplayer/input.conf: No such file or directory
Input config file /etc/mplayer/input.conf parsed: 53 binds
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0 : Permission denied
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://1.
libdvdread: Using libdvdcss version 1.2.8 for DVD access
Reading disc structure, please wait...
There are 23 titles on this DVD.
There are 1 chapters in this DVD title.
There are 1 angles in this DVD title.

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VIDEO_TS.VOB at 0x00000189
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x000001f2
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x00008c95
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_0.VOB at 0x00008d39
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x00008d72
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_0.VOB at 0x0029e67b
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_1.VOB at 0x0029e6b4
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_0.VOB at 0x002b3186
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_1.VOB at 0x002b31bf
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_0.VOB at 0x002ccd8f
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_1.VOB at 0x002ccdc8
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_0.VOB at 0x002ee0e5
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_1.VOB at 0x002ee11e
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_07_0.VOB at 0x00304a0f
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_07_1.VOB at 0x00304a48
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_08_0.VOB at 0x00312246
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_08_1.VOB at 0x0031227f
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_09_0.VOB at 0x00328436
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_09_1.VOB at 0x0032846f
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_10_0.VOB at 0x0033e538
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_10_1.VOB at 0x0033e571
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_11_0.VOB at 0x00349329
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_11_1.VOB at 0x00349362
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_12_0.VOB at 0x0036d5ec
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_12_1.VOB at 0x0036d625
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_13_0.VOB at 0x00387e4b
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_13_1.VOB at 0x00387e84
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_14_0.VOB at 0x00391221
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_14_1.VOB at 0x0039125a
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_15_0.VOB at 0x00396ec7
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_15_1.VOB at 0x00396f00
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_16_0.VOB at 0x003a02c1
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_16_1.VOB at 0x003a02fa
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_17_0.VOB at 0x003a4619
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_17_1.VOB at 0x003a4652
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_18_0.VOB at 0x003a5ed1
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_18_1.VOB at 0x003a5f0a
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_19_0.VOB at 0x003afb2e
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_19_1.VOB at 0x003afb67
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_20_0.VOB at 0x003b9790
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_20_1.VOB at 0x003b97c9
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_21_0.VOB at 0x003bc056
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_21_1.VOB at 0x003bc08f
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_22_0.VOB at 0x003bde57
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_22_1.VOB at 0x003bde90
libdvdread: Elapsed time 0
libdvdread: Found 22 VTS's
libdvdread: Elapsed time 0
DVD successfully opened.
Core dumped

Exiting... (End of file)


======================================
You can eject the DVD now if you want.
======================================

tc_memcpy: using mmxext for memcpy
[tcextract] (pid=4371) MPEG program stream (PS)
[tcextract] (pid=4371) starting, doing mpeg2
[tcextract] (pid=4371) exit [tcextract] exit code (0)
tc_memcpy: using mmxext for memcpy
[tcextract] (pid=4372) MPEG program stream (PS)
[tcextract] (pid=4372) starting, doing ac3
[tcextract] (pid=4372) exit [tcextract] exit code (0)


===============================
Calculating best requant factor.
===============================

dvrequant.sh: line 108: 4700000000-0 lang_en: syntax error in expression (error token is "lang_en")
(standard_in) 1: parse error
(standard_in) 1: parse error

======================================
Requant factor for this movie is:
======================================



=========================================
Requantizing (shrinking) the video stream.
=========================================
tcrequant: option requires an argument -- f
tcrequant (transcode v0.6.14pre1) (C) 2003 Antoine Missout

Usage: tcrequant [options]
-i name input file name [stdin]
-o file output file name [stdout]
-d mode verbosity mode
-f factor requantize factor [1.5]
-b N remove byte stuffing [1]
-v print version


======================================
Multiplexing audio and video stream(s).
======================================

INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
**ERROR: [mplex] Unable to open file shrinked.m2v for reading.

===============================================================================
Done! You can use any DVD authoring program to create a DVD out of -final.mpg-




This is what i had in /tmp:

/tmp/dv_output$ ls -l -h
total 352K
-rw-r--r-- 1 sk545 sk545 0 2004-12-08 15:52 lang_en.ac3
-rw-r--r-- 1 sk545 sk545 174K 2004-12-08 15:52 output.m2v
-rw-r--r-- 1 sk545 sk545 176K 2004-12-08 15:52 output.mpg

If i play output.mpg, i just get the FBI warning screen.

by Steel_J on Thu, 2004-12-09 03:25
Humm

It did not rip the DVD main title. What DVD is it? and from what country if you don't mind.

Since it did not rip anything more than a few bytes that is why everything crashed afterwards.

I don't know if it makes a big difference, but could you run the script as bash dvdrequant without the .sh extension?

I will do more test with different movies, I am in using NTSC format where I live. Is it PAL where you live?

I will look into getting a fixed background color and I also fixed the typo in the title of the script.

Thanks for your feedback.

Reading the output I can see

by sk545 on Thu, 2004-12-09 08:49
That one is from a dvd called "Muhammad: Legacy of a Prophet", which is NTSC. So, it has other languages in it for sure. However, i tried another dvd that i found lying around "Clockwork Genes" (all english) which also did not work, it just shows the same behaviour as above one did. I am in the US, so all i have is NTSC. Removing the ".sh" extension doesn't help either.

I am also wondering how is it able to bypass dvd copy protections...is that something that depends on my dvd drive? Right now i am using NEC-2500A burner with the latest firmware (1.07). Or do dvd's not use copy protections like safedisc, etc, like the ones used on games?

by Steel_J on Thu, 2004-12-09 13:22
Aaaaaaaaaaaaahhhhh, now I get it. This is the source of the problem.

Yes DVD's are encrypted.

You are missing a very crucial dependency. It is called Libdvdcss.

libdvdcss is a library used to unlock the css encryption protocol on commercial DVD's.

For the script to work you need the following packages: mplayer, libdvdcss , transcode , mjpegtools and dvdauhtor.

That is why you can get past the FBI warning. My scipt does not check for dependencies yet.

You can find libdvdcss by searching RPM Find website: http://rpm.pbone.net/ or by googling around. AT RPM find there will be a packaged file for your distro.

by sk545 on Thu, 2004-12-09 16:01
Hrm, i got these installed already:

libdvdcss2 1.2.8-0.0 Simple foundation for reading DVDs - runtime

libdvdread3 0.9.4-5 Simple foundation for reading DVDs

libdvdcss2 gives me these files:

# dpkg -L libdvdcss2
/.
/usr
/usr/share
/usr/share/bug
/usr/share/bug/libdvdcss2
/usr/share/bug/libdvdcss2/control
/usr/share/doc
/usr/share/doc/libdvdcss2
/usr/share/doc/libdvdcss2/README
/usr/share/doc/libdvdcss2/copyright
/usr/share/doc/libdvdcss2/changelog.gz
/usr/share/doc/libdvdcss2/NEWS.gz
/usr/share/doc/libdvdcss2/changelog.Debian.gz
/usr/lib
/usr/lib/libdvdcss.so.2.0.7
/usr/lib/libdvdcss.so.2


Is that the correct libdvdcss or are there other kinds too? Right now i am blaming my dvd-rw drive, but the funny thing is that i am able to make a iso of the same dvd with the 'readcd' command. Why would that work?

/Edit: I do notice these comments in the debian README, not sure if they help:

Code:
Running lidvdcss
================

The behaviourof the library can be affected by changing two environment
variables:
  DVDCSS_METHOD={title|disc|key}: method for key decryption
    title: decrypted title key is guessed from the encrypted sectors of
           the stream. Thus it should work with a file as well as the
           DVD device. But it sometimes takes much time to decrypt a title
           key and may even fail. With this method, the key is only checked
           at the beginning of each title, so it won't work if the key
           changes in the middle of a title.
    disc: the disc key is first cracked ; then all title keys can be
           decrypted instantly, which allows us to check them often,
    key: the same as "disc" if you don't have a file with player keys at
           compilation time. If you do, the decryption of the disc key
           will be faster with this method. It is the one that was used by
           libcss.
           This is the default method,
  DVDCSS_VERBOSE={0|1|2}: libdvdcss verbosity
    0: no error messages, no debug messages,
    1: only error messages (this is the default)
    2: error and debug messages
/Edit 2 :

I looked through the script, and found the following:

Code:
# Rip the DVD  title 1 with audio0, usually en (english)

                          mplayer -dvd-device /dev/hdc dvd://1 -dumpstream -dumpfile $path/dv_output/output.mpg

Whats throwing me off there is that, how does it know which session to rip? Is it ripping the longest session on the dvd or just the first session? Not trying to be a smartass, but i was thinking maybe its just ripping the very first session and ignoring the rest.....hence i just get the FBI warning.

by Steel_J on Thu, 2004-12-09 23:57
Right you are.

I need to look at that mplayer command closely. It is suppose to look for tiltle 1, most of the time the longest one and that gives me no problem on my system but it may be a different thing on other distros or hardware.

In the mplayer command

Don't be to quick to blame your DVD-RW. It's probably a bug in my script. There are many other ways to rip a DVD title. I could use another method if I want but for now I think I will

Any software must be made to work on as much platforms as it can. Scipt included.

As for your version of libdvdcss it is perfect. 1.28 is the current version and it'S the one I have also.

A revised version soon, just need to run a test.

by Steel_J on Fri, 2004-12-10 01:01
Here I modified a few things in my script:

1) Fixed typo in title
2) Added choice of DVD device name
3) Added choice of titleset to rip
4)Fixed some colors

Here is the new code:
Code:
#! /bin/bash

# DeeVrequant script    {   }  

# Will rip a DVD-9 disc main title and audio tracks 0 and requantize it to fit on a DVD-R 4.7
# Steel_J  2004-12-10

# Requirement: mplayer / libdvdcss / transcode / mjpegtools / dvdauhtor /

#========================================================

# Presentation

clear
version=0.11a
COLOROFF="\033[1;0m"   # standart color
COLOR1="\033[1;32m"     # green
COLOR2="\033[1;37m"     # white
COLOR3="\033[1;36m"     # blue
COLOR4="\033[1;31m"     # red

echo -e "${COLOR1} ===================="
echo -e "${COLOR4} * DVRequant v${version} *${COLOR1}"
echo -e "${COLOR1} ===================="
echo -e "$COLOR3"

echo "Requirement: mplayer / libdvdcss / transcode / mjpegtools / dvdauhtor"

#===========================================================================

# Create project folder and choose preferences

echo
echo "We will create a work folder called dv_output in the path of your choice. Make sure you have at least 12 gigabytes of space available."

     echo " "
     echo -n "Enter the path to create the directory (ex. /home/bobby/video) >"
     
         read -e path

                cd $path
		    mkdir dv_output
		    
#==========================================================================

# Define path to DVD device    

 echo " "
     echo -n "Enter name of your DVD device (ex. /dev/dvd or /dev/hdc) >"
     
         read -e dvd

echo -e "$COLOR4"

#==========================================================================

# Show the DVD properties

   tcprobe -i /dev/dvd -T 1 -H 10     #not implemented   2>&1 | egrep " \[chapters ..\] " > chapters
   
echo -e "$COLOR1"
  
#==========================================================================

# Ask the user witch video title he wants to rip from DVD

 echo " "
     echo -n "From tcprobe output above, what title set do you want to rip? (ex. 1, 2 or 3) >"
     
         read -e title

echo -e "$COLOR4"
 
#==========================================================================
  
# Rip the DVD  title 1 with audio0, usually en (english)

                          mplayer -dvd-device $dvd dvd://$title -dumpstream -dumpfile $path/dv_output/output.mpg  

# Rip the french audio tracks  ---not implemented

                          #mplayer -dvd-device /dev/dvd dvd://1 -dumpaudio -alang fr -dumpfile $path/dv_output/lang_fr.ac3  
    
    #this can be modified to rip any other languages by replacing "fr" by any other appropriate codes:
    
    echo -e "$COLOR3"
    echo " "
    echo "====================================== "
    echo "You can eject the DVD now if you want."
    echo "====================================== "
    echo " "
    
#========================================================================    
    
 # De multiplex the video stream and the audio stream (-d2 is for verbosity)
 
    cd $path/dv_output
    
                                tcextract -i output.mpg -t vob -x mpeg2 -d2 > output.m2v
                                tcextract -i output.mpg -a 0 -x ac3 -t mpeg2 -d2 > lang_en.ac3
    
#============================================================================
    
 # Calculate requant factor     {   }     

     #requant_factor = (video_size / (4700000000 - audio_size)) * 1.04

     #If you are including more than one audio stream or a subtitle stream, those   
     #filesizes must also be subtracted from the maximum dvd image size.
     
    echo -e "$COLOR4"
    echo " "
    echo "=============================== "
    echo "Calculating best requant factor."
    echo "=============================== "
    echo " "
 

vsize=`du -b output.m2v | cut -c 1-10`         #video_size
audio=`du -b lang_en.ac3 | cut -c 1-9`       #audio_size0
                                                                       
                  
     dvdlessaudio=$((4700000000-$audio))
     division=$(echo "scale=2; $vsize/$dvdlessaudio" | bc)
                 
                          req=$(echo "scale=2; $division*1.04" | bc)     #requant_factor  
			 
			  echo " " 
			  echo "====================================== "
			  echo "Requant factor for this movie is:"  "$req"
			  echo "====================================== "
			  echo " "
   
#========================================================================
     
# Requantize it:

    echo -e "$COLOR3"
    echo " "
    echo "========================================= "
    echo "Requantizing (shrinking) the video stream."
    echo "========================================= "

                                    tcrequant -d2 -i output.m2v -o shrinked.m2v -f $req

     
#========================================================================
     
# Remultiplex:

    echo -e "$COLOR1"
    echo " "
    echo "====================================== "
    echo "Multiplexing audio and video stream(s)."
    echo "====================================== "
    echo " "
 
                                      mplex -f 8 -o final.mpg shrinked.m2v lang_en.ac3             #lang_fr.ac3
     
     echo " "
     echo "==============================================================================="
     echo "Done! You can use any DVD authoring program to create a DVD out of  -final.mpg-"
     echo "==============================================================================="
     
     echo -e "$COLOR2"
#========================================================================     
     
# Re-author it

#========================================================================

# End messages

by Steel_J on Fri, 2004-12-10 01:04
Just did a test run with the movie Black Hawk Down and it ran flawlessly.

Here is the output:
Quote:
====================
* DVRequant v0.11a *
====================

Requirement: mplayer / libdvdcss / transcode / mjpegtools / dvdauhtor

We will create a work folder called dv_output in the path of your choice. Make sure you have at least 12 gigabytes of space available.

Enter the path to create the directory (ex. /home/bobby/video) >/video_1
mkdir: cannot create directory `dv_output': File exists

Enter name of your DVD device (ex. /dev/dvd or /dev/hdc) >/dev/dvd

libdvdread: Using libdvdcss version 1.2.8 for DVD access
[tcprobe] DVD image/device
libdvdread: Using libdvdcss version 1.2.8 for DVD access
(dvd_reader.c) mpeg2 ntsc 16:9 only letterboxed U0 NTSC CC 1 720x480 video
(dvd_reader.c) ac3 en drc 48kHz 6Ch
(dvd_reader.c) ac3 fr drc 48kHz 2Ch
(dvd_reader.c) subtitle 00=<en>
(dvd_reader.c) subtitle 01=<fr>
(dvd_reader.c) subtitle 02=<zh>
(dvd_reader.c) subtitle 03=<th>
(dvd_reader.c) DVD title 1/4: 28 chapter(s), 1 angle(s), title set 1
(dvd_reader.c) title playback time: 02:24:12.10 8653 sec
(dvd_reader.c) [Chapter 01] 00:00:00.000 , block from 0 to 372904
(dvd_reader.c) [Chapter 02] 00:20:35.867 , block from 372905 to 525593
(dvd_reader.c) [Chapter 03] 00:29:38.100 , block from 525594 to 632668
(dvd_reader.c) [Chapter 04] 00:34:53.433 , block from 632669 to 670670
(dvd_reader.c) [Chapter 05] 00:36:52.699 , block from 670671 to 744243
(dvd_reader.c) [Chapter 06] 00:40:46.832 , block from 744244 to 794952
(dvd_reader.c) [Chapter 07] 00:43:09.399 , block from 794953 to 920831
(dvd_reader.c) [Chapter 08] 00:49:09.699 , block from 920832 to 953878
(dvd_reader.c) [Chapter 09] 00:50:50.199 , block from 953879 to 1026665
(dvd_reader.c) [Chapter 10] 00:59:03.999 , block from 1026666 to 1119507
(dvd_reader.c) [Chapter 11] 01:04:00.899 , block from 1119508 to 1218892
(dvd_reader.c) [Chapter 12] 01:06:55.866 , block from 1218893 to 1282211
(dvd_reader.c) [Chapter 13] 01:10:47.433 , block from 1282212 to 1359971
(dvd_reader.c) [Chapter 14] 01:12:23.499 , block from 1359972 to 1394695
(dvd_reader.c) [Chapter 15] 01:24:45.698 , block from 1394696 to 1546949
(dvd_reader.c) [Chapter 16] 01:26:29.231 , block from 1546950 to 1652354
(dvd_reader.c) [Chapter 17] 01:32:03.431 , block from 1652355 to 1692075
(dvd_reader.c) [Chapter 18] 01:38:43.431 , block from 1692076 to 1801154
(dvd_reader.c) [Chapter 19] 01:43:57.265 , block from 1801155 to 1931612
(dvd_reader.c) [Chapter 20] 01:45:58.832 , block from 1931613 to 2027674
(dvd_reader.c) [Chapter 21] 01:48:27.599 , block from 2027675 to 2063514
(dvd_reader.c) [Chapter 22] 01:57:25.566 , block from 2063515 to 2104467
(dvd_reader.c) [Chapter 23] 02:00:52.732 , block from 2104468 to 2175708
(dvd_reader.c) [Chapter 24] 02:02:37.332 , block from 2175709 to 2273089
(dvd_reader.c) [Chapter 25] 02:03:31.398 , block from 2273090 to 2351373
(dvd_reader.c) [Chapter 26] 02:05:34.531 , block from 2351374 to 2389310
(dvd_reader.c) [Chapter 27] 02:08:20.398 , block from 2389311 to 2407903
(dvd_reader.c) [Chapter 28] 02:12:59.098 , block from 2407904 to 2451783
[tcprobe] summary for /dev/dvd, (*) = not default, 0 = not detected
import frame size: -g 720x480 [720x576] (*)
aspect ratio: 16:9 (*)
frame rate: -f 23.976 [25.000] frc=1 (*)
audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]
audio track: -a 1 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]
[tcprobe] V: 207465 frames, 8653 sec @ 23.976 fps
[tcprobe] A: 135.20 MB @ 128 kbps
[tcprobe] CD: 650 MB | V: 514.8 MB @ 499.1 kbps
[tcprobe] CD: 700 MB | V: 564.8 MB @ 547.5 kbps
[tcprobe] CD: 1300 MB | V: 1164.8 MB @ 1129.2 kbps
[tcprobe] CD: 1400 MB | V: 1264.8 MB @ 1226.2 kbps


From tcprobe output above, what title do you want to rip? (ex. 1, 2 or 3) >1

MPlayer 1.0pre5-3.4.1 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton 3173 MHz (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/jeff/.mplayer/config
Reading /home/jeff/.mplayer/codecs.conf: Can't open '/home/jeff/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 73 audio & 180 video codecs
Linux RTC init error in ioctl (rtc_irqp_set 1024): Invalid argument
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
Using usleep() timing
Can't open input config file /home/jeff/.mplayer/input.conf: No such file or directory
Input config file /etc/mplayer/input.conf parsed: 53 binds
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://1.
Reading disc structure, please wait...
There are 4 titles on this DVD.
There are 28 chapters in this DVD title.
There are 1 angles in this DVD title.
DVD successfully opened.
Core dumped

Exiting... (End of file)
dvrequant: line 79: g: command not found


======================================
You can eject the DVD now if you want.
======================================

[tcextract] (pid=9462) MPEG program stream (PS)
[tcextract] (pid=9462) starting, doing mpeg2
[tcextract] (pid=9462) exit [tcextract] exit code (0)
[tcextract] (pid=9717) MPEG program stream (PS)
[tcextract] (pid=9717) starting, doing ac3
[tcextract] (pid=9717) exit [tcextract] exit code (0)


===============================
Calculating best requant factor.
===============================


======================================
Requant factor for this movie is: 1.18
======================================



=========================================
Requantizing (shrinking) the video stream.
=========================================
[tcrequant] MPEG2 Requantiser by Makira.
[tcrequant] Using 1.180000 as factor.


======================================
Multiplexing audio and video stream(s).
======================================

INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplex] File shrinked.m2v looks like an MPEG Video stream.
INFO: [mplex] File lang_en.ac3 looks like an AC3 Audio stream.
INFO: [mplex] Video stream 0: profile 8 selected - ignoring non-standard options!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting dvdauthor DVD output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (shrinked.m2v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 720
INFO: [mplex] Frame height : 480
INFO: [mplex] Aspect ratio : 16:9 display
INFO: [mplex] Picture rate : 29.970 frames/sec
INFO: [mplex] Bit rate : 9800000 bits/sec
INFO: [mplex] Vbv buffer size : 229376 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: AC3 Audio stream 00 (lang_en.ac3)
INFO: [mplex] AC3 frame size = 1792

INFO: [mplex] AC3 AUDIO STREAM:
INFO: [mplex] Bit rate : 57344 bytes/sec (448 kbit/sec)
INFO: [mplex] Frequency : 48000 Hz
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 10470296
INFO: [mplex] target data-rate specified : 10080000
++ WARN: [mplex] Target data rate lower than computed requirement!
++ WARN: [mplex] N.b. a 20% or so discrepancy in variable bit-rate
++ WARN: [mplex] streams is common and harmless provided no time-outs will occur
INFO: [mplex] Run-in Sectors = 89 Video delay = 13019 Audio delay = 16022
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf= 237568 frame=000000 sector=00000000
INFO: [mplex] Audio bd: buf= 16384 frame=000000 sector=00000000
++ WARN: [mplex] Discarding incomplete final frame AC3 stream 0!
INFO: [mplex] STREAM e0 completed @ frame 207733.
INFO: [mplex] STREAM bd completed @ frame 270652.
INFO: [mplex] Multiplex completion at SCR=779470994.
INFO: [mplex] Video e0: buf= 228312 frame=207733 sector=02026840
INFO: [mplex] Audio bd: buf= 2048 frame=270652 sector=00240581
INFO: [mplex] VIDEO_STATISTICS: e0
INFO: [mplex] Video Stream length: 4086678527 bytes
INFO: [mplex] Sequence headers: 17337
INFO: [mplex] Sequence ends : 0
INFO: [mplex] No. Pictures : 207734
INFO: [mplex] No. Groups : 17337
INFO: [mplex] No. I Frames : 17337 avg. size 53863 bytes
INFO: [mplex] No. P Frames : 52177 avg. size 32387 bytes
INFO: [mplex] No. B Frames : 138221 avg. size 10584 bytes
INFO: [mplex] Average bit-rate : 3774800 bits/sec
INFO: [mplex] Peak bit-rate : 11372000 bits/sec
INFO: [mplex] BUFFERING min 15 Buf max 222862
INFO: [mplex] AUDIO_STATISTICS: bd
INFO: [mplex] Audio stream length 485011456 bytes.
INFO: [mplex] Frames : 231180658
INFO: [mplex] BUFFERING min 35 Buf max 8771
INFO: [mplex] MUX STATUS: no under-runs detected.

===============================================================================
Done! You can use any DVD authoring program to create a DVD out of -final.mpg-
===============================================================================

by sk545 on Fri, 2004-12-10 13:10
Alright, the good news is that it works. The bad news is that it doesn't work as its supposed to (bug?). So i put in the "Muhammad" dvd and ran the script with the following output ( I have put in bold as to what i thought went wrong):

bash dvrequant

====================
* DVRequant v0.11a *
====================

Requirement: mplayer / libdvdcss / transcode / mjpegtools / dvdauhtor

We will create a work folder called dv_output in the path of your choice. Make sure you have at least 12 gigabytes of space available.

Enter the path to create the directory (ex. /home/bobby/video) >/tmp

Enter name of your DVD device (ex. /dev/dvd or /dev/hdc) >/dev/hdc Selected /dev/hdc

(ioaux.c) invalid filename or host "/dev/dvd"

^^ I don't see that error on your "BHD" output. Harmless??


From tcprobe output above, what title set do you want to rip? (ex. 1, 2 or 3) >2 Selected track 2

^^ Shouldn't that come up later?

MPlayer 1.0pre5-3.3.5 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Athlon Thunderbird 1115 MHz (Family: 6, Stepping: 2)Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled for Debian.
Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/sk545/.mplayer/config
Reading /home/sk545/.mplayer/codecs.conf: Can't open '/home/sk545/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 73 audio & 180 video codecs
Font /home/sk545/.mplayer/font/font.desc loaded successfully! (206 chars)
Failed to open /dev/rtc: Permission denied (it should be readable by the user.)
Using usleep() timing
Can't open input config file /home/sk545/.mplayer/input.conf: No such file or directory
Input config file /etc/mplayer/input.conf parsed: 53 binds
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0 : Permission denied
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://2.
libdvdread: Using libdvdcss version 1.2.8 for DVD access
Reading disc structure, please wait...
There are 23 titles on this DVD.
There are 20 chapters in this DVD title.
There are 1 angles in this DVD title.

^^ tcprobe should have asked for which session just before this

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VIDEO_TS.VOB at 0x00000189
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x000001f2
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x00008c95
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_0.VOB at 0x00008d39
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x00008d72
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_0.VOB at 0x0029e67b
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_1.VOB at 0x0029e6b4
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_0.VOB at 0x002b3186
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_1.VOB at 0x002b31bf
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_0.VOB at 0x002ccd8f
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_1.VOB at 0x002ccdc8
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_0.VOB at 0x002ee0e5
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_1.VOB at 0x002ee11e
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_07_0.VOB at 0x00304a0f
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_07_1.VOB at 0x00304a48
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_08_0.VOB at 0x00312246
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_08_1.VOB at 0x0031227f
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_09_0.VOB at 0x00328436
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_09_1.VOB at 0x0032846f
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_10_0.VOB at 0x0033e538
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_10_1.VOB at 0x0033e571
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_11_0.VOB at 0x00349329
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_11_1.VOB at 0x00349362
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_12_0.VOB at 0x0036d5ec
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_12_1.VOB at 0x0036d625
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_13_0.VOB at 0x00387e4b
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_13_1.VOB at 0x00387e84
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_14_0.VOB at 0x00391221
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_14_1.VOB at 0x0039125a
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_15_0.VOB at 0x00396ec7
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_15_1.VOB at 0x00396f00
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_16_0.VOB at 0x003a02c1
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_16_1.VOB at 0x003a02fa
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_17_0.VOB at 0x003a4619
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_17_1.VOB at 0x003a4652
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_18_0.VOB at 0x003a5ed1
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_18_1.VOB at 0x003a5f0a
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_19_0.VOB at 0x003afb2e
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_19_1.VOB at 0x003afb67
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_20_0.VOB at 0x003b9790
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_20_1.VOB at 0x003b97c9
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_21_0.VOB at 0x003bc056
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_21_1.VOB at 0x003bc08f
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_22_0.VOB at 0x003bde57
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_22_1.VOB at 0x003bde90
libdvdread: Elapsed time 0
libdvdread: Found 22 VTS's
libdvdread: Elapsed time 0
DVD successfully opened.
Core dumped

^^ That again looks like is out of place if compared to "BHD"

Exiting... (End of file)


======================================
You can eject the DVD now if you want.
======================================

tc_memcpy: using mmxext for memcpy
[tcextract] (pid=3363) MPEG program stream (PS)
[tcextract] (pid=3363) starting, doing mpeg2
[tcextract] (pid=3363) exit [tcextract] exit code (0)
tc_memcpy: using mmxext for memcpy
[tcextract] (pid=3441) MPEG program stream (PS)
[tcextract] (pid=3441) starting, doing ac3
[tcextract] (pid=3441) exit [tcextract] exit code (0)


===============================
Calculating best requant factor.
===============================


======================================
Requant factor for this movie is: 1.20
======================================



=========================================
Requantizing (shrinking) the video stream.
=========================================
[tcrequant] MPEG2 Requantiser by Makira.
[tcrequant] Using 1.200000 as factor.


======================================
Multiplexing audio and video stream(s).
======================================

INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplex] File shrinked.m2v looks like an MPEG Video stream.
INFO: [mplex] File lang_en.ac3 looks like an AC3 Audio stream.
INFO: [mplex] Video stream 0: profile 8 selected - ignoring non-standard options!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting dvdauthor DVD output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (shrinked.m2v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 720
INFO: [mplex] Frame height : 480
INFO: [mplex] Aspect ratio : 16:9 display
INFO: [mplex] Picture rate : 29.970 frames/sec
INFO: [mplex] Bit rate : 6000000 bits/sec
INFO: [mplex] Vbv buffer size : 229376 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: AC3 Audio stream 00 (lang_en.ac3)
INFO: [mplex] AC3 frame size = 768

INFO: [mplex] AC3 AUDIO STREAM:
INFO: [mplex] Bit rate : 24576 bytes/sec (192 kbit/sec)
INFO: [mplex] Frequency : 48000 Hz
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 6324848
INFO: [mplex] target data-rate specified : 10080000
INFO: [mplex] Setting specified specified data rate: 10080000
INFO: [mplex] Run-in Sectors = 89 Video delay = 13019 Audio delay = 16022
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf= 237568 frame=000000 sector=00000000
INFO: [mplex] Audio bd: buf= 16384 frame=000000 sector=00000000
INFO: [mplex] STREAM bd completed @ frame 218994.
INFO: [mplex] Scanned to end AU 210190
INFO: [mplex] STREAM e0 completed @ frame 210190.
INFO: [mplex] Multiplex completion at SCR=631128356.
INFO: [mplex] Video e0: buf= 19079 frame=210190 sector=02173835
INFO: [mplex] Audio bd: buf= 16384 frame=218994 sector=00083427
INFO: [mplex] VIDEO_STATISTICS: e0
INFO: [mplex] Video Stream length: 4380816965 bytes
INFO: [mplex] Sequence headers: 21023
INFO: [mplex] Sequence ends : 1
INFO: [mplex] No. Pictures : 210190
INFO: [mplex] No. Groups : 21023
INFO: [mplex] No. I Frames : 21023 avg. size 88049 bytes
INFO: [mplex] No. P Frames : 63060 avg. size 30139 bytes
INFO: [mplex] No. B Frames : 126108 avg. size 4989 bytes
INFO: [mplex] Average bit-rate : 4997200 bits/sec
INFO: [mplex] Peak bit-rate : 8632800 bits/sec
INFO: [mplex] BUFFERING min 15 Buf max 192087
INFO: [mplex] AUDIO_STATISTICS: bd
INFO: [mplex] Audio stream length 168188160 bytes.
INFO: [mplex] Frames : 4130106505
INFO: [mplex] BUFFERING min 67 Buf max 5347
INFO: [mplex] MUX STATUS: no under-runs detected.

===============================================================================
Done! You can use any DVD authoring program to create a DVD out of -final.mpg-
===============================================================================


The results by size in the directory:

/tmp/dv_output$ ls -l -h

total 19G
-rw-r--r-- 1 sk545 sk545 4.4G 2004-12-10 12:52 final.mpg
-rw-r--r-- 1 sk545 sk545 161M 2004-12-10 12:24 lang_en.ac3
-rw-r--r-- 1 sk545 sk545 4.9G 2004-12-10 12:21 output.m2v
-rw-r--r-- 1 sk545 sk545 5.2G 2004-12-10 12:14 output.mpg
-rw-r--r-- 1 sk545 sk545 4.1G 2004-12-10 12:40 shrinked.m2v


So, did it work? Absolutely. I think tcprobe is doing something funky by not showing its prompt at the correct time/place. The only things that differed from me and you were:

1) The dvd's obviously
2) I used /dev/hdc instead of /dev/dvd
3) I selected track 2, instead of track 1.

I will try to make a symlink from /dev/hdc to /dev/dvd and see if that fixes tcprobe. However, i am certainly impressed. Keep it up.

Other things:
1) The colors [blue, green] are still blinding on a white background. lol.
2) Can't kill the console after its done. Ctrl-C didn't work, so i had to just use the 'X' button on the console's gui. I suppose if the script is invoked without 'bash' in the beginning, it would be killable.
3) tcprobe's output is confusing. Its kinda hard to know what to select (1, 2, 3, etc) from the info given.
4) It would be nice to have a time estimate, but that should be the last thing on the 'TODO' list. I would rather have this polished up first.

I suppose the next thing would be to have it author the mpg into a dvd via dvdauthor.


  



All times are GMT -5. The time now is 04:52 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration