[FFmpeg-devel] two-pass-stats with x264
Wed Nov 14 10:06:52 CET 2007
On Wed, Nov 14, 2007 at 09:28:58AM +0100, Thorsten Jordan wrote:
> some more questions to the public:
> It is impossible to use the normal AVCodecContext.stats_in/stats_out
> values to get 2-pass statistics to x264 and back, because x264 always
> writes them to a file itself.
> I would need to define that filename (not for the exact name, but the
> path prefix! doing chdir() temporarily wont do it) and this isn't possible.
> Possible solutions:
> 1) put a filename to AVCodecContext.stats_in for both passes and let
> libx264.c set up the filename from that when flags PASS1/PASS2 are used
> and codec is h264. Hackish though...
> 2) put a new attribute to AVCodecContext "const char* stats_filename" to
> transport that information (together with a new flag). Used for x264 encode
> 2)b) same as 2) but when this technique is used let avcodec handle the
> file itself (like x264). Using standard-C-lib fopen/fprintf/fscanf etc.
> Would probably need another new member for the file handle.
> Now the questions: would any of these solutions have a chance to get
no, not the slightest
> or this is of too low public interest or too hackish?
no, its just wrong and completely unneeded
1. you can send a patch to x264 to fix this, direct file IO is quite limiting
2. you can use a 2nd temporary file
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel