View Full Version : How many hours can I fit onto a CD w/ x264?
puffpio
4th November 2005, 13:03
If CPU time was not an issue (ie highest quality, all options on)
640x480 29.97 NTSC tv shows
audio is HE-AAC ~128kbps
how many hours of h.264 video do you think I could fit on a CD w/ excellent quality?
2 hours? 3 hours?
Jalavera
4th November 2005, 13:17
I Think that a 2000 kbit/s AVC codec is nearly 9800 kit/s MPEG2-DVD file at 720x576 25 fps (PAL). So, in CD world, it is 1 hour per CD. But if you put 1 hour and half this could not be a big quality decrease. I don't think you can put 2 or more hours with a really quality decrease.
But ALWAYS remember that in the 'sense world' nothing is really true; it depens on the eyes it is seen (=subjective). There are applications to test mathematically two videos and decide which one is better but mathematics are not the human perceptual eyes... You can download these tools at MSU site ( http://www.compression.ru/video/index_en.htm )
bond
4th November 2005, 13:30
as i dont think there is a definition for "excellent quality" (yeah its subjective) i would say you can place 3475829205 hours on 1 cd ;P
but imho the quality of normal 2 hours 16:9 movies on 1 cd is ok, crappy source 4:3 tv shows will be surely harder to compress and i would guess 1 hour???
just guessing
edit: i would go down with the audio bitrate a bit as 128kbps is not necessary imho
Sirber
4th November 2005, 13:35
I put 4h per CD, but hell I'm crazy :p
puffpio
4th November 2005, 13:39
I'm trying to to field a best guess bit rate for encodes....
The standard lately at least for tvrips has been 640x480 xvid, 175megs for 1/2 show - commercials...350 megs for 1 hour show - commercials....etc
so w/ h264 I imagine one can fit more? The only diffence is that I would be keeping the 29.96 NTSC rate..whereas all these tv rips decimate to 23.976 even though the source is not NTSC film...
puffpio
4th November 2005, 13:42
I agree w/ going down on audio bitrate...nero's HE-AAC encoder w/ VBR and 'normal' profile seems to output somewhere between 80-96kbps for a stereo audio source..
I am going to try and encode a 1/2 hour tv show taken off of my DVR, strip the commercials and make it fit 175 megs and see how it is...
falcon2000eg
4th November 2005, 14:17
You are not the only one Sirber i put 3 and half hours on 1 cd ,more for anime.
Audio 64kbps or less
bond
4th November 2005, 14:19
you could encode the clips with the same bitrate/filesize as with xvid but get better quality or you could encode with a lower bitrate/filesize and get ~ the same quality
its up to you, there is no "best way"
Chainmax
4th November 2005, 15:00
puffpio, if you're talking multiple hours per CD you won't get excellent quality, no matter what codecs or filtering you use. You can, however, get pretty decent quality if you know what you're doing, but it depends heavily on the content and style (animation or real life footage). For instance, I'm currently trying to backup the R1 Trigun series to a single DVD-R (which would amount to ~102mins per CD) with the original 2/0 384kbps japanese audio at 640x480. That leaves ~556kbps for the video. Using x264 with all the encoding-time-heavy features, it looks pretty good, but it's not equal to the DVD.
The thing with AVC is that many people use it for really low bitrate encodes, therefore inloop filtering is a necessity. In animated content it doesn't matter as much, but I would bet (can't say for sure as I have not encoded that kind of material yet) that on real life footage the effect is quite noticeable.
My recommendation would be to use at most 2 hours per CD. For audio, use Ogg Vorbis aoTuVb4 @ q3.5, which would result in a ~98kbps file. Going much lower with audio is not really worth it: while my hearing is quite crappy, I trust the tests made at Hydrogenaudio which state that 80kbps is about the minimum at which modern audio codecs reproduce the source somewhat faithfully and that for such a bitrate aoTuVb4 performs better than other codecs.
With such an audio bitrate, average video bitrate would be ~700kbps. With that, I'd avice you to use the following x264 features: [b]deblocking=0/0, 16 reference frames, mixed references, 3 bframes (adaptive, pyramid, weighted), high profile with all macroblock options, RDO level 2, uneven multi hexagon, trellis = 2, adaptive quantization strength = 0.5, *.mp4 guy's custom matrix. Of course, using 2 passes.
If this is too slow for you, which it probably will, you can use RDO, hexagon and 5 reference frames with no mixed references.
puffpio
4th November 2005, 23:07
I'm trying to use sharktooth's prepackages profiles..specifially the high qual - extreme profile
to that I added AQ strength of 0.3 (up from 0) and trellis of 2 (up from 0)
everything else in the extreme profile is what you suggested or more I believe
Fro my AVS script, I'm using the FFT3dGPU denoiser which is like FFT3dfilter but uses your video card's GPU to do all the work.
A whopping 1.5fps on an Athlon XP 3000+, w/ overclocked Geforce 5900 ehheheheh
I really need to upgrade to an Athlon 64 X2 w/ a Geforce 7800..should then go muuch faster
*.mp4 guy
4th November 2005, 23:20
My recommendation would be to use at most 2 hours per CD. For audio, use Ogg Vorbis aoTuVb4 @ q3.5, which would result in a ~98kbps file. Going much lower with audio is not really worth it: while my hearing is quite crappy, I trust the tests made at Hydrogenaudio which state that 80kbps is about the minimum at which modern audio codecs reproduce the source somewhat faithfully and that for such a bitrate aoTuVb4 performs better than other codecs.
Actually Vorbis (ogg is the container for those who may not know) hits 96 kbps on most content at Q2, movies are more compressable audio wise then music though, so it will probably end up at ~80 kbps if you set it at Q2. It will still sound as good as most music at 96 Kbps. If you want to squeeze the most onto a cd I would recommend Vorbis at Q0, which will give you less then 64 kbps for audio and still sound quite reasonable.
Revgen
5th November 2005, 00:13
Fro my AVS script, I'm using the FFT3dGPU denoiser which is like FFT3dfilter but uses your video card's GPU to do all the work.
A whopping 1.5fps on an Athlon XP 3000+, w/ overclocked Geforce 5900 ehheheheh
I really need to upgrade to an Athlon 64 X2 w/ a Geforce 7800..should then go muuch faster
A few tips for upgrading.
I'd suggest buying the new mobo and the Athlon 64 X2 first. Save your money later for the video card.
FFT3DFilter becomes just as fast if not faster than FFT3DGPU when used with TSP's MT filter (http://forum.doom9.org/showthread.php?t=94996). X264 W/multiple threads combined with the MT filter will definately improve your performance.
Also I suggest not buying the Athlon X2's with 1MB of cache. Buy the ones with the same clockspeed and 512kb of cache. Cache costs way too much and doesn't have any affect on encoding speed. IE the Athlon X2 4800+ has the same clockspeed as the X2 4600+ yet costs about $100 - $200 more because of the extra cache.
I hope this helps.
Chainmax
5th November 2005, 00:55
puffpio: I haven't used profiles yet, but if you say they include most of the settings I recommended it's cool, your encodes will turn out great then :). And FFT3DGPU is awesome, I wish TSP could port v1.8 since it has the degrid parameter though.
Actually Vorbis (ogg is the container for those who may not know) hits 96 kbps on most content at Q2, movies are more compressable audio wise then music though, so it will probably end up at ~80 kbps if you set it at Q2. It will still sound as good as most music at 96 Kbps. If you want to squeeze the most onto a cd I would recommend Vorbis at Q0, which will give you less then 64 kbps for audio and still sound quite reasonable.
I never can remember that Ogg is the container and that Vorbis is the real name of the audio format :o. I know the theoretical settings for Vorbis, but like you said movies are more compressible because they have mostly dialogue and some basically silent spots. From my experience, 80kbps on a movie with Vorbis would be achieved @ q2.8, but I hardly think that a difference of 16-34kbps will neither make the video much better or allow you to squeeze an extra episode per CD. In my honest opinion, audio is every bit as important as video, and if someone respected in the HA community says that 80kbps is the absolute minimum for somewhat faithful encoding then I'll stick to that.
*.mp4 guy
5th November 2005, 01:32
With Vorbis the quality isn't determined by the bitrate, its determined by the Q setting, bitrate is irrelevent quality-wise, all that matters is the Q, the Q to get 80 Kbps is 1, so what they really meant is that Vorbis at Q1 reproduces the original sound quality well (in some cases as good as 128kbps lame mp3).
This is because the Q in vorbis is like the quantisizer in Xvid, when you set it you only set the amount of compresion, which could result in a variety of bitrates.
puffpio
5th November 2005, 01:38
Don't wanna use vorbis because I want an mp4 file output that is standards compliant
I could take the audio down to 80kbps HE-AAC if needed...
we'll see how the encode goes compared to the original file :)
I restarted the encode because of a new sharktooth build of x264..it only completed the first pass so I figured it wasn't too big a deal..RD on B frames seems like a smart thing to do
except now that I'm not at home and it's chugging away I realize that I forgot to set the command line switch to turn it on!!! :O
Chainmax
5th November 2005, 01:40
I know about that, but the test was done at 80kbps.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.