<div dir="ltr"><div dir="ltr"><div><span style="color:rgb(0,0,0)">I have had a playaround with ffmpeg to get an understanding of what rc_buffer_size needs to be set to but that didn't provide much information.</span></div><div><span style="color:rgb(0,0,0)">Instead I stepped through ffmpeg and I can see that there are 2 buffers that need to be set up. 1 is in AVCodecContext, the other is in AVStream,</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">Setting AVCodecContext->rc_buffer_size seems to have to be done in units of KB. If i use bits as the unit I see this <br></span></div><div>

<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="color:rgb(0,0,0)">> [mpeg2video @ 0x7f3a2c805600] Warning vbv_delay will be set to 0xFFFF (=VBR) as the specified vbv buffer is too large for the given bitrate!</span></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="color:rgb(0,0,0)"><br></span></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="color:rgb(0,0,0)">As for setting the buffer in AVStream, I cannot see how it is done. mpegenc.c gets the buffer_size in a struct AVCPBProperties using a call to av_stream_get_side_data. <br></span></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="color:rgb(0,0,0)">How does one set the values in AVCPBProperties in the AVStream?</span></p></div><div><span style="color:rgb(0,0,0)"><br></span></div></div><span style="color:rgb(0,0,0)"><br></span><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><span style="color:rgb(0,0,0)">On Wed, 25 Sep 2019 at 22:20, Carl Eugen Hoyos <<a href="mailto:ceffmpeg@gmail.com">ceffmpeg@gmail.com</a>> wrote:<br></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(0,0,0)">Am Mi., 25. Sept. 2019 um 22:57 Uhr schrieb Jonathan Noble<br>
<<a href="mailto:jonnobleuk@gmail.com" target="_blank">jonnobleuk@gmail.com</a>>:<br></span>
<span style="color:rgb(0,0,0)"><br>
> [mpeg @ 0x7f33b8004200] ac3 in MPEG-1 system streams is not widely supported,<br>
> consider using the vob or the dvd muxer to force a MPEG-2 program stream.<br></span>
<span style="color:rgb(0,0,0)"><br>
Note that independently of your question (I suggest to test with the<br>
cli), the output<br>
file will be unplayable with most players as ac3 in mpeg-1 system streams are<br>
typically unsupported (as written above).<br></span>
<span style="color:rgb(0,0,0)"><br>
Carl Eugen<br>
______________________________</span><span style="color:rgb(0,0,0)">_________________<br>
Libav-user mailing list<br></span>
<span style="color:rgb(0,0,0)"><a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br></span>
<span style="color:rgb(0,0,0)"><a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br></span>
<span style="color:rgb(0,0,0)"><br>
To unsubscribe, visit link above, or email<br></span>
<span style="color:rgb(0,0,0)"><a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</span></blockquote></div></div>