Is it better H.264 or xvid?

vbimport

#1

Hi :slight_smile:

As usual, my poor wallet is forcing me to find a solution for backups.

The easier solution is to backup a DVD9 to DVD5 using DVD Shrink or DVD-Rebuilder, but this solution is also disc consuming. Trying to save DVD (please, don’t laugh, my wallet is really in shortage :sad: ) I thought to convert original DVDs to avi (xvid with autoGK) or mkv (currently testing Handbrake).

I’d like to know feedback about what is the best choice that allow me to retain best video quality with smaller file sizes.

When I use autoGK to convert a series DVD to avi, I select 550 MB as file size for each episode.

There is a precise reason why I use this file dimension: it is possible to burn 8 files on a single layer DVD filling the disc at about 98% (a reasonable safe filling level: I never fill my DVDs at 100%).

With AutoGK I can get reasonable encoding times, but Handbrake is very time consuming: after about 2 hours is still encoding a single episode (currently 78% of second pass).

Being so time consuming, I’d like to know some suggestions. There is a sort of thumb rule about quality that can be obtained with H.264 compared to xvid? I know that results are related to the source DVD, but with the same source what codec has the best chance to get better results?

I know that 550MB is good to compress a single episode with xvid, but if quality of H.264 is better, how much can I reduce file size still retaining a good quality? There is a sort of thumb rule for this too? Running tests with many file sizes is too time consuming for my CPU, an Intel E8400 (with a Sandy Bridge processor maybe I can run tests easily, but I can’t afford a new computer :doh: ).

Thanks :slight_smile:


#2

From what I’ve seen on bitrate comparisons, you can use 60% of the bitrate in x264 and achieve the same quality as xvid. http://compression.ru/video/codec_comparison/h264_2010/index.html

Look at the overall conclusions in that study (bottom of the page).

When starting with the same source, and working with final output size as your primary constraint rather than bitrate, you should be able to make 330-350Mb sized files using H264 rather than 550mb for the xvid encoded episodes from your dvd source. This is something of a rough estimate on my part…you may want to adjust this according to your input files. Some videos with lots of action may need a bit more.

Encoding times depend in part on the speed of your computer, but also on the parameters you set for the encoder. Going to a faster setting may compromise the quality enough to see some differences in output however. Are you using High profile or Normal in Handbrake?


#3

First of all thanks for answer :bigsmile:

In Handbrake I’m using High profile, because if I understood correctly is the best option for television, whereas normal profile is better for portable devices.

If possible I’d like to get a fixed file size for output, so I can calculate the ideal size to fit an entire season in 2 DVDs, but if quality loss is too high I can ignore file size.

Most settings in Handbrake are at default, because I have no idea of meaning of most settings :o

I just compared two files, one with fixed size of 550 MB, and the other without any file size restriction (output is 654 MB starting from the same DVD source and with all other settings identical). I can’t notice any difference.

A file size of 350 MB will allow me to save more space :slight_smile: I’ll run a test now :iagree:

I forgot to mention that I also tried to retain a dual audio with subtitles. Both audio tracks are set as AC3 passthru, because I prefer to retain best quality for audio too. So maybe 350 MB is a too low file size, but I’ll run a test anyway :slight_smile:


#4

A little update :slight_smile:

AutoGK requires 38 minutes each to make the 550 MB and the 250 MB files (2 pass encoding). In my monitor I can’t notice any difference, but probably there is a difference between the 350 MB xvid file and the the 350 MB .mkv file in a large screen television.

To improve video quality, I decided to keep only a single audio track so the 350 MB mkv file is my choice :bigsmile:

Too bad, encoding times are very very bad in my computer :doh:


#5

Encoding also goes much faster if you choose to encode to constant quality instead of size. You said you are encoding episodes so the size will come out about the same from one show to the next.


#6

That’s correct :iagree:

If I’m not wrong, choosing constant quality will make a single pass encoding, whereas the 2-pass encoding is done to select the right compressibility level to get the file size.

In my last test, however, I got a problem: with Handbrake, I wasn’t able to include subtitles in the file. Whatever subtitle track I selected (using VLC as player), no subtitle is shown :doh:


#7

Examine the mkv file with MediaInfo. If the subtitles are included, you should be able to see them with this tool.

Did the subtitles show up as a Vobsub files in the Subtitle tab of Handbrake before you started encoding?

By the way, how is the quality of the H264 video at that low bitrate/small size output?


#8

H.264 has better quality and smaller size but takes longer to encode where as Xvid is normal quality and a bigger size with less time to encode. In a general sense H.264 is chosen by those who have quad processors and Xvid is chosen for those who don’t.

Typical settings for T.V. shows

IE:

NTSC

Frame Size: 624 x 352
Total Bitrate: 145 kbps
Frame Rate: 23
Audio: MP3 128kbps

This should achieve a file size of around 350MB with good quality. There is a breaking point when it come to the screen size that you are displaying it on and at about 42" is where you will start to see degradation, but with just about everything now having some form of scaling ability’s this can vary.

IE:

Pal

Frame Size: 640 x 352
Total Bitrate: 384 kbps
Frame Rate: 25
Audio: AC3 384 kbps

