Acid Rip

I have just been using AcidRip to convert DVD’s into AVI files so that I can I copies of family movies in a more compressed format.. it will either use a DVD disk or a DVD image on a harddrive to convert to the required format that you want.

It uses mencoder which is part of the mplayer suit of applications, mplayer is also a very nice movie player too, which I use mainly from the command line, but there is also a GUI for it.

mplayer -fs <filename>

would play a video in full screen (-fs) and since I do have a console window open most of the time then it is sometimes just easier to use the console to play a video.

kernel – passing module parameters

With normal programs that allow you pass parameters on there command line, for example

printoutmyname genux

where the program is called printoutmyname and the first parameter is genux (it is normal that the first parameter [0] is actually the program name and the second parameter [1] is the parameter that is passed)

Well in Linux kernel (where here is a example on how to compile the kernel for a ubuntu based setup) you can pass parameters to the modules that are getting loaded. One module would be your graphics card, in my case a nvidia graphics card.

To find out what parameters can be passed to the graphics card you will have to find the kernel module file (filename.ko, where the ko is the kernel object file), so to search for the nvidia.ko in my case I did

locate nvidia.ko

and then changed to that directory and did a module information on it

cd /lib/modules/2.6.31-17-generic/updates/dkms/
ls
nvidia.ko  vboxdrv.ko  vboxnetadp.ko  vboxnetflt.ko

and doing a module information on it you call the modinfo on the kernel object file as

modinfo nvidia.ko
</pre
 
my output was
 
<pre lang="bash">
filename:       nvidia.ko
license:        NVIDIA
alias:          char-major-195-*
alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
depends:
vermagic:       2.6.31-17-generic SMP mod_unload modversions
parm:           NVreg_EnableVia4x:int
parm:           NVreg_EnableALiAGP:int
parm:           NVreg_ReqAGPRate:int
parm:           NVreg_EnableAGPSBA:int
parm:           NVreg_EnableAGPFW:int
parm:           NVreg_Mobile:int
parm:           NVreg_ResmanDebugLevel:int
parm:           NVreg_RmLogonRC:int
parm:           NVreg_ModifyDeviceFiles:int
parm:           NVreg_DeviceFileUID:int
parm:           NVreg_DeviceFileGID:int
parm:           NVreg_DeviceFileMode:int
parm:           NVreg_RemapLimit:int
parm:           NVreg_UpdateMemoryTypes:int
parm:           NVreg_UseVBios:int
parm:           NVreg_RMEdgeIntrCheck:int
parm:           NVreg_UsePageAttributeTable:int
parm:           NVreg_EnableMSI:int
parm:           NVreg_MapRegistersEarly:int
parm:           NVreg_RmNvclkIdleGraphics:int
parm:           NVreg_RegistryDwords:charp
parm:           NVreg_NvAGP:int

where the parm: is a parameter to pass to the module on load (insmod, or loaded via the kernel at boot time which you can force to load via the /etc/modules file and the parameters can be placed in the /etc/modprobe.d directory).

for example to load the nvidia module with a parameter NVreg_NvAGP you would do something like

insmod nvidia.ko NVreg_NvAGP=1

and the passing value is 1 to the NVreg_NvAGP parameter

DeVeDe – convert video files to DVD’s

To convert video files into Video DVD’s for general usage well there is allot of applications out there that can do the job, command line (bash) if you want to or just use a GUI. I personally used to use a commmand line but now I am using a GUI because personally it just is as easy and sometimes it is nice to use a gui and not have to think as such.

The application that I use is called DeVeDe and it just makes the conversion very nice. Here is a step by step guide to use it.

Here is the output types that you can choose from, I have never used anything else but Video DVD.

Type of output

Start the create of the DVD structure, e.g. files and titles names.

The Title of the film

Properties of the title name(s) that you would like to come up on the main menu of the DVD.

Add the film

Add the files that you want to associated with the title on the main menu of the DVD, these could be of any type of file Xvid, MPEG, etc.

Pick the video

Titles and the files that are associated with the DVD structure.

Create the video

Create the DVD, this will progress to where to place the ISO image of the DVD structure.

The name of the files for temporary usage

Create the Full DVD Structure

Job done!

Finished!! all done.

Create DVD Properties Properties Title Properties Titles and file Create DVD Create DVD file names Create DVD files Finish

How to convert VOB to DVD and Burn

Convert VOB-DVD Image

