<div dir="ltr"><div><div>My company's media server provider has reported that our buffering issues are related to inconsistent chunk sizes, video frame rates, audio frame rates and number of key frames.<br><br></div>The media server support group sent a suggested ffmpeg command line that could establish constant chunk sizes, video frame rates, audio frame rates and number of key frames.<br><br></div>The suggested command line is:<br><br><pre style="margin-right:0in;margin-bottom:11.25pt;margin-left:0in;line-height:14.25pt;background:rgb(248,248,248) none repeat scroll 0% 0%"><span style="color:rgb(43,46,47)">ffmpeg -i [input-source -pix_fmt yuv420p -deinterlace -vf "scale=640:360" <br>-vsync 1 -vcodec libx264 -r 29.970 -threads 0 -b:v: 1024k -bufsize 1216k <br>-maxrate 1280k -preset medium -profile:v main -tune film -g 60 <br>-x264opts no-scenecut -acodec aac -b:a 192k -ac 2 -ar 48000 <br>-af "aresample=async=1:min_hard_<wbr>comp=0.100000:first_pts=0" <br>-f flv "rtmp://<a href="http://192.168.1.2:1935/live/myStream" target="_blank">192.168.1.2:1935/live/<wbr>myStream</a> flashver=FMLE/3.0\20(<wbr>compatible;\20FMSc/1.0) live=true pubUser=username pubPasswd=password"<br></span></pre><pre style="margin-right:0in;margin-bottom:11.25pt;margin-left:0in;line-height:14.25pt;background:rgb(248,248,248) none repeat scroll 0% 0%"><span style="color:rgb(43,46,47)">Two questions:<br></span></pre><pre style="margin-right:0in;margin-bottom:11.25pt;margin-left:0in;line-height:14.25pt;background:rgb(248,248,248) none repeat scroll 0% 0%"><span style="color:rgb(43,46,47)">1) Do you agree that the above mentioned command line would produce the constant parameters mentioned above?<br></span></pre><pre style="margin-right:0in;margin-bottom:11.25pt;margin-left:0in;line-height:14.25pt;background:rgb(248,248,248) none repeat scroll 0% 0%"><span style="color:rgb(43,46,47)">2) It appears as though all command line options are executed using the av_dict_set or av_opt_set API functions. Is there a document that states how to set the equivalent command line options using the API?<br></span></pre><pre style="margin-right:0in;margin-bottom:11.25pt;margin-left:0in;line-height:14.25pt;background:rgb(248,248,248) none repeat scroll 0% 0%"><span style="color:rgb(43,46,47)">Thank you, <br><br>Al Rosner<br></span></pre></div>