[Libav-user] Huge bit rate for VP9 while encoding WebM (libvpx-vp9, vorbis)

Leandro Moreira leandro.ribeiro.moreira at gmail.com
Tue Jan 7 16:51:54 EET 2020


Hi there,

I'm writing a mini-book/tutorial on how to use FFmpeg/libav
<https://github.com/leandromoreira/ffmpeg-libav-tutorial#chapter-3---transcoding>
as a library and on the third chapter I created a transcoder/transmuxer
<https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/master/3_transcoding.c#L247>
that I tested for h264->h265, mpeg4->mpeg-ts and it looked fine... but when
I tried to use it to produce a WebM (VP9, Vorbis) I noticed the following
issues:

   - huge final bit rate 190 Mb/s
   - weird fps 60.145
   - warning messages during encoding process [libvorbis @ 0x243c040] more
   samples than frame size (avcodec_encode_audio2)

Do you have any idea why this is happening? =( I took inspiration from the
FFmpeg API documentation/examples and command-line source code to create
this example. If you want to test for yourself here is how:

git clone https://github.com/leandromoreira/ffmpeg-libav-tutorial.git
cd ffmpeg-libav-tutorial

# edit so you'll be using WebM streaming parameters
https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/master/3_transcoding.c#L302
vim 3_transcoding.c

# make sure to have docker installed
make run_transcoding

# if you want to check the final media file
mediainfo bunny_1s_gop.mp4.webm
ffprobe bunny_1s_gop.mp4.webm

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200107/5b984a8b/attachment.html>


More information about the Libav-user mailing list