# long-youtube-video-to-batch-pack: commands.log (2026-11-21, ffmpeg 6.1.1) test file: long.mp4 (test pattern with a burned clock, 1920x1080, 120 s, tone) codec_name=h264 width=1920 height=1080 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=30/1 codec_name=aac sample_rate=44100 channels=1 r_frame_rate=0/0 duration=120.000000 size=58369709 cuts.csv: hook,00:00:05,00:00:20 main-point,00:00:40,00:01:05 ending,00:01:50,00:02:30 ## 1. one clip per row of cuts.csv, cropped to 9:16 published: while IFS=, read -r name start end; do ffmpeg -nostdin -ss "$start" -to "$end" -i long.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" -c:v libx264 -crf 20 -c:a aac "$name.mp4"; done < cuts.csv exit=0 time=38.98s hook: codec_name=h264 width=1080 height=1920 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=30/1 codec_name=aac sample_rate=44100 channels=1 r_frame_rate=0/0 duration=15.000000 size=6185573 main-point: codec_name=h264 width=1080 height=1920 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=30/1 codec_name=aac sample_rate=44100 channels=1 r_frame_rate=0/0 duration=25.000000 size=10357762 ending: codec_name=h264 width=1080 height=1920 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=30/1 codec_name=aac sample_rate=44100 channels=1 r_frame_rate=0/0 duration=10.000000 size=4200652 note: the third row asks for 00:01:50 to 00:02:30 but the file ends at 00:02:00, so that clip is 10 s edge: the same loop WITHOUT -nostdin (not published) files written without -nostdin: hook.mp4 edge: a row whose name has a space published: while IFS=, read -r name start end; do ffmpeg -nostdin -ss "$start" -to "$end" -i long.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" -c:v libx264 -crf 20 -c:a aac "$name.mp4"; done < cuts.csv exit=0 time=5.300s two words.mp4 ## 2. the same clips as square files for a feed post published: while IFS=, read -r name start end; do ffmpeg -nostdin -ss "$start" -to "$end" -i long.mp4 -vf "crop=ih:ih,scale=1080:1080" -c:v libx264 -crf 20 -c:a aac "$name-square.mp4"; done < cuts.csv exit=0 time=28.66s hook-square: codec_name=h264 width=1080 height=1080 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=30/1 codec_name=aac sample_rate=44100 channels=1 r_frame_rate=0/0 duration=15.000000 size=8672037 main-point-square: codec_name=h264 width=1080 height=1080 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=30/1 codec_name=aac sample_rate=44100 channels=1 r_frame_rate=0/0 duration=25.000000 size=14454753 ending-square: codec_name=h264 width=1080 height=1080 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=30/1 codec_name=aac sample_rate=44100 channels=1 r_frame_rate=0/0 duration=10.000000 size=5824657 edge: an empty last line in cuts.csv published: while IFS=, read -r name start end; do ffmpeg -nostdin -ss "$start" -to "$end" -i long.mp4 -vf "crop=ih:ih,scale=1080:1080" -c:v libx264 -crf 20 -c:a aac "$name-square.mp4"; done < cuts.csv exit=8 time=.2554s files after the empty-line run: 0 file named -square.mp4