#!/bin/bash

ffmpeg -i BBB_720p_100fps.mp4 \
-c:v libx264 -preset veryslow -s 1920:1080 -r 50 -g 50 -b:v 40M -maxrate 40M -minrate 40M -bufsize 40K -x264-params "nal-hrd=cbr" -sc_threshold 0 \
-c:a copy \
-flush_packets 0 -f mpegts BBB_1080p_50fps_40Mbps.ts
