[x264-devel] non deterministic encoding

Mathieu Monnier m.monnier at ateme.com
Fri Jul 20 16:31:44 CEST 2007


 > the thing is that I noticed this behaviour only with mp4 files, so this
 > could be related to the Avisyth decoding, but why then the file is 
encoded
 > correctly but at a different bitrate then the one required?

The following is completely theoritical, but  nothing prevents a 
DirectShow filter from launching a thread to parse the file you want to 
open, without making the end of the parsing mandatory for the video to 
open. Now, if you were using such a DirectShow filter, here is what 
would happen if avisynth were to use it : the filter is instantiated, 
opens the file, launches a thread to start the parsing then says OK, the 
file is open, I'm ready. Now, whenever the filter says ready, avisynth 
asks it the number of frames. The filter answers the number of frames it 
has already parsed, which isn't necessary the complete file. Avisynth 
doesn't know and doesn't care, and won't know there is actually more frames.

Now, such a behavior wouldn't give the same number of frames from on 
pass to another, leading the two passes algorithm to completely mess up 
the bitrate prediction.

Once again, it's all theoretical, but I know at least one DirectShow 
filter that does launch such a thread ( it's not a public one, but 
still, it exists... )

So, use FFmpegSource with avisynth.

Regards

Mathieu

_______________________________________________
x264-devel mailing list
x264-devel at videolan.org
http://mailman.videolan.org/listinfo/x264-devel


More information about the x264-devel mailing list