Encourage FUNIX

The consultation of the site is completely free and without advertisements. Donations are nevertheless appreciated to pay for hosting and encourage its author


Transcoding and DVD Ripping

 Transcoding and DVD Ripping

Last modified February 20, 2025

This site has been automatically translated with Google Translate from this original page written in french, there may be some translation errors

Presentation

The tools presented on this page allow you to transcode video files, i.e. change the format (video/audio) of a video, and rip DVDs to make smaller video files. A practical case is to take a file in MPEG2 format (DVD for example) and convert it using a HEVC video codec in an MP4 container or vice versa.
For these tools, we will make sure to install the basic libraries presented on the page basic tools for video . To do this, we will use the Handbrake or mencoder tools. For the record, for a long time dvd::rip based on transcode was the reference under Linux, it is now a dead project. I also present on this page avidemux which I use to process the recordings of my internet box by removing ads and cropping. Last clarification, this page is not intended to advocate pirated DVD copies, personally I need to make a copy of my DVDs to make a backup in case of damage to the disc and to be able to view the film on an on-board player (in the car for example). I would add that the right to private copying exists, in return for this right we pay a tax on computer consumables (hard drive, DVD, etc.) and multimedia devices.




Transcoding with avidemux

Presentation

avidemux is a software for converting video files, but it is much more than that, it allows you to perform certain video and audio processing as well as recover "broken" video files.


Facility

The official site is http://www.avidemux.org , we retrieve the archive there which we decompress by typing

tar xvfz avidemux_2.8.1.tar.gz

This gives the directory  avidemux_2.8.1 in which we type

bash bootStrap.bash

In the install/usr directory we will find the useful files that we will have to copy manually as root

