Black/Empty frames at beginning of video file when file Cut using FFmpeg
0
I am cutting a video using ffmpeg and facing the Black/Empty frame at the start issue.
When Codec Copy –
-y -hide_banner -ss 0:1:0 -i file:///private/var/mobile/Containers/Data/PluginKitPlugin/94588A94-C451-426E-9E9C-A7555B6E7C25/tmp/trim.EC876F92-04BE-41F8-ADF3-8CFC84669908.MOV -to 0:1:33 -t 0:0:33 -vcodec copy -acodec copy -avoid_negative_ts make_zero -async 1 file:///var/mobile/Containers/Data/Application/728D5FED-5E6B-4A37-8DE4-E63E47B06DF9/Documents/FILES/FileCopy.mov
When Re-Encoding –
-y -hide_banner -ss 0:1:0 -i file:///private/var/mobile/Containers/Data/PluginKitPlugin/94588A94-C451-426E-9E9C-A7555B6E7C25/tmp/trim.9F2B209B-B657-471A-AE87-7C464FF10812.MOV -to 0:1:33 -t 0:0:33 -vcodec libx264 -vf scale=1280:720 -pix_fmt yuv420p10le -color_range tv -colorspace bt2020nc -color_primaries bt2020 -color_trc arib-std-b67 -crf 28 -preset ultrafast -acodec copy -avoid_negative_ts make_zero -async 1 file:///var/mobile/Containers/Data/Application/728D5FED-5E6B-4A37-8DE4-E63E47B06DF9/Documents/FILES/FileReEncode.mov
Both commands address almost the same issue. Provided a sample gif file below to show the scenario.
Read more here: Source link