You are on page 1of 9

04. 05. 2018.

HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska

Prijavite se putem SSO-a Pitanja

Forum Aktivnost stranica Molimo vas pročitajte prije prijave SSO-a


Napredno pretraživanje
Brze veze Forum zajednice Ubuntu zajednica Ostala podrška Društveni mediji korisni linkovi

Forum Ubuntu forum zajednice Druga rasprava i podrška Tutoriali


Zastarjeli tutoriali i savjeti HOWTO: Rip DVD u MPEG-4 AVC (x264), više audio, titlove, Matroska
Stranica 1 od 25 1 2 3 11 ... Posljednji put
Rezultati 1 do 10 od 249
Tema: HOWTO: Rip DVD u MPEG-4 AVC (x264), više zvuka, titlova, Matroska
Alati za temu Prikaz

8. listopada 2006. #1

Pridružite datumu:
Heinz Travanj 2005
Prolio je grah Mjesto:
Njemačka
grah:
13
distro:
Ubuntu

HOWTO: Rip DVD u MPEG-4 AVC (x264), više audio, titlove, Matroska
MPlayer i MEncoder nevjerojatna su alata ne samo za gledanje nego i za stvaranje sigurnosne kopije DVD
sadržaja. Ovaj HOWTO pokazuje kako stvoriti vrlo visoku kvalitetu kopiranja video zapisa sljedeće generacije (
H.264 / x264 / MPEG-4 AVC ) poslužiteljske audio zapise ( Vorbis u ovom slučaju, mogu biti i drugi formati kao
što su AC3 , MP3 ) i subtiles (vobsubs) u Matroskoj kontejner. Da biste instalirali potrebne aplikacije, potreban
vam je višenamjenski repozitorij ( https://help.ubuntu.com/community/Repositories/Ubuntu ).

1. Instalirajte potrebne aplikacije

sudo apt-get instaliraj mplayer mencoder normaliziraj-audio vorbis-tools mkvtoolnix mkvtoolnix-


gui gpac x264-bin

2. Rip DVD na tvrdi disk

mplayer dvd: // 1 -v -dumpstream -dump le title.vob

1 je tok koji želite kopirati.

3. Titlovi
Da biste odredili koji su titlovi dostupni na vašem DVD-u, pokrenite sljedeću naredbu

mplayer dvd: // -v -vo null -ao null | grep "podnaslov"

3.1 Rip titlovi

https://ubuntuforums.org/showthread.php?t=273635&s=7d2a7f794aaceff417d25f726c19c7fe 1/9
04. 05. 2018. HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska

mencoder dvd: // 1 -nosound -ovc frameno -o / dev / null -slang en -vobsubout naslov

1 je tok koji izdvajamo subs od


sleng je željeni jezik (en, de, fr, itd.)
naslov je naziv naziva datoteka vobsub, u ovom slučaju title.idx i title.sub

4. Audio
Da biste odredili koji audio zapisi su dostupni na DVD-u, izvedite sljedeću naredbu

mplayer dvd: // -v | grep "audio stream"

Ako želite zadržati izvorni AC3 audio korak naprijed do 4.4.

4.1 Pretvorba zvuka u PCM

mplayer title.vob -ao pcm: le = audio1.wav -vc dummy -aid 128 -vo null

title.vob je tok koji smo već raskomadali u koraku 2


audio1.wav je naziv rezultirajuće PCM datoteke
-aid 128 odabire prvi audio zapis

Ako želite ripati drugi audio zapis (npr. Komentar ili neki drugi jezik), ponovite gore navedeni broj sljedećeg
zapisa ( -aid 129 bi bio drugi zapis) i spremite ga kao audio2.wav .

4.2 Normaliziranje zvuka

normaliziraj audio audio1.wav

Ponovite na audio2.wav itd. Ako imate više audio zapisa.

4.3 Šifriranje zvuka u Ogg Vorbis

oggenc -q5 audio1.wav

-q5 je željena kvaliteta prvog zapisa. Wikipedia: Mnogi korisnici smatraju da Vorbis doseže
transparentnost (kvaliteta zvuka koja se ne razlikuje od izvornog snimanja izvora) na kvalitetnoj
postavci od -5, približno 160 kbit / s. Dodatne audio zapise mogu se kodirati u skladu s manjom
kvalitetom kako bi se uštedio prostor na disku.

4.4 Zadržite izvorni Dolby Digital AC3 audio

Ako ne želite komprimirati zvuk, ali zadržite izvorni AC3 zapis jednostavno ga izvadite iz VOB-a s

mplayer title.vob -aid 128 -dumpaudio -dump le title.ac3

https://ubuntuforums.org/showthread.php?t=273635&s=7d2a7f794aaceff417d25f726c19c7fe 2/9
04. 05. 2018. HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska

5. Video
Ovaj primjer koristi dvosmjerni postupak i pretpostavlja progresivni PAL videozapis. Pročitajte ovdje kako se
nositi s telecined, interlaced i NTSC video.

Prvo, moramo se riješiti crnih granica oko lma. Stoga reproduciramo datoteku s ltrom za otkrivanje krvnog
tlaka.

mplayer title.vob -vf cropdetect

Pomaknite se malo naprijed u lmu pomoću tipke sa strelicama i dopustite MPlayeru da pronađe točne
postavke za vas. Ako ste završili, zatvorite MPlayer i kopirajte dio -vf crop = 720: 432: 0: 76 s konzole. Naravno
da se vaše vrijednosti mogu razlikovati od ovog primjera.

5.1 Odredite brzinu prijenosa videa

Odabir bitrate ovisi. Ako vam nije stalo do datoteke, ništa više od 1000 isporučuje izvrsnu kvalitetu. Ako ipak
planirate konačnu veličinu datoteke oko 700 MB ili više izračunati ovako (kopiran iz dokumentacije MPlayer):

Ako ciljate određenu veličinu, morat ćete nekako izračunati brzinu prijenosa. No, prije toga morate znati koliko
prostora trebate rezervirati za audio zapise, tako da ih najprije trebate kopirati. Možete izračunati brzinu
prijenosa sa sljedećom jednadžbom: bitrate = (target_size_in_Mbytes - sound_size_in_Mbytes) * 1024 * 1024 /
length_in_secs * 8/1000 Na primjer, da biste dva sata snimili na 702 MB CD s 60 MB audio zapisa, bitrate mora
biti: (702 - 60) * 1024 * 1024 / (120 * 60) * 8/1000 = 740kbps

5.2 Pokrenite postupak video kodiranja

Napravite datoteku koja prvo i drugo prolazi redom.

gedit videnc

Zalijepite sljedeće u tu datoteku i prilagodite vrijednosti obrade i video bitrate s onima koje ste dobili od gore
navedenih postupaka

Kodirati:
Prvi prolaz
mencoder -v \
title.vob \
-vf crop = 720: 432: 0: 76, harddup \
-vc x264 -x264encopts subq = 4: bframes = 3: b_pyramid: weight_b: turbo = 1
-oac copy \
od sirovog videozapisa \
-o naslov.264
# Drugi prolaz
mencoder -v \
title.vob \
-vf crop = 720: 432: 0: 76, harddup \
= 2: psnr: bitrate = 1000 \ n = 2: psnr: bitrate = 1000 \
-oac copy \
od sirovog videozapisa \

x264encopts threads = auto će ubrzati stvari ako posjedujete dual-core CPU.

Budući da MEncoder nije u mogućnosti spremiti izravno u Matroska kontejnere, kodiramo videozapis u
sirovom formatu, pretvorimo ga kasnije u .mp4 i konačno mux sve (video, audio, titlovi) zajedno s
mkvmergeom. Zanima li vas sve te opcije? Ako sve odgovara Vašim potrebama spasiti videnc .

Kodiranje MPEG-4 AVC videa je dugotrajna stvar. Na mom AMD Athlon64 3000+ lmu od 90 minuta traje oko

https://ubuntuforums.org/showthread.php?t=273635&s=7d2a7f794aaceff417d25f726c19c7fe 3/9
04. 05. 2018. HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska

3 sata za prvo i opet oko 5 sati za drugi prolaz. Najbolje je pustiti da vaš stroj radi tijekom noći dok spavate.

Pokreni vožnju

sh. videnc

6. Muxing
6.1 Mux video u MP4 kontejner

Dobro jutro!

Ako je kodiranje dobro prošlo, spremni smo staviti tu x264 datoteku u MP4 spremnik

MP4Box -dd title.264 title.mp4

Već možete provjeriti rezultat tako što ćete igrati u MPlayeru.

6.2 Uključivanje sve zajedno u Matroska kontejner

Pokrenite kreator MKV datoteka

MMG

i jednostavno povucite i ispustite datoteke u ulaznih datoteka kutiji


title.mp4
audio1.ogg ili audio.ac3
audio2.ogg
title.idx (ne naslov.sub!)

Možda ste primijetili da nismo snimili videozapis tijekom postupka kodiranja. To je zato što Matroska
samostalno obrađuje omjer slike. Jednostavno odredite jezike i pratite imena u polju Tragovi i odaberite
ispravan omjer slike. Odaberite izlazni naziv datoteke (zadano će proizvesti naslov.mkv) i pritisnuti Početak
muxing .

podmetnuto:
09.10.2006. - ksni parametri kodiranja
09.10.2006. - dodana telekinirana, isprepletena, NTSC
10.10.2006. - dodaje se šifriranje određene veličine datoteke
10.10.2006. - Dodano određivanje zapisa audio i titlova, preopterećena struktura dokumenata
13.10.2006 - izmijenjeno -oac kopija umjesto -nosound zbog problema sinkronizacije
28.01.2007 - dodatna opcija "harddup" za lanac video ltara, dodana podrška za dual-core cpus
(zahvaljujući NobodySpecialu)

Napraviti:
Rip chapters with OGMTools
Last edited by Heinz; January 28th, 2007 at 02:36 PM. Reason: Update

Adv Reply  

October 9th, 2006 #2

Join Date:
abu_nawas Aug 2006
5 Cups of Ubuntu
https://ubuntuforums.org/showthread.php?t=273635&s=7d2a7f794aaceff417d25f726c19c7fe 4/9
04. 05. 2018. HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska
Beans:
18

Re: HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska
it's nice.
what about the interlaced movie?

Adv Reply  

October 9th, 2006 #3

Join Date:
Heinz Apr 2005
Spilled the Beans Location:
Germany
Beans:
13
Distro:
Ubuntu

Re: HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska
http://www.mplayerhq.hu/DOCS/HTML/en...-telecine.html describes how to percept and handle interlaced
video. I received good results by using the deinterlce postprocessing lter -vf pp=lb. As the documentation
reads there are serveral lters available and it should be done after cropping and before scaling.

Adv Reply  

November 9th, 2006 #4

Join Date:
encho Apr 2005
A Carafe of Ubuntu Location:
Dublin
Beans:
90
Distro:
The Feisty Fawn Testing

Re: HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska
I have just seen this guide, nice one. But there is one point I wish to make.
Using matroska is cool, it is open source, etc. Also vorbis - excellent quality, small sizes, etc. But, if you really
want to make your video archive, I suggest that you go with x264/avc (video) and faac/aac (audio), all muxed
in mp4 container. Why? Because future HD DVD devices and Blue Ray are going to support that format
straight from your le. Even now you can buy some classic dvd players - check the Nero certi ed devices.

And it is not huge di erence for the encoding process - you still create x264 video stream - the only
di erence is in audio and container.

After a lot of researching, testing and waiting, I have found out that:

mpeg -i %f -r 23.976 -pix_fmt yuv420p -f rawvideo -s 640x360 - | x264 --min-keyint 24 --keyint


240 --crf 23 --qpmin 5 --qpmax 51 --qcomp 0.75 --me umh --subme 6 --ref 6 --bframes 3 --ipratio
1.25 --pbratio 1.33 -- lter -1,-1 --no-psnr --b-rdo --b-pyramid --weightb --mixed-refs --bime --trellis 2
--8x8dct --analyse all --fps 23.976 --output %f.264 - 640x360

https://ubuntuforums.org/showthread.php?t=273635&s=7d2a7f794aaceff417d25f726c19c7fe 5/9
04. 05. 2018. HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska

produces the best results in one pass - constant quality based (where %f is input le - I am using thunar's
scripts).
And:

mpeg -i %f -r 23.976 -ac 2 -vn -f wav -y - | faac -q 90 - -o %f.aac

produces hi-quality aac audio.


Finally:

MP4Box -add %f.264#video -add %f.aac#audio -fps 23.976 %f.aac.mp4

mux them together in MP4 container, very compatible and reliable.

I also got few tricks for converting pal to ntsc and vice versa.

Instead of having 4 gig mpegs or 1 gig Xvids, I have 500mb(!) hi quality mp4s in my video collection.

Even if you have your collection in mkv format (I did), there is an easy way to remux them to mp4 (without
any quality loss). Just something like:

mkvextract tracks %f 1:%f.264 2:%f.ogg && MP4Box -add %f.264#video -add %f.ogg#audio -fps
23.976 %f.ogg.mp4 && rm %f.264 && rm %f.ogg

Although you will have non-standard MP4 (with vorbis audio), but maybe those will be supported some time.
You can always reencode audio as well.

Hope this helps to someone.


Last edited by encho; November 9th, 2006 at 04:46 PM.

Registered Linux User #403318

Adv Reply  

November 14th, 2006 #5

Join Date:
Aditz Apr 2006
Spilled the Beans Beans:
13

Re: HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska
I think it is better to use neroaacenc with wine. It has better quality than faac. Discussion:
http://forum.doom9.org/showthread.php?t=113694

Adv Reply  

November 15th, 2006 #6

Join Date:
encho
https://ubuntuforums.org/showthread.php?t=273635&s=7d2a7f794aaceff417d25f726c19c7fe 6/9
04. 05. 2018. HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska
A Carafe of Ubuntu Apr 2005
Location:
Dublin
Beans:
90
Distro:
The Feisty Fawn Testing

Re: HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska

Originally Posted by Aditz


I think it is better to use neroaacenc with wine. It has better quality than faac. Discussion:
http://forum.doom9.org/showthread.php?t=113694

It stands for 5 channel audio, as for 2 channels, faac is more than enough.

Registered Linux User #403318

Adv Reply  

November 18th, 2006 #7

Join Date:
the ev Jun 2006
Just Give Me the Beans! Beans:
50
Distro:
Ubuntu 8.04 Hardy Heron

Re: HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska
Great tutorial!! Makes my switch from Windows/StaxRip much easier.

But here's my question. I've taken your steps and put them in a Bash script (of which I'm very proud of myself
for doing, as my programming skills are pretty limited), but I was wondering if there was anyway to do a few
things with it.

Here's the script:


Code:
#!/bin/bash
echo Name of the DVD?
read NAME
mkdir ~/$NAME
cd ~/$NAME
echo "Device? (/dev/hda or /dev/hdb)"
read DEVICE
mplayer -dvd-device $DEVICE dvd://1 -v -dumpstream -dumpfile $NAME.vob
echo "Starting Crop detection - copy <-vf crop=*:*:*:*> for editing videnc!!"
mplayer $NAME.vob -vf cropdetect
cp ~/videnc ~/$NAME/
echo "Starting GEdit to modify Video encoding settings. Close the window when done
gedit videnc
echo "Extracting Audio..."
mplayer $NAME.vob -ao pcm:file=audio1.wav -vc dummy -aid 128 -vo null
echo "Normalizing Audio..."
normalize-audio audio1.wav
echo "Encoding Audio..."
oggenc -q6 audio1.wav
echo "Encoding Video..."
https://ubuntuforums.org/showthread.php?t=273635&s=7d2a7f794aaceff417d25f726c19c7fe 7/9
04. 05. 2018. HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska

sh videnc
echo "Packaging Video..."
MP4Box -add $NAME.264 $NAME.mp4

...And here are my questions:


1) Is there anyway to export the crop value from mplayer -vf crop to the videnc le automatically, rather than
manually cutting and pasting? And if there isn't, is there anyway to have a break waiting on "Enter" before
going to the next step (con guring videnc)?