To create the IFO/BUP files for the VBO files I use a program (the IFO/BUP files are the same file but with different names)

  dvdauthor -o <path-to-file> -T - To generate the Table Of Contents file (TOC)
  cp *.vob <path-to-file>/VIDEO_TS - Copy the files into the video directory
  dvdauthor -o <path-to-file> vobs 

To generate multiple BUP files from the IFO files you could use something like

for file_i in *.IFO; do cp $file_i `basename $file_i .IFO`.BUP; done 

Burn to disk the vcd Image
To burn the dvd files I use a program called K3B for ease of use (K3B is very self explanatory).

How to convert AVI-MPEG to VCD

This shall serve as a reminder for myself and may help others. There is different versions of audio conversion, CBR (Constant Bit Rate) and VBR (Variable Bit Rate), it seems that many DVD players perfer the CBR. Below is both versions with links to the relevant programs and example command lines.

CBR AVI-MPEG

To convert the avi file into a mpeg file for a PAL 352×288 screen, there is different settings either use the ‘man’ or goto the Transcode website for viewing the conversion in more detail. The command line that I use is

transcode -i<AVI FILM> -V -y mpeg -F v,1 -E 44100 -b 224 -fps 25 -o <OUTPUTFILENAME>

This generates two files, *.m1v (the video segment) and *.mpa (the audio segment).

The options in the above command line are

  • -b Audio bitrate Kbit’s
  • -E Audio sampling rate (Hz)
  • -F codec
  • -i input file
  • -V use internal video codec (faster but some import modules do not support this)
  • -y video, audio export modules.
  • -fps Frames per second, 25 is for PAL, 29.97 for NTSC

Joining the OUTPUTFILENAME’s together

To join these two segments together

tcmplex -o <OUTPUT.MPG> -i <OUTPUTFILENAME.M1V> -p <OUTPUTFILENAME.MPA> -m v

This will create a MPEG file ready to be either watched or converted again into the VCD format and then burned.

VBR AVI-MPEG

The programs to download/use are obtained from these links

If the AVI file is in MS MPeg4 v3(DIVX3)

If the INPUT file is in a MS MPeg4 v3 (DIVX3) then you have to convert the file into a DIVX format for FFMPeg to do its stuff. To convert to the required file you will need the mencoder program from MPlayer website. To convert to the required file structure use the commands below.

mencoder -ovc lavc -lavcopts vcodec=mpeg4:vhq -oac copy INPUTFILE.AVI -o OUTPUT.AVI

The options produce a mpeg4 version of the input file using the lavc video converter. Also with the option ‘vhq’, it produces a very high quality output file.

Convert AVI-MPEG

To convert AVI to MPEG use the ffmpeg program, with the commands as below. The INPUT.FILE is in AVI format and the OUTPUT.FILE is an MPEG format

ffmpeg -vcd -i INPUT.FILE -b 1150 -s 352x288 -vcodec mpeg1video -f mpegvideo OUTPUT.FILE

With advice, the ffmpeg build version 4753 (form cvs) the parameters are:-

ffmpeg -target vcd -i INPUT.FILE -b 1150 -s 352x288 -vcodec mpeg1video -f mpegvideo OUTPUT.FIL

The options enable an VCD Mpeg type file output(-vcd) with a bitrate of 1150 (-b) and an output screen size of 352×288 (-s). The codecs to convert to are mpeg1video (-vcodec) so that it is able to be converted to an vcd image with the vcdimager program.
Note: This is still a MPEG file and not a vcd file, you have to use vcdimager below to create a vcd file to burn to disk.

PAL Divx 3 avi file to NTSC vcd

Thanks to Marc for this

ffmpeg -i FILE.AVI -b 1150 -r 29.97 -s 352x240 -aspect 16:9 -vcodec mpeg1video -f mpegvideo FILE-NTSC.mpeg

If MPEG file is bigger than 700MB

If the MPeg file is over the maximum size of the cd, then I use the program mencoder from MPlayer. With the options as below

mencoder -oac copy -ovc copy INPUT.FILE -o OUTPUT.FILE -endpos 670mb

At the end of the copy it should say the frame that the mencoder finished on for the first file. Place that value in the line below (in the VALUE) to create the second value.
I usally subtract about 10 frames just to make sure.

mencoder -oac copy -ovc copy INPUT.FILE -o OUTPUT2.FILE -ss VALUE

Both of the files, INPUT & OUTPUT are mpeg files

This will create a MPEG file ready to be either watched or converted again into the VCD format and then burned.