Now toss in 5.1 Audio and a change of frame size and now the file size will change to about 700MB.

Here is another nice piece of software

http://www.videohelp.com/tools/XviD4PSP#guides

:cool::cool:


#9

I prefer the quality of H.264 especially for the smaller screen size(think ipod) of portables…I find the preset(s) using Handbrake work just fine for me needs…
Here’s a mediainfo screenie of the last one I ran with the Ipod preset setting…The audio is AAC LC VBR ~160kbps 2ch…Looks and sounds great on the portable and just ok on the lappy…But normally I wouldn’t use these settings for my regular viewing on the PC or widescreen TV…
Gotta love Handbrake, works a treat for me…:smiley:



#10

Too bad I already deleted files, so I can’t check with MediaInfo :o

However, I remember that subtitles were shown as Vobsub in handBrake :slight_smile:

The quality of the H264 was not bad, and actually is rather hard to notice any difference in my monitor, but I don’t know if a large screen TV will show a bad video appearance.

To further improve video quality I also decided to keep only a single audio language instead of dual audio as most of my backups, so a higher bitrate can be used to compress video.

I noticed that XviD4PSP is still in beta: is it safe to use? I’m always picky about installing beta software :o

However, given my current CPU, I can’t use H.264 as choice, because it will require too much time for each episode. I’m trying to find a way to save some money hoping I’ll be able to get a Sand Bridge CPU, or at least a 6 core AMD (this will certainly improve performance).


#11

Current version I am using now is XviD4PSP 5.10.234.0 beta. have had no issues. The last version I used previously was XviD4PSP_5.0.37.8_r132. There is also a daily version in which the software is updated daily but that’s really living in the beta world.

:cool::cool:


#13

Late to the party here.
I recently did a complete backup of one of my DVD collections, about 400 titles.
Used Handbrake CQ mode with default settings. (H.264) to create MKV files. Image quality is indistinguishable from the DVD on a 65" screen, DD and DTS can be passed through untouched. Reduction in title size ranges from 60-40% depending on the title, rare cases of 75% reduction. Encoding process is slow, usually 0.5x to 1x on a dual core system.

MKV has a clear benefit of compatibility over xvid, being supported by a wide variety of players.


#14

Thanks for your feedback CDan :slight_smile:

The only drawback of H.264 is indeed slower encoding speed :frowning:

Kerry, do you think that there will be a big difference between a Sandy Bridge CPU and an AMD 6 core processor in this regard? The AMD is still a bit cheaper and I’m not sure that Handbrake supports Quick Sync feature :doh:


#15

Handbrake doesn’t support Quick Sync yet.

According to Anandtech, a SandyBridge i7 2600K will be about 20% faster at H264 encodes than an AMD six core (running at 3.3ghz ). This is just straight encoding with the X264 encoder, not Quick Sync. An i5 2500K shows to be much faster on the first pass (analysis), but slightly slower than the AMD 6 core in the encoding pass.

From what I’ve seen on prices though, the Sandy Bridge i7 cpu and a decent motherboard will run $480 or so at Newegg.


#16

[QUOTE=geno888;2589966]Thanks for your feedback CDan :slight_smile:

The only drawback of H.264 is indeed slower encoding speed :frowning:
[/QUOTE]

Speed or quality, take your pick. :wink: Consensus seems to be that the Handbrake CQ encode looks great. I did not consider speed at all when I did this latest batch, I wanted them to look as good as the original. They do. A CQ encode will always be much slower than other types. Plus you cannot predict the output file size. Bright video with a lot of action will result in some pretty large files in CQ mode.


#17

Thanks again for feedback :slight_smile:

MKV (and then H.264 as codec) is still my preferred container, because allow to insert in the file both chapters and forced subtitles without any .srt external file.

With my Intel E8400 currently I need about 2 hours for each episode, so a full season (24 episodes) require 48 hours :eek: :doh:

I really would like to get a SB CPU.

The best prices I found currently are € 140 for mainboard (Asrock Z68 EXTREME4) and €175 for 2500K CPU (€243 for 2600K).

I have to talk with the wallet :bigsmile:


#18

Just completed another couple of tests (with a smaller source file to reduce waiting times :bigsmile:)

Single episode extracted from the original DVD with DVD Shrink is 874 MB, and mkv file with constant quality RF:20 in handbrake is 287 MB.

I can’t notice any difference comparing both video files, and finally I had success in inserting forced subtitles too :smiley:

My error was done in Handbrake, because I checked both “Forced Only” and “burned in” options, whereas I only have to check “Default” :doh:

Of course, this is not reported in the official guide, and actually I still have no idea what “forced only” and “burned in” options means :doh:

However, using constant quality is also time saving because encoding is made in a single pass :bow:


#19

great info! I’m gonna be the 1st to say it should be made a "sticky"
when I use Handbrake I create “jobs” and let it run overnite, otherwise the wait time is maddening :bigsmile::p:eek: and don’t even think about touching the computer :rolleyes:


#20

With my current CPU it’ll be a real pain to complete a full season: about 1:40 min for each episode :doh:


#21

Yes, with Handbrake you can set up the queue and let it run overnight. But if you set Handbrake to run in low priority there’s no problem using the PC while it’s running.