Log in

View Full Version : Backing up DVDs to MP4... good practises?


acrg
19th May 2008, 22:17
Hi,

I was hoping to get a feel for what choices others out there are commonly making when deciding how exactly to backup their DVDs to MP4. I don't care for menus, special features, or multiple audio tracks - I just want the bare movie+5.1 sound and have it fit in less than 2-4 GB. Specifically what I'm trying to decide:

1. I've settled on H.264, but what bitrates should I consider?
2. I want to preserve the 5.1 soundtrack if the source has one. Should I dump the raw AC3 stream and mux it unaltered into the MP4, or is there a good reason to re-encode to AAC?
3. I'm not concerned about hardware player compatibility at this stage, but if I were, what should I be doing to make my backups as compatible with hardware players as possible?


Thanks,
Aragon

fibbingbear
19th May 2008, 22:38
I think it's generally agreed upon that CRF (constant rate factor) is a better choice than bitrate. Anywhere from 16-24 is acceptable, although most people seem to pick something between 18-22. It means that simpler stuff will be encoded with fewer bits, more complicated stuff encoded with more bits. In essence, constant quality.

I don't know much about AC3 vs. AAC, but I'd assume that AAC would be smaller and probably not be able to tell the difference. More work, though, than just dumping AC3, I bet...

To make your backups compatible with hardware players, you'll need to limit the types of compression / optimizations H.264 can do. There are different profiles specified for different players.

I just scratched the surface, I'm sure there are others out there that know more and can elaborate on each point :)

acrg
21st May 2008, 20:07
Thanks for your post. I hadn't heard of the CRF option and tried it last night for the first time. Much better than multipass encoding I'd say!

I learned the hard way that AC3 simply can't be contained in the MP4 format. Looks like it only permits AAC, MP3, and straight PCM. I decided that I didn't want to transcode between two lossy codecs so I'm experimenting with MKV instead. I like that MP4 is an ISO standard, but I guess I'll only use it now depending on my audio source. Pity.

Sitron
22nd May 2008, 08:58
I'm new to the "encoding DVD to H.264 and putting them into a MP4"-game, so I am hungry for information and facts:

Today I use these Mencoder -x264encopts lines for my PS3 H.264-encodings:
X264PASS1="pass=1:turbo=1:bitrate=1024:frameref=1:bframes=3:b_pyramid:direct_pred=auto:weight_b:me=dia:mixed_refs:bime:trellis=1:\
nopsnr:nossim:nochroma_me:subq=1:nodct_decimate:nointerlaced:level_idc=41"
X264PASS2="pass=3:turbo=0:bitrate=1024:frameref=3:bframes=3:b_pyramid:direct_pred=auto:weight_b:partitions=all:8x8dct:me=hex:mixed_refs:\
nobrdo:bime:trellis=1:nopsnr:nossim:subq=5:nodct_decimate:nointerlaced:chroma_me:level_idc=41"
X264PASS3="pass=3:turbo=0:bitrate=1024:frameref=3:bframes=3:b_pyramid:direct_pred=auto:weight_b:partitions=all:8x8dct:me=umh:mixed_refs:\
brdo:bime:trellis=1:nopsnr:nossim:subq=6:nodct_decimate:nointerlaced:chroma_me:level_idc=41"

I have put them together after reading the manualpage for Mencoder, looking at h264enc and other sources on the net.

But you say that I can replace all three passes? I can scrap pass 1 and 2, take the pass-3-line and removing the bitrate, pass, turbo option and adding crf=20? And the quality would be better and/or filesize smaller? Or are there any other benefits?

smok3
22nd May 2008, 09:09
sitron, file size unknown, speed better, quality good.

fibbingbear
22nd May 2008, 17:33
When you use CRF, you give up:

1.) The ability to know the file size in advance. It may encode the file to a large size or small. You're telling the algorithm, "throw enough data at it so it looks good!"

But you gain:

2.) CRF only requires 1 pass, and does not benefit from other passes (or if it does, it's so minimal that no one uses multipasses). So it is faster.


Maybe this analogy would be good [NOTE THAT NUMBERS ARE MADE UP]:

Imagine you have a Simpsons DVD. You encode at 1500kbps 2-pass, and it looks great. You wonder, "maybe I can get away with less..." So you try 500kbps. Doesn't look good. You try 1000kbps. Looks good, and you decide to stay with it.

Now imagine you have the Matrix DVD. You encode at 1500kbps. Looks bad. You encode at 2500kbps. Looks good. You encode at 2000kbps. Looks good, you decide to stay with that.

If you had encoded both with CRF=18, the algorithm would find the right bitrate for you so that it "looks good". It'd save you all the trouble. And it's much better than picking a single bitrate for everything --- if you had picked 1500kbps, it'd be overkill for one DVD and not enough quality for another.


Find a CRF value that "looks good" to you and stick with that.

Sitron
22nd May 2008, 18:18
Thanks, now I understand a whole lot more! CRF it is then :-) I care more about quality than size!

rebkell
22nd May 2008, 18:51
Could someone give a crf for dummies explanation about what values like 18 or 22 stands for? I've seen some explanations, but nothing that really hit home with me about the significance of the values. I thought 22 was better than 18 for a long time. :thanks:

stax76
22nd May 2008, 19:49
Smaller value means better quality, obviously it also means bigger filesize. CRF 22 is about 30% smaller in file size than XviD with quantizer 3, smaller 22 things start to get lavish.

acrg
22nd May 2008, 23:51
These are my x264enc settings from mencoder:


x264encopts=crf=18.0:turbo=0:threads=4:frameref=6:bframes=5:b_adapt:b_pyramid:weight_b:deblock:
cabac:direct_pred=auto:8x8dct:partitions=all:me=hex:mixed_refs:subq=7:chroma_me:bime:brdo:trellis=2:
nofast_pskip:nodct_decimate:ssim


I've settled on CRF 18 for now. Lower values started lacking quality for me, and higher values started demanding too much bandwidth.

Blue_MiSfit
28th May 2008, 20:35
Yeah, it depends on the source too.. A lot of HD stuff I do looks great at CRF20, or even CRF21, but some need 19 or even 18 to look really good. I've gone as low as 16 for SD material with FGO.

~MiSfit