Check bitrates :
find . -type f -name *.mp4 | sort | while read line; do echo “‘$line'” ; done > file_list
OIFS=”$IFS” ; IFS=$’\n’ ; for file in $(find . -type f -name “*.mp4”) ; do echo “${file}” ; ffprobe -v quiet -show_entries “stream=codec_name,bit_rate” -i $file | egrep ‘codec|bit’ ; done
All files that have the same bitrate:
find . -type f -name *.mp4 | sort | while read line; do echo “file ‘$line'” ; done > vidlist
ffmpeg -f concat -safe 0 -i vidlist -c copy output.mp4
By Chapter :
cat vidlist | egrep –color=never ’03 – ‘ > 03
ffmpeg -f concat -safe 0 -i 03 -c copy 03.mp4
All Chapters :
for i in $(seq -f “%02g” 01 32); do cat vidlist | grep –color=never “$i – ” | tee -a $i ; done
for i in $(seq -f “%02g” 01 32) ; do ffmpeg -f concat -safe 0 -i $i -c copy $i”.mp4″ ; done