2) Is there anyway to take the input for the local variable $NAME and automatically update the
corresponding entries in videnc?

I know these are more scripting questions than ripping questions, but if you've got any insights on how I can
clean up this script, I'd love to hear them. I'm trying to automate the process as much as possible, so I can just
stick in the DVD and start the script.

-Ev

Gyf þu riht nimst, nelt ðu wifes wesan!

Adv Reply  

November 18th, 2006 #8


Join Date:
the ev Jun 2006
Just Give Me the Beans! Beans:
50
Distro:
Ubuntu 8.04 Hardy Heron

Re: HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska
Oh, I forgot my third question:

Is there anyway to export the entire process to a log le? Even better, a time-stamped one?

-Ev

Gyf þu riht nimst, nelt ðu wifes wesan!

Adv Reply  

November 25th, 2006 #9

Join Date:
Heinz Apr 2005
Spilled the Beans Location:
Germany
Beans:
13
Distro:
Ubuntu

Re: HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska

https://ubuntuforums.org/showthread.php?t=273635&s=7d2a7f794aaceff417d25f726c19c7fe 8/9
04. 05. 2018. HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska

@encho: I've given up on standalone players and only use Linux boxes for video playback. So, this guide
mainly aims on best quality (imho) combined with a convenient container which handles vobsubs.

