<div dir="ltr">OK, I've narrowed it down to 2 solutions:<div>1) (the one that doesn't involve changing FFmpeg's code) I can make a copy of DASHContext struct, maintain any changes that will be made, and set the bitrate by DASHContext *c = fmt_ctx->priv_data before calling av_write_trailer</div><div>2) Can setting the bitrate be done by adding a AVOption code to DASH muxer and later calling any av_opt_set_* function (the difficult part is that the bitrate must be set for an array of dynamically allocated OutputStreams inside DASHContext) ?</div><div><br></div><div>--</div><div>Best regards</div><div>Przemysław Sobala</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 16, 2017 at 10:07 AM, Przemysław Sobala <span dir="ltr"><<a href="mailto:przemyslaw.sobala@gmail.com" target="_blank">przemyslaw.sobala@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p><font face="Helvetica, Arial, sans-serif">Hello</font></p>
<p><font face="Helvetica, Arial, sans-serif">I'm wondering, if there's
a way to set representation's bandwidth (bitrate) parameter when
encoding with libx264 with constant quality (crf)? In my code
I'm calculating stream's bitrate by adding muxed packet sizes
but in the end I cannot pass it to the DASH muxer.</font></p>
<p><font face="Helvetica, Arial, sans-serif">I thought the best way
would be to set the final bitrate before calling av_write_trailer
function (because internally it calls
dash_write_trailer->dash_<wbr>flush->write_manifest) but DASHContext
structure is initialized earlier (with dash_init function) with
default bitrates set and also it's not available via the API - I
can access it by AVFormatContext->priv_data but it's type is
uknown - void* - and casting is unavailable since this struct if
for internal use only.</font></p>
<p><font face="Helvetica, Arial, sans-serif"><br>
--<br>
Best regards<span class="HOEnZb"><font color="#888888"><br>
Przemysław Sobala<br>
</font></span></font></p>
</div>
</blockquote></div><br></div>