[FFmpeg-user] independent codec settings

Gyan Doshi ffmpeg at gyani.pro
Mon Apr 26 21:38:04 EEST 2021



On 2021-04-26 22:20, Alexander Solonsky via ffmpeg-user wrote:
> Dear peers,
>
> I use this command to create 2 streams out of 1 with different gop sizes:
>
> ffmpeg -i $1 -map 0:v:0 -c:v:0 libx264 -x264-params 
> "keyint=24:keyint_min=24:bframes=1" -map 0:v:0 -c:v:1 libx264 
> -x264-params "keyint=72:keyint_min=72:bframes=3" $2 -y
>
> but the output video streams have only the latest gop structure. 
> Nicolas George from the ffmpeg-devel mail list told me that I need to 
> use a stream specifier to achieve the desired result. Can you please 
> help me to add the stream specifiers to the script above and achieve 
> different gop sizes for different streams?

-x264-params :v:0 "keyint=24:keyint_min=24:bframes=1"  and
-x264-params:v:1 "keyint=72:keyint_min=72:bframes=3"

Regards,
Gyan


More information about the ffmpeg-user mailing list