# talking-head-to-vertical-short: commands.log (2026-11-21, ffmpeg 6.1.1) test file: head.mp4 (drawn figure: head-and-shoulders block centred at x=1250 of 1920, 6 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=6.000000 size=74131 ## 1. centre crop (figure is off centre, so it is cut) published: ffmpeg -i head.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" -c:a copy head-center.mp4 exit=0 time=7.490s 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=6.000000 size=74114 ## 2. crop placed on the figure: x = figure centre - 304 = 946 published: ffmpeg -i head.mp4 -vf "crop=ih*9/16:ih:946:0,scale=1080:1920" -c:a copy head-placed.mp4 exit=0 time=7.281s 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=6.000000 size=74383 edge: figure centred at x=1800, so x would be 1496, past the last valid value 1312 published: ffmpeg -i head-edge.mp4 -vf "crop=ih*9/16:ih:1496:0,scale=1080:1920" -c:a copy edge-placed.mp4 exit=0 time=9.623s codec_name=h264 width=1080 height=1920 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=30/1 duration=4.000000 size=12703 is the x=1496 output the same picture as an x=1312 crop? PSNR of the two first frames (inf = identical): average:48.681870 control, x=1000 against x=1312 (must differ): average:16.577986 edge: 1280x720 source, figure centred at x=800: x = 800 - 202 = 598 (the window is 405 px wide at this size) published: ffmpeg -i head-720.mp4 -vf "crop=ih*9/16:ih:598:0,scale=1080:1920" -c:a copy edge-720.mp4 exit=0 time=4.798s codec_name=h264 width=1080 height=1920 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=30/1 duration=4.000000 size=12658 ## arithmetic window width: 1080p 607.5 px (ffmpeg uses 608, half = 304); 720p 405 px (ffmpeg uses 404, half = 202); 4K 1215 px (half = 607) figure centre 1250: x = 946; valid range 0..1312; used 946; figure sits at 50% of the cropped width figure centre 960: x = 656; valid range 0..1312; used 656; figure sits at 50% of the cropped width figure centre 1800: x = 1496; valid range 0..1312; used 1312; figure sits at 80% of the cropped width figure centre 200: x = -104; valid range 0..1312; used 0; figure sits at 33% of the cropped width eye line: top third of a 1920 px frame is row 640; our figure's head spans 22% to 39% of the height = rows 422 to 742 after scaling