Having said that you are completely right about hardware support of MP4 les. You should use MP4 with
AAC in this case.

@the ev: I'm not much of a script guru meself but a quick search found this link
http://lists.mplayerhq.hu/pipermail/...ly/027662.html which invokes an automated cropping routine. Perhaps
that will be useful for you. Linux o ers a couple of tools to manipulate text les with. Hence automated
editing of the videnc le with grep, sed and the like should not be a problem. I'm sure you can cope with that.

Adv Reply  

November 28th, 2006 #10

Join Date:
dkaplowitz Oct 2005
Spilled the Beans
Beans:
17
Distro:
Ubuntu 7.10 Gutsy Gibbon

Re: HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska
Cool guide, thanks for taking the time to post it all!

Adv Reply  

Page 1 of 25 1 2 3 11 ... Last

Quick Navigation Outdated Tutorials & Tips Top

« Previous Thread | Next Thread »

Tags for this Thread


dvd, rip
View Tag Cloud

Bookmarks Posting Permissions


Digg You may not post new threads BB code is On
You may not post replies Smilies are On
del.icio.us You may not post attachments [IMG] code is On
StumbleUpon You may not edit your posts [VIDEO] code is O
HTML code is O
Google
Ubuntu Forums Code
of Conduct

-- Ubuntu vB4.x Ubuntu Forums Archive Top

All times are GMT +1. The time now is 08:09 PM.
vBulletin © 2000 - 2018, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu i Canonical © Canonical Ltd. Tango ikoni © Tango Desktop Project.
Doprinosi korisnika na ovoj stranici licencirani su pod Creative Commons licencom Imenovanje-Dijeli pod istim uvjetima 4.0 . Detalje i naša
atribucija, zadržavanje i pravila o privatnosti za forum pogledajte ovdje

https://ubuntuforums.org/showthread.php?t=273635&s=7d2a7f794aaceff417d25f726c19c7fe 9/9