PDA

View Full Version : What bitrate should I use for 1080P content?


shlap
5th February 2008, 02:51
I'm reencoding a VC1 to h264 so that I can stream it to my PS3 in a .TS stream. I set the bitrate in x264 to 10000 which I think is a bit much because I ended up with a 25GIG file! Hah!

What bitrates are you guys using for 1080p material? I'd also appreciate any comments about the command line I'm using (keep in mind it's PS3 compatible).

Thanks!

"D:\Program Files\megui\tools\x264\x264.exe" --pass 1 --bitrate 10000 --stats "C:\Rips\Work Area\Breach\breach.stats" --level 4.1 --bframes 3 --direct auto --subme 1 --analyse none --vbv-bufsize 15000 --vbv-maxrate 25000 --me dia --merange 12 --threads auto --thread-input --sar 2543:2500 --progress --no-psnr --no-ssim --output NUL "C:\Rips\Work Area\Breach\breach.avs"


"D:\Program Files\megui\tools\x264\x264.exe" --pass 2 --bitrate 10000 --stats "C:\Rips\Work Area\Breach\breach.stats" --level 4.1 --ref 3 --mixed-refs --bframes 3 --b-rdo --bime --weightb --direct auto --subme 6 --trellis 1 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --vbv-bufsize 15000 --vbv-maxrate 25000 --me umh --merange 12 --threads auto --thread-input --sar 2543:2500 --progress --no-psnr --no-ssim --output "C:\Rips\Work Area\Breach\breach.mkv" "C:\Rips\Work Area\Breach\breach.avs"

Dark Shikari
5th February 2008, 02:54
--merange 12 is a bit low for 1080p content--I'd probably double that, it'll definitely improve your efficiency.

Of course, the bitrate needed depends both on what you're encoding (different sources are different) and what kind of detail you aim to keep. Grain retention can be done decently with AQ or a CQM at 10 megabits, though if you're willing to sacrifice the grain you can go much lower (5, say).

shlap
5th February 2008, 03:00
Thanks for the comments. I'd like to keep as much detail as possible so maybe I'll stick with 10000 but my VC1 EVO is only 18GIG. Is it typical that the h264 encode would be much larger than that? I went from 18GIG original source to 25GIG!

Dark Shikari
5th February 2008, 03:04
Thanks for the comments. I'd like to keep as much detail as possible so maybe I'll stick with 10000 but my VC1 EVO is only 18GIG. Is it typical that the h264 encode would be much larger than that? I went from 18GIG original source to 25GIG!Are you sure your bitrate was actually 10 megabits then? That's very odd, because VC-1 EVOs are almost always quite a bit higher than that. How long is your film you're encoding?

shlap
5th February 2008, 03:05
Yep, I copied and pasted exactly what I used in the .bat file. Strange eh?

FYI - The movie I'm converting is Breach. If that makes any difference.

Dark Shikari
5th February 2008, 03:15
Breach = 110 minutes


110 minutes * (10 (megabits per second)) = 8.05664062 gigabytes

shlap
5th February 2008, 03:17
Is there anything else in the command line that would cause it to baloon in size like that?

Dark Shikari
5th February 2008, 03:21
Is there anything else in the command line that would cause it to baloon in size like that?Possibilities:

1) x264 is not getting the correct FPS in the input file.
2) I don't know what else.

shlap
5th February 2008, 03:23
Possibilities:

1) x264 is not getting the correct FPS in the input file.
2) I don't know what else.

Here is the AVS file I'm using. The Graph is just Haalli --> WMVideo Decoder.

global MeGUI_darx = 4769
global MeGUI_dary = 2500
DirectShowSource("C:\Rips\Work Area\Breach\Video.grf",fps=24000/1001,audio=false)
#deinterlace
crop( 0, 24, 0, -32)

foxyshadis
5th February 2008, 05:58
You could be getting a whole lot more frames than you should, check the actual length of the avs in virtualdub or a media player first. If it's not getting it right, you need to use the framecount parameter.

