Log in

View Full Version : Encoding image sequence.


kotoko
14th April 2008, 12:37
Hi everyone,

I tried to start the lossless encode using the command line:

start /belownormal /b /w "" "x264.exe" --qp 0 --nr 200 --deblock 0:0 --pass 1 --stats "test.stats" --pbratio 1.70 ^
--8x8dct --partitions i8x8 --analyse "p4x4,p4x8,p8x4,p8x8,p8x16,p16x8,b4x4,b4x8,b8x4,i8x8,i4x4" ^
--me "umh" --merange 16 --bframes 3 --mixed-refs --ref 10 ^
--subme 7 --b-rdo ^
--weightb --trellis 1 --progress ^
--no-fast-pskip --output "NUL" "test.avs"

test.avs contains :

ImageReader("ccc\%03d.bmp", 001, 021, 24, use_DevIL = false)
return last

And it keep giving me this error msg:

avis[error]: unsupported input format <DIB>
x264[error]: could not open input file 'test.avs'

Similar error messages, if I use the virtual dub and ffdshow h264 encoder to encode the image sequence. There is no problem opening the file, the err msg only comes out when the encode is initialize. Also, there is no problem if i select xvid but not h264 under the compression method of virtual dub : /

Unhandled
14th April 2008, 12:58
The output of Avisynth is probably using the RGB24 colorspace. That could cause the error you are receiving.

Add the following line to your Avisynth script. Place the line between the two existing lines:
ConvertToYV12()

kotoko
14th April 2008, 13:23
Ok thanks , it works. However, I heard that the convert of RGB to YV12 will cause a loss of quality ... I wish to encode the image to a smaller video file, and then export the video back to image sequences without any loss of information. That is, under the subtraction of the compared images .. every point contains exact same details ... is it possible to do so with the 'qp 0' lossless compression?

nm
14th April 2008, 13:44
No, since x264 only supports YV12 colorspace. Most other lossless codecs, like FFV1 and Lagarith, support RGB24 too.

kotoko
14th April 2008, 14:04
No, since x264 only supports YV12 colorspace. Most other lossless codecs, like FFV1 and Lagarith, support RGB24 too.

Oh .. great information ... thanks again.

Do you mean x264 only?.? Is there other h264 encoders support RGB24 input & output ?

nm
14th April 2008, 14:28
Do you mean x264 only?.? Is there other h264 encoders support RGB24 input & output ?
Lossless RGB encoding is only possible with the latest FRExt amendments to the standard (if even that, I'm not sure). So your only hope would probably be the JM reference encoder, and I wouldn't recommend it for any actual encoding.

Why do you want to use a H.264 encoder? Actual lossless codecs can be much faster. See: http://www.compression.ru/video/codec_comparison/lossless_codecs_2007_en.html

Stakiman
14th April 2008, 20:09
And, though, you should use --crf 0 instead of --qp 0 ;-)