cp -f install/usr/bin/* /usr/bin
cp -Rf install/usr/lib64/* /usr/lib64
cp -Rf install/usr/share/* /usr/share



Use

Just type avidemux3_qt5



The scope of all its features is wide, here is a very brief overview.

Merge two videos
- Open the first video
- Open the second video, File->Add
- Save the resulting video, File->Save

Cut scenes
- With the cursor scrolling horizontally, place yourself at the beginning of the scene to be cut
- Click on the button >A
- place yourself at the end of the scene to be cut
- Click on the button B>
- you see the number of the start and end frames displayed at the bottom right in the Selection field
- Edit-> Cut
- Save the resulting video, File->Save

Save the soundtrack
- Audio->Save the audio track
- enter the name of a file ending in .mp3

Add a soundtrack
- Audio->Choose tracks then Add audio track
- choose your MP3 file, the soundtrack will start at the beginning of the video, if the music ends while the video is not yet finished, there is no more sound..., so you have an interest in taking an MP3 file that has a duration greater than the video. (there may be a way to do it differently but I have not seen it).

Crop a video
To crop a video, if for example you have unsightly black bands, you must add a processing filter accessible via the Video->Filters menu , then add the crop processing


we crop the video as it goes well, here we place green bands that correspond to the cropping making the unwanted black bands disappear. We adjust the green bands with the Left, Right, Top and Bottom parameters.




Then you just have to save the video after choosing the audio and video codecs. I recommend the HEVC format (x265) which takes at least 30% less size compared to MPEG4 AVC (x264) for at least the same quality, it's up to you to make sure that your video players recognize the x265 format. On the other hand, the processing time is longer, at least 30% more, you have an interest in having a rather powerful machine.



The documentation can be found here  http://www.avidemux.org/admWiki/index.php?title=Main_Page


I record the videos from my box and I use avidemux to recover a finalized video, that is to say cut from the ad pages, from the useless recordings of beginning and end, by removing the black bands as explained above, all encoded in HEVC and AAC 5.1. To have a good compromise size/quality, for the video I choose HEVC with the parameters below and in particular the Preset at ultrafast and the quality factor at 20.


For the sound I choose the AAC (FDK) codec as seen in the screenshot below by clicking on Configure HE-AAC profile and Bitrate at 192. By clicking on Filters, I remix in multichannel by switching the sound to 5.1, you shouldn't expect miracles if the base video is in stereo, it won't invent a track with door slams alone like in the cinema or on a DVD.


We can always play on certain parameters like the gain, the equalizer, add delay depending on the channel or even completely redistribute the audio outputs ( remap ).





DVD Ripping

Mencoder

mencoder is linked to mplayer, for installation please see this page. To rip a DVD, everything is done on the command line, you access the table of contents by typing

lsdvd

here is what it can give

libdvdread: Using libdvdcss version 1.2.13 for DVD access
Disc Title: CDROM
Title: 01, Length: 00:57:54.180 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 00

Title: 02, Length: 01:13:17.120 Chapters: 08, Cells: 08, Audio streams: 01, Subpictures: 00

Title: 03, Length: 01:05:13.100 Chapters: 07, Cells: 07, Audio streams: 01, Subpictures: 00

Longest track: 02

it indicates the longest track, be careful on protected DVDs it is not necessarily the right track! To know which track is the right one, the easiest is to simply read the DVD on your PC or a living room player and locate the track currently playing. So we can find up to 99 tracks on a DVD and the track played can be 51 even if the longest track is 2.

Let's say the right track to extract is 1, to view it we will type

mplayer dvd://1

here is the result

MPlayer SVN-r35233-4.6.3 (C) 2000-2012 MPlayer Team
Lecture de dvd://1
libdvdread: Using libdvdcss version 1.2.10 for DVD access
Il y a 17 titres sur ce DVD.
Il y a 1 angles sur ce titre DVD.

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 0x00089030
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x000897d0
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x000a0e08
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_0.VOB at 0x000e3be5
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_1.VOB at 0x0010a0af
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_1.VOB at 0x002df94a
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_1.VOB at 0x0037ea84
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_0.VOB at 0x0038679d
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_1.VOB at 0x0038687b
libdvdread: Elapsed time 0
libdvdread: Found 6 VTS's
libdvdread: Elapsed time 0
Flux audio : 0 format : ac3 (5.1) langue : en aide : 128.
Flux audio : 1 format : ac3 (5.1) langue : fr aide : 129.
Flux audio : 2 format : ac3 (5.1) langue : unknown aide : 130.
Nombre du canaux audio sur le disque : 3.
Sous-titre ( sid ) : 0 langue : en
Sous-titre ( sid ) : 1 langue : ar
Sous-titre ( sid ) : 2 langue : nl
Sous-titre ( sid ) : 3 langue : fr
Sous-titre ( sid ) : 4 langue : en
Nombre de sous-titres sur le disque : 5

Fichier de type MPEG-PS détecté.
VIDEO:  MPEG2  720x576  (aspect 3)  25.000 fps  8000.0 kbps (1000.0 kbyte/s)
==========================================================================
Ouverture du décodeur vidéo : [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 54.64.100 (internal)
Codec vidéo choisi : [ffmpeg2] vfm : ffmpeg (FFmpeg MPEG-2)
==========================================================================
==========================================================================
Ouverture décodeur audio : [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Codec audio sélectionné : [ffac3] afm : ffmpeg (FFmpeg AC-3)
==========================================================================
[AO OSS] audio_setup: Impossible ouvrir périphérique audio /dev/dsp : No such file or directory
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Démarre la lecture...
L'aspect du film est 1.78:1 - pré-redimensionnement à l'aspect correct.
VO: [xv] 720x576 => 1024x576 Planar YV12

We can see some interesting information, the audio track is identified by the number 129 and the French subtitle by the 3. To view the film in French with a French subtitle, type

mplayer dvd://1 -aid 129 -sid 3

if you don't want a subtitle, type

mplayer dvd://1 -aid 129 -nosub

you will notice that there are often black bands at the top and bottom of the film, they can be removed during encoding. To do this, you need to locate them by typing

mplayer dvd://1 -vf cropdetect

after a certain amount of time, it scrolls and you get

A: 230.5 V: 230.5 AV: 0.000 ct: -0.088 1239/1239 4% 2% 0.9% 0 0
[CROP] Cropped area: X: 0..719 Y: 0..575 (-vf crop=720:576:0:0).

to now view the film in French without subtitles and without the black bands, type

mplayer dvd://1 -aid 129 -nosub -vf crop=720:576:0:0

It's good, we can now move on to encoding. First of all, we place ourselves in a blank directory with no files. We first start by extracting the soundtrack in mp3 format, 192kbit/s quality.

mencoder
 dvd : //1 -aid 129 -nosub -oac mp3lame -lameopts mode=2:cbr:br=192:vol=0 -ovc frameno -o frameno.avi

here is the result

MEncoder 1.1-4.6.3 (C) 2000-2012 MPlayer Team
libdvdread: Using libdvdcss version 1.2.10 for DVD access
There are 17 titles on this DVD.
There are 1 angles on 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 0x00089030
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x000897d0
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x000a0e08
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_0.VOB at 0x000e3be5
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_1.VOB at 0x0010a0af
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_1.VOB at 0x002df94a
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_1.VOB at 0x0037ea84
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_0.VOB at 0x0038679d
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_1.VOB at 0x0038687b
libdvdread: Elapsed time 0
libdvdread: Found 6 VTS's
libdvdread: Elapsed time 0
Audio stream: 0 format: ac3 (5.1) language: en help: 128.
Audio stream: 1 format: ac3 (5.1) language: fr help: 129.
Audio stream: 2 format: ac3 (5.1) language: unknown help: 130.
Number of audio channels on disk: 3.
Subtitle ( sid ): 0 language: en
Subtitle ( sid ): 1 language: ar
Subtitle ( sid ): 2 language: nl
Subtitle ( sid ): 3 language: fr
Subtitle ( sid ): 4 language: en
Number of subtitles on disk: 5

success: format: 2 data: 0x851000 - 0xeac35800
MPEG-PS file type detected.
VIDEO: MPEG2 720x576 (aspect 3) 25.000 fps 8000.0 kbps (1000.0 kbyte/s)
[V] filefmt:2 fourcc:0x10000002 size:720x576 fps:25.000 ftime:=0.0400
============================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 54.23.100 (internal)
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==================================================================================
Selected MP3 audio
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos: 0.8s 22f ( 0%) 0.00fps Trem: 0min 0mb AV:0.082 [0:192]

Frame skipped!
Pos: 1.2s 32f ( 0%) 0.00fps Trem: 0min 0mb AV:0.082 [0:192]

Frame skipped!
Pos: 2.0s 53f ( 0%) 0.00fps Trem: 0min 0mb AV:0.081 [0:192]

Frame skipped!
Pos:4440.0s 111003f (100%) 136.09fps Trem: 0min 104mb AV:0.026 [0:192]
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Recommended video bitrate for 650MB CD: 1022
Recommended video bitrate for 700MB CD: 1116 Recommended video bitrate for 800MB CD: 1305
Recommended video bitrate for
2 x 650MB CD: 2250 Recommended video bitrate
for 2 x 700MB CD: 2439 Recommended video bitrate
for 2 x 800MB CD: 2817 Video

stream: 0.800 kbit/s (100 B/s) size: 444000 bytes 4440.000 secs 111003 frames

Audio stream: 192.000 kbit/s (24000 B/s) size: 106562304 bytes 4440.096 secs

Note some important information to know the bitrate to set according to the size of the file to obtain. For an mpeg4 encoding in 2 passes with a bitrate of 1800 (excellent quality, but large file 1.5 GB for a 1h30 film) we will first type the following command

mencoder dvd : //1 -aid 129 -nosub -vf crop=720:576:0:0   -oac copy -mc 0 -o /dev/null -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1800:vhq:autoaspect:vpass=1

here is the result

MEncoder 1.1-4.6.3 (C) 2000-2012 MPlayer Team
libdvdread: Using libdvdcss version 1.2.10 for DVD access
Il y a 17 titres sur ce DVD.
Il y a 1 angles sur ce titre DVD.

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 0x00089030
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x000897d0
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x000a0e08
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_0.VOB at 0x000e3be5
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_1.VOB at 0x0010a0af
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_1.VOB at 0x002df94a
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_1.VOB at 0x0037ea84
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_0.VOB at 0x0038679d
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_1.VOB at 0x0038687b
libdvdread: Elapsed time 0
libdvdread: Found 6 VTS's
libdvdread: Elapsed time 0
Flux audio : 0 format : ac3 (5.1) langue : en aide : 128.
Flux audio : 1 format : ac3 (5.1) langue : fr aide : 129.
Flux audio : 2 format : ac3 (5.1) langue : unknown aide : 130.
Nombre du canaux audio sur le disque : 3.
Sous-titre ( sid ) : 0 langue : en
Sous-titre ( sid ) : 1 langue : ar
Sous-titre ( sid ) : 2 langue : nl
Sous-titre ( sid ) : 3 langue : fr
Sous-titre ( sid ) : 4 langue : en
Nombre de sous-titres sur le disque : 5

succès : format : 2  data : 0x851000 - 0xeac35800
Fichier de type MPEG-PS détecté.
VIDEO:  MPEG2  720x576  (aspect 3)  25.000 fps  8000.0 kbps (1000.0 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  taille:720x576  fps:25.000  ftime:=0.0400
==========================================================================
Ouverture décodeur audio : [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 54.23.100 (internal)
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Codec audio sélectionné : [ffac3] afm : ffmpeg (FFmpeg AC-3)
==========================================================================
Audio MP3 sélectionné
Écriture de l'entête...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Écriture de l'entête...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos:   0.8s     22f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.082 [0:192]

Image sautée !
Pos:   1.2s     32f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.082 [0:192]

Image sautée !
Pos:   2.0s     53f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.081 [0:192]

Image sautée !
Pos:4440.0s 111003f (100%) 136.09fps Trem:   0min 104mb  A-V:0.026 [0:192]
Écriture de l'index...
Écriture de l'entête...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Débit binaire (bitrate) vidéo recommandé pour le CD 650MB : 1022
Débit binaire (bitrate) vidéo recommandé pour le CD 700MB : 1116
Débit binaire (bitrate) vidéo recommandé pour le CD 800MB : 1305
Débit binaire (bitrate) vidéo recommandé pour le CD 2 x 650MB : 2250
Débit binaire (bitrate) vidéo recommandé pour le CD 2 x 700MB : 2439
Débit binaire (bitrate) vidéo recommandé pour le CD 2 x 800MB : 2817

Flux vidéo :    0.800 kbit/s  (100 B/s)  taille : 444000 octets  4440.000 secs  111003 images

Flux audio :  192.000 kbit/s  (24000 B/s)  taille : 106562304 octets  4440.096 secs

here we go for the second pass by typing

mencoder  dvd://1 -aid 129 -nosub -vf crop=720:576:0:0  -oac copy -mc 0 -o film.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1800:vhq:autoaspect:vpass=2

here the result

MEncoder 1.1-4.6.3 (C) 2000-2012 MPlayer Team
libdvdread: Using libdvdcss version 1.2.10 for DVD access
Il y a 17 titres sur ce DVD.
Il y a 1 angles sur ce titre DVD.

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 0x00089030
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x000897d0
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x000a0e08
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_0.VOB at 0x000e3be5
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_1.VOB at 0x0010a0af
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_1.VOB at 0x002df94a
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_1.VOB at 0x0037ea84
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_0.VOB at 0x0038679d
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_1.VOB at 0x0038687b
libdvdread: Elapsed time 0
libdvdread: Found 6 VTS's
libdvdread: Elapsed time 0
Flux audio : 0 format : ac3 (5.1) langue : en aide : 128.
Flux audio : 1 format : ac3 (5.1) langue : fr aide : 129.
Flux audio : 2 format : ac3 (5.1) langue : unknown aide : 130.
Nombre du canaux audio sur le disque : 3.
Sous-titre ( sid ) : 0 langue : en
Sous-titre ( sid ) : 1 langue : ar
Sous-titre ( sid ) : 2 langue : nl
Sous-titre ( sid ) : 3 langue : fr
Sous-titre ( sid ) : 4 langue : en
Nombre de sous-titres sur le disque : 5

succès : format : 2  data : 0x851000 - 0xeac35800
Fichier de type MPEG-PS détecté.
VIDEO:  MPEG2  720x576  (aspect 3)  25.000 fps  8000.0 kbps (1000.0 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  taille:720x576  fps:25.000  ftime:=0.0400
==========================================================================
Ouverture décodeur audio : [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 54.23.100 (internal)
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Codec audio sélectionné : [ffac3] afm : ffmpeg (FFmpeg AC-3)
==========================================================================
Ouverture du filtre vidéo : [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Ouverture du décodeur vidéo : [ffmpeg] FFmpeg's libavcodec codec family
Codec vidéo choisi : [ffmpeg2] vfm : ffmpeg (FFmpeg MPEG-2)
==========================================================================
codec audio : copie img (format=2000 canaux=2 taux=48000 bits=16 B/s=48000 échant-1)
L'aspect du film est 1.78:1 - pré-redimensionnement à l'aspect correct.
videocodec: libavcodec (720x576 fourcc=34504d46 [FMP4])
[VE_LAVC] Codage haute qualité sélectionné (non temps réel) !
[mpeg2video @ 0xe39c40]ac-tex damaged at 23 7
[mpeg2video @ 0xe39c40]Warning MVs not available
[mpeg2video @ 0xe39c40]concealing 1305 DC, 1305 AC, 1305 MV errors
Pos:   0.0s      1f ( 0%)  0.34fps Trem:   0min   0mb  A-V:0.000 [0:0]
Écriture de l'entête...
ODML: vprp aspect is 16:9.
Écriture de l'entête...
ODML: vprp aspect is 16:9.

1 image(s) répétée(s) !
Pos:3941.3s  98532f (89%) 121.01fps Trem:   1min 1146mb  A-V:0.000 [1790:384]
ODML: Starting new RIFF chunk at 1023MB.
Pos:4440.1s 111003f (100%) 120.37fps Trem:   0min 1158mb  A-V:0.000 [1799:384]

Image sautée !
Pos:4440.1s 111004f (100%) 120.37fps Trem:   0min 1158mb  A-V:0.000 [1799:384]

Abandonne des trames vidéo.
Écriture de l'index...
Écriture de l'entête...
ODML: vprp aspect is 16:9.

Flux vidéo : 1799.993 kbit/s  (224999 B/s)  taille : 999023307 octets  4440.120 secs  111004 images

Flux audio :  384.000 kbit/s  (48000 B/s)  taille : 213124608 octets  4440.096 secs

Note the -mc 0 option which is necessary if you notice a progressive lag between the video and the audio, you should have a minimum of skipped or repeated frames otherwise it is not a good sign. A good indicator is the last mention of the command.

Video stream: 1799.993 kbit/s (224999 B/s) size: 999023307 bytes 4440.120 secs 111004 frames

Audio stream: 384.000 kbit/s (48000 B/s) size: 213124608 bytes 4440.096 secs

Video and audio streams should be approximately the same duration.

Note that mencoder has a host of options, I'm only presenting one here, but it's perfect when you don't have too many disk space concerns and you want to prioritize quality.

Another method by going through the intermediate step of creating a VOB file, recovering here track 52

mplayer dvd://52 -dumpstream -dumpfile file.vob

All available languages ​​and subtitles are then in the .vob file.

Note that if the DVD is damaged (scratched), you must mount it with the mount command and copy the VIDEO_TS directory to the hard drive

mount /dev/sr0 /media/cdrom

then

cp -Rf /media/cdrom/VIDEO_TS/ /emile/video/dvdrip


Then simply compress the file using ffmpeg for example, the H264 codec with quality 20.

ffmpeg -i file.vob -acodec libmp3lame -aq 4 -vcodec libx264 -crf 20 -threads 0 file.mkv



HandBrake

Handbrake is a graphical interface for copying DVDs. The official site is http://handbrake.fr where you will get the archive. First, for a Mageia, you will need to install the following packages: intltool lib64notify-devel lib64gudev1.0-devel dbus-glib-devel lib64webkitgtk1.0-devel lib64webkitgtk3.0-devel lib64gtk+2.0-devel lib64ass-devel lib64samplerate-devel lib64jansson-devel meson lib64numa-devel lib64gtk4.0-devel clang and lib64mp4v2-devel

We now unzip the
Handbrake archive by typing

tar xvfj HandBrake-1.9.1-source.tar.bz2

This gives the
HandBrake-1.9.1 directory in which we type successively

./configure --enable-fdk-aac --enable-nvenc --enable-nvdec --enable-x265

(the nvenc option is for NVIDIA) here is the result

--------------------------------------------------------------------------------
Build system: x86_64-pc-linux-gnu
Host system: x86_64-pc-linux-gnu
Target platform: linux
Harden: True
Sandbox: False (not supported on target platform)
Enable FDK-AAC: True
Enable FFmpeg AAC: True (required on target platform)
Enable MediaFound.: False (not supported on target platform)
Enable NVENC: True
Enable NVDEC: True
Enable QSV: False
Enable VCE: False
Enable libdovi: False
Enable GTK GUI: True
-------------------------------------------------------------------------------
Build is configured!
You can now cd into ./build and run make (/bin/gmake).

then we type

cd build
make

then as root

make install

Note that there is a command line version HandBrakeCLI which is very useful if you want to use HandBrake in batch mode in a script. When you launch HandBrake , and you want to indicate the DVD player, you will have to click on Source , it will choose by default the longest track, be careful it is not necessarily the right track ( see my remark above ), you have the possibility to choose the track at the level of the Title field .



If you click on the Dimensions button you can play on the cropping parameters, personally I never touch them



if we click on the Video button we access the choice of settings, by default it is H264, we can optionally fix the bitrate if we want to improve the quality (which is already more than correct by default), personally I put 2000kbps which is a good compromise size/quality. There is now also the possibility of saving using H265/HEVC which has a much better quality/size ratio than H264.



when you click on the Defaults Audio button , you can choose the audio tracks and the encoder (by default AAC), be careful not all players necessarily read AAC, you can choose the mp3 encoder which is more universal.



On the Audio list button , we obtain the tracks that will be selected



For the subtitles, click on the Defaults Subtitles button, you can choose the default subtitles



Via the Subtitle List button, you select the subtitles to add by clicking on the blue cross.




You then have a bunch of configuration possibilities but personally I left everything with the default config and it works very well. Same for the Filters, Chapters and Tags buttons. Then click on Start Encoding to start the encoding.

VLC

VLC has a very practical function to also be able to copy DVDs and is quite simple and quick to use, the only drawback is that it is not possible to recover all the soundtracks and subtitles, you will have to choose. Be careful, the encoding is also very sensitive to the quality of the disc, if it has suffered a little it stops the process at the first error, with no way to go further. Just launch VLC , insert your DVD, and go to the Media->Convert/Save menu...
First choose the DVD medium in the Disc tab , then the audio and subtitle tracks (leave at -1 to choose none), it is better to launch a classic playback beforehand to identify the right track and possibly the subtitle.



Then we choose the encoding format, I choose by default the H265/MP3 pair in an MP4 container which generally gives very good results. It is better not to check the box Display the output stream which will slow down the process. We also have the choice of recording the raw stream to be able to do a particular treatment on avidemux afterwards, in fact the default configuration of the H264 and H265 codecs is frankly not great and we are not really guided to improve it. Note that in this case the playback is done in real time and you can choose the soundtrack directly from the Audio menu . 



To significantly improve the encoding for H265, click on the tool to the right of the profile and set the -crf 20 option, then click on Save



Enter the name of the file and click on Start .



The progress status is given by the progress bar.
[Return to home page ]