<div dir="ltr"><div>Hi there,</div><div><br></div><div>I'm writing <a href="https://github.com/leandromoreira/ffmpeg-libav-tutorial#chapter-3---transcoding" target="_blank" rel="nofollow">a mini-book/tutorial on how to use FFmpeg/libav</a> as a library and on the third chapter I created <a href="https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/master/3_transcoding.c#L247" target="_blank" rel="nofollow">a transcoder/transmuxer</a>
 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:</div><div><ul><li>huge final bit rate 190 Mb/s</li><li>weird fps 60.145</li><li>warning messages during encoding process [libvorbis @ 0x243c040] more samples than frame size (avcodec_encode_audio2)<br></li></ul></div><div>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:<br></div><div><br></div><div style="background-color:rgb(250,250,250);border-color:rgb(187,187,187);border-style:solid;border-width:1px"><code><div><span style="color:rgb(0,0,0)">git clone https</span><span style="color:rgb(102,102,0)">:</span><span style="color:rgb(136,0,0)">//<a href="http://github.com/leandromoreira/ffmpeg-libav-tutorial.git" target="_blank" rel="nofollow">github.com/leandromoreira/ffmpeg-libav-tutorial.git</a></span><span style="color:rgb(0,0,0)"><br>cd ffmpeg</span><span style="color:rgb(102,102,0)">-</span><span style="color:rgb(0,0,0)">libav</span><span style="color:rgb(102,102,0)">-</span><span style="color:rgb(0,0,0)">tutorial<br><br></span><span style="color:rgb(136,0,0)"># edit so you'll be using WebM streaming parameters <a href="https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/master/3_transcoding.c#L302" target="_blank" rel="nofollow">https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/master/3_transcoding.c#L302</a></span><span style="color:rgb(0,0,0)"><br>vim </span><span style="color:rgb(0,102,102)">3</span><span style="color:rgb(0,0,0)">_transcoding</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">c <br><br></span><span style="color:rgb(136,0,0)"># make sure to have docker installed</span><span style="color:rgb(0,0,0)"><br>make run_transcoding<br><br></span><span style="color:rgb(136,0,0)"># if you want to check the final media file</span><span style="color:rgb(0,0,0)"><br>mediainfo bunny_1s_gop</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">mp4</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">webm<br>ffprobe bunny_1s_gop</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">mp4</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">webm</span></div></code></div><div><br></div><div>Thank you</div></div>