<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Sorry for the delay:</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The output context only has suggested default codecs. You can just<br>
change them to whatever you want, you don't have to follow the default<br>
(ie. just don't  listen to AVCodec->video_codec/audio_codec, but set<br>
your own.<br>
</blockquote><div><br></div><div>I have patched my code with something like:</div><div><br></div><div><div><span class="" style="white-space:pre">          </span></div><div><span class="" style="white-space:pre">           </span>avformat_alloc_output_context2(&this->ocVid, opfmt, NULL, this->filenameVid.c_str());</div><div><span class="" style="white-space:pre">                    </span>if ( ocVid->oformat->audio_codec == AV_CODEC_ID_OPUS )<br></div><div><span class="" style="white-space:pre">                     </span>{</div><div><span class="" style="white-space:pre">                          </span>ocVid->oformat->audio_codec = AV_CODEC_ID_VORBIS;</div><div><span class="" style="white-space:pre">                    </span>}</div><div><span class="" style="white-space:pre">                  </span>if ( ocVid->oformat->video_codec == AV_CODEC_ID_VP9 )</div><div><span class="" style="white-space:pre">                        </span>{</div><div><span class="" style="white-space:pre">                          </span>ocVid->oformat->video_codec = AV_CODEC_ID_VP8;</div><div><span class="" style="white-space:pre">                       </span>}</div><div><span class="" style="white-space:pre">                  </span>this->fmtVid = this->ocVid->oformat;</div><div><br></div></div><div>This did the work for me; however, default VLC or Media Player Classic is unable to play it properly - however, it does playback fine on firefox browser, and also with FFPlay.</div><div><br></div><div>Both VLC and MPC should not show this problem, as they were working properly before... I wonder what is wrong..</div><div><br></div><div> </div></div></div></div>