Snowknight26
5th February 2008, 06:30
I've noticed that Haali likes to load 'merge' files with similar names. If you're opening EVO2.evo with Haali and you have EVO1.evo in the same folder, it appends EVO2.evo to EVO1.evo. (I think you can turn it off somewhere.)

Also, make sure that the framecount seems right. x264 should report around 158242.

J_Darnley
5th February 2008, 13:22
DirectShowSource("C:\Rips\Work Area\Breach\Video.grf",fps=24000/1001,audio=false)
The division you are doing there will return an integer as you are dividing two ints. It will return 23. Make sure (at least) one of them is float and it will return a float. I don't know if this will help you much but at least you should get the correct framerate.

lexor
5th February 2008, 16:10
The division you are doing there will return an integer as you are dividing two ints. It will return 23. Make sure (at least) one of them is float and it will return a float. I don't know if this will help you much but at least you should get the correct framerate.

While that is true in Java/C/etc it doesn't hold in AviSynth. At least for me output was always proper 23.976 with that division.

shlap
5th February 2008, 19:52
The division you are doing there will return an integer as you are dividing two ints. It will return 23. Make sure (at least) one of them is float and it will return a float. I don't know if this will help you much but at least you should get the correct framerate.

Thanks man! You and Dark Shikari nailed it. I changed the framecount from 24000/1001 to 23.976 and it looks like it's working now. My MKV is 6.6 GIG with about 1.5hrs left of encode time.

On a side note, using a Q6600 CPU on this 1080p source and it's encoding at about 4fps. What sort of speeds are you guys getting with your hardware?

Blue_MiSfit
5th February 2008, 20:24
Sounds like me :)

I have a Q6600 at stock (currently), and I usually get between 3 and 5 fps for 1080p and pretty crunchy settings (RDO, Trellis, AQ, 4 refs, multi-hex etc...)

The quality is pretty exceptional though!

~MiSfit

J_Darnley
5th February 2008, 20:55
While that is true in Java/C/etc it doesn't hold in AviSynth. At least for me output was always proper 23.976 with that division.
Try:
Colorbars()
Subtitle(string(24000/1001))
And what does it say? If there is something wrong with using that to get the value of a calculation, please say. Perhaps DSS treats it differently.

shlap
5th February 2008, 23:40
I just checked and my new MKV is just over 8 GIG and looks GREAT so the framerate change, along with the framecount addition fixed the issue.

Now I have a new issue. Rather than joining the EVOs in EVODemux, I let AVISynth do it ie : DirectShowSource("Feature_1.evo")+DirectShowSource("Feature_2.evo"). It worked, but I see a few gray frames right where the merge took place. Is there anything I can do in my AVISynth script to make the merge seemless or do I have to merge the EVO's some other way first? Thanks again.

Sagekilla
6th February 2008, 02:47
Dark Shikari, is there any sort of recommended scaling for merange according to resolution? This is the first time I've ever heard of increasing merange for high resolutions. Or is range of 24 for 1080p just something that's been observed to work well?

Thanks :)

(Sorry about the mini hijacking!)

Dark Shikari
6th February 2008, 02:51
Dark Shikari, is there any sort of recommended scaling for merange according to resolution? This is the first time I've ever heard of increasing merange for high resolutions. Or is range of 24 for 1080p just something that's been observed to work well?

Thanks :)

(Sorry about the mini hijacking!)24 is just a random value I pulled out of nowhere.

MErange represents the amount that x264 searches from the motion predictors in an attempt to find the actual motion vector. If there is sudden motion either spatially (Block A moves hardly any, and Block B moves a lot), or temporally (the frame suddenly shifts to the side, or an object suddenly starts moving), large MErange becomes important; if x264 doesn't look far enough away from its starting point, it won't find the real motion vector.

Obviously, in HD footage, objects move a larger distance, pixel-wise. So higher MErange is needed to capture the same level of motion searching. However, this comes at a relatively large speed cost.