0

I want to do two pass encoding using FFmpeg libraries. Sample codes provided as documentation show encoding/decoding, muxing/demuxing etc., but the encoding process is single pass. I want to do/experiment with two-pass encoding. Is there some example/sample provided elsewhere?

Thanks in advance!

taansari
  • 95
  • 1
  • 4
  • 13
  • libx264 suports two pass encoding! Trying with executable or library? – nmxprime Mar 13 '14 at 04:11
  • I've already tried executable, with success; so I want to implement it from library, using C/C++ code. Since I have not implemented anything yet, there is no source code that can be shared (apart from muxing.c sample that comes with FFmpeg libraries, which concerned users would be aware of anyway). – taansari Mar 13 '14 at 05:46
  • i tried setting profile of libx264 using x = `av_opt_set(c->priv_data,"profile","baseline",0)` . Similarly try setting `av_opt_set_int(c->priv_data, "pass", 2, 0)` or `av_opt_set(c->priv_data,"pass","2",0)` [dnt know which will work for. For me, neither worked for setting `vbv-bufsize`] – nmxprime Mar 13 '14 at 06:15
  • av_opt_set_int(c->priv_data, "pass", 1, 0) and av_opt_set(c->priv_data,"pass","1",0) (for 1st pass) both return error code to me. Apparently that's not it... – taansari Mar 14 '14 at 06:38
  • i told, neither worked for me! – nmxprime Mar 14 '14 at 08:44
  • 1
    Apparently, things kind of work fine when I only supply CODEC_FLAG_PASS1 for first pass, and CODEC_FLAG_PASS2 for second pass, while creating output stream... but it works fine only for h264, and not working fine with vp8 - looking deeper. – taansari Mar 17 '14 at 07:24

0 Answers0