1

I used this command to merge two video clips, but the quality of output is too low. I have not used ffmpeg before I read about parameter -crf 27 and -preset veryfast to improve the quality but dont know how to use them with this command. Any help would be appreciated.

'-y -i ${_storedVideoOne.path} -i
 ${_storedVideoTwo.path} -r 24000/1001 -filter_complex
 \'[0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[out]\' -map \'[out]\'
 $outputPath';
Nibha Jain
  • 7,742
  • 11
  • 47
  • 71
  • You may start by reading [H.264 Video Encoding Guide](https://trac.ffmpeg.org/wiki/Encode/H.264) (and [H.265](https://trac.ffmpeg.org/wiki/Encode/H.265)). Add the codec parameters after `-map \'[out]\'`. For example, you may add: `-vcodec libx264 -crf 17 -pix_fmt yuv444p`. In some cases it is possible to concatenate video files without re-encodding and preserve the original quality. Check [this post](https://stackoverflow.com/questions/7333232/how-to-concatenate-two-mp4-files-using-ffmpeg). – Rotem Feb 18 '22 at 11:27
  • tried to add but ended up with query failed after returning 19 values (BAD_INDEX) – Nibha Jain Feb 18 '22 at 12:43
  • Test it with FFmpeg CLI first. I don't know the flutter syntax. – Rotem Feb 18 '22 at 13:42

0 Answers0