PDA

View Full Version : Max resolution with x.264


kallekill
19th August 2008, 12:36
Is there a maximum resolution you can encode a movie with in x.264? I am trying to encode a 2160p clip and get an error that the encoder can't find the stats file. The first pass went fine, but the second pass gives this error although there is a generated stats file.

Sharktooth
19th August 2008, 13:02
nope.

DarkZell666
19th August 2008, 13:17
Is there a maximum resolution you can encode a movie with in x.264? I am trying to encode a 2160p clip and get an error that the encoder can't find the stats file. The first pass went fine, but the second pass gives this error although there is a generated stats file.

Rather post your command-lines and your avisynth script (if you used one) so we can sort that one out :)
Also, what revision of x264 are you using ?

Dark Shikari
19th August 2008, 15:35
I've encoded 2160p successfully in the past, though it used an absurd amount of memory (hint: don't use --me esa, don't use too many refs).

kallekill
19th August 2008, 19:20
I tried both Sharktooths latest original build and the patched build.

This is my avisynth file. I can open it in media player and virtual dub:

loadplugin("C:\Program Files\AviSynth 2.5\plugins\ImageSequence.dll")
CoronaSequence("E:\internet downloads\x264\*.tga", sort=1)
AssumeFPS(50,1,True)
ConvertToYV12()

It takes a series of .tga files as input. In this test I am using only two images.

Then I use this command line with x.264:

x264 tga.avs -o test.mkv -B 80000 --thread-input --th
reads 4 --stats test.stats --pass 1

It works fine and generates a stats file. After that I run:

x264 tga.avs -o test.mkv -B 80000 --thread-input --th
reads 4 --stats test.stats --pass 2

This is when x.264 hangs and gives me this error:

avis [info]: 3840x2160 @ 50.00 fps (2 frames)
x264 [warning]: MB rate (1620000) > level limit (983040)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [error]: empty stats file
x264 [error]: x264_encoder_open failed

This is my first time encoding h.264 so I might be doing something horrible wrong.

Dark Shikari
19th August 2008, 19:28
Check the statsfile to see if its actually empty--also make sure that the statsfile got renamed from $name.temp to $name at the end of the previous encode (if it crashes, for example, it doesn't).

kemuri-_9
19th August 2008, 23:16
should be wary of the 2GB ram limit for 32bit applications, if they hit the limit, they'll crash either explicitly or silently

avisynth likes to buffer a lot of data into the ram, so you might need to use the SetMemoryMax() function within it to something
reasonable to let x264 have it's own fair share so this limit won't be reached and crash (usually silently from my experiences).

the alternative would be to separate avisynth from x264 by using avs2yuv and piping between them

iirc, avisynth 2.5.7 and prior 2.5.x uses 25% of the system ram as the default max, 2.5.8 uses 50% -64MB

kallekill
20th August 2008, 09:10
I removed --thread-input and --threads 4 and now it works. I am currently running xp 32-bit but I also have 64-bit Vista installed. Is there a 64-bit compile of x.264? I am also having problems playing the encoded movie. Seems like most decoders are badly multithreaded. FFdshow only uses around 40 % CPU although the movie plays like a slideshow. I tried coreavc, but it only produces a black picture.

BlackSharkfr
20th August 2008, 10:03
FFdshow isn't multithreaded yet.
And for CoreAVC, i had the same black screen issue when i did a 2560x720 encode. I guess it's a CoreAVC limitation but i don't know exactly how or why.

kemuri-_9
20th August 2008, 14:22
I removed --thread-input and --threads 4 and now it works. I am currently running xp 32-bit but I also have 64-bit Vista installed. Is there a 64-bit compile of x.264? I am also having problems playing the encoded movie. Seems like most decoders are badly multithreaded. FFdshow only uses around 40 % CPU although the movie plays like a slideshow. I tried coreavc, but it only produces a black picture.

there hasn't been a recent Win x64 build of x264 in a long time afaik.
I've also had black screens produced when video programs hit the memory limit, that's occasionally their way of 'silent crashing'.

DarkZell666
21st August 2008, 14:11
Dunno if this has a link with the error you reported but here goes anyway (r945) : http://git.videolan.org/gitweb.cgi?p=x264.git;a=commit;h=82efeea14c5fd03a6ed9c0b8eaa594e5d9407fce