[FFmpeg-devel] Enable two-pass encoding programatically

Mikael Hakman mhakman
Sat Dec 15 19:51:04 CET 2007


Hello,



I asked this question on [FFmpeg-user] list but did not receive any answers. 
Well, I'll try here.



How do I enable two-pass encoding/rate control when using 
libavformat/libavcodec programmatically? I'm setting pass1 flag by:



   videoStream->codec->flags |= CODEC_FLAG_PASS1;



but  the stats at:



   videoStream->codec->stats_out



are 0 in length all the time during the run. Do I have to set some other 
fields somewhere?



Thanks/Mikael







More information about the ffmpeg-devel mailing list