[Libav-user] avformat_alloc_output_context2 with WEBM defaults to VP9/Opus now - need to change
blackcopper1 at gmail.com
Mon Oct 19 12:14:18 CEST 2015
Sorry for the delay:
> The output context only has suggested default codecs. You can just
> change them to whatever you want, you don't have to follow the default
> (ie. just don't listen to AVCodec->video_codec/audio_codec, but set
> your own.
I have patched my code with something like:
avformat_alloc_output_context2(&this->ocVid, opfmt, NULL,
if ( ocVid->oformat->audio_codec == AV_CODEC_ID_OPUS )
ocVid->oformat->audio_codec = AV_CODEC_ID_VORBIS;
if ( ocVid->oformat->video_codec == AV_CODEC_ID_VP9 )
ocVid->oformat->video_codec = AV_CODEC_ID_VP8;
this->fmtVid = this->ocVid->oformat;
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.
Both VLC and MPC should not show this problem, as they were working
properly before... I wonder what is wrong..
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user