Hope that helps, and this also servers as a reminder to me 🙂

How to convert AVI-MPEG to DVD

This shall serve as a reminder for myself and may help others. The software that I have used is

To convert the avi file into a mpeg file for a PAL 352×288 screen, there is different settings either use the ‘man’ or goto the Transcode website for viewing the conversion in more detail. The command line that I use is

  transcode -i<AVI FILM> -V -y mpeg -F d -E 44100 -b 224 -fps 25 -o <OUTPUTFILENAME>

This generates two files, *.m2v (the dvd video segment) and *.mpa (the audio segment).

The options in the above command line are

  • -b Audio bitrate Kbit’s
  • -E Audio sampling rate (Hz)
  • -F codec (d = dvd)
  • -i input file
  • -V use internal video codec (faster but some import modules do not support this)
  • -y video, audio export modules.
  • -fps Frames per second, 25 is for PAL, 29.97 for NTSC

If the audio is in the AC3 Codec then you may need to reduce the bitrate for encoding. This is done with a profile file dvd.prof, which containts the following entry.

   max_bitrate=4000000.0

this will reduce the bitrate to 4000 kpbs. The profile is passed to the transcode program within the 3rd parameter to -F, also the parameter -A means to use the internal AC3 codec.

  transcode -i<AVI FILM> -V -y mpeg -F d,,dvd.prof -m <OUTPUTFILENAME.AC3> -A 0x2000 -fps 25 -o <OUTPUTFILENAME>

Joining the OUTPUTFILENAME’s together

To join these two segments together

  tcmplex -o <OUTPUT.VOB> -i <OUTPUTFILENAME.M2V> -p <OUTPUTFILENAME.MPA> -m d

If using the AC3 codec then

  tcmplex -o <OUTPUT.VOB> -i <OUTPUTFILENAME.M2V> -p <OUTPUTFILENAME.AC3> -m d

This will create a MPEG file ready to be either watched or converted again into the DVD format and then burned.

Hope that helps, and this also servers as a reminder to me 🙂

How to convert DVD to AVI

The program required to change a DVD to AVI format is called “transcode”, below is a link to the homesite and also a link to any rpm’s that have been build and lurking on the RPM-FIND

Usually the first block of the DVD is the whole, or if not a big part, of the movie thus would be better to do a test run on the second block. The second block is tested by using the “-T 2” parameter. To ascertain the bitrate/information from the DVD for the conversion the command line is ( I am assuming that the DVD in mounted on /dev/dvd)

     
tccat -t dvd -T 2,-1 -i /dev/dvd | tcextract -x ac3 -t vob | tcdecode -x ac3 | tcscan -x pcm

tccat parameter’s

  • -t Type of input
  • -T Title/chapter
  • -i Input device

tcextract parameter’s

  • -x Codec
  • -t Source file format (vod = mpeg stream)

tcdecode parameter’s

  • -x Codec

tscan parameter

  • -x Codec

The tccat program places the dvd media onto the standard output for the 4 pipping command line. The tcextract extracts from the standard output (the output from tccat) and extracts/demultiplex the stream and places the output back onto the standard output for the tcdecode program. The tcdeocde converts the output
from the tcextract pipe into the raw format for the tcscan program to display the different aspects of the output stream and displays the results on the standard output(the console).
The tcscan program displays information about the video and also the audio. The audio information includes the audio gain that is required for the conversion so that the audio is not to low/loud :).

To run a conversion test on the second block (“-T 2”) for converting into the divx5 format and also testing the audio gain, the audio gain from the above tcscan is placed into the parameter “-s”.

transcode -i/dev/dvd -x dvd -T 2,-1 -V -B 1,0 -Y 76,8 -s 2.340 -t 83920,dvd1 -y divx5 -w 1618 

and then finally the film

transcode -i/dev/dvd -x dvd -T 1,-1 -V -B 1,0 -Y 76,8 -s 2.340 -t 83920,dvd1 -y divx5 -w 1618

transcode parameter’s

  • -i Input device
  • -x Video input module
  • -T Title/Chapter
  • -V YUV internal encoding
  • -B resize n,m,M (M = 8,16,32) height = n * M, width = m * M
  • -Y Select encoder clipping border
  • -s Audio gain
  • -t (n,base) Split the outputted film into frames (n) with base name (base)
  • -y Video export module
  • -w Encode bitrate

Hope that helps, and this also servers as a reminder to me 🙂