# screen-recording-to-vertical-short: commands.log (2026-11-21, ffmpeg 6.1.1) test files: screen.mp4 (editor mock, 1920x1080, 30 fps, 8 s, tone) and cam.mp4 (drawn figure, 1280x720, 30 fps, 8 s, no audio) 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=8.000000 size=102682 codec_name=h264 width=1280 height=720 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=30/1 duration=8.000000 size=14443 ## 1. screen on top (60% of the frame), webcam below (40%) published: ffmpeg -i screen.mp4 -i cam.mp4 -filter_complex "[0:v]crop=ih*15/16:ih,scale=1080:1152[s];[1:v]crop=ih*45/32:ih,scale=1080:768[c];[s][c]vstack" -map 0:a? -c:a copy -shortest stacked.mp4 exit=0 time=10.24s 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=8.000000 size=103941 edge: webcam clip is shorter (5 s) and 25 fps published: ffmpeg -i screen.mp4 -i cam-short-25fps.mp4 -filter_complex "[0:v]crop=ih*15/16:ih,scale=1080:1152[s];[1:v]crop=ih*45/32:ih,scale=1080:768[c];[s][c]vstack" -map 0:a? -c:a copy -shortest edge-stacked.mp4 exit=0 time=15.97s codec_name=h264 width=1080 height=1920 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=25/1 codec_name=aac sample_rate=44100 channels=1 r_frame_rate=0/0 duration=8.000000 size=100909 ## 2. screen only, webcam as a small picture in the corner published: ffmpeg -i screen.mp4 -i cam.mp4 -filter_complex "[0:v]crop=ih*9/16:ih,scale=1080:1920[s];[1:v]crop=ih:ih,scale=300:300[c];[s][c]overlay=588:948" -map 0:a? -c:a copy -shortest corner.mp4 exit=0 time=5.794s 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=8.000000 size=104109 edge: shorter 25 fps webcam clip published: ffmpeg -i screen.mp4 -i cam-short-25fps.mp4 -filter_complex "[0:v]crop=ih*9/16:ih,scale=1080:1920[s];[1:v]crop=ih:ih,scale=300:300[c];[s][c]overlay=588:948" -map 0:a? -c:a copy -shortest edge-corner.mp4 exit=0 time=5.376s 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=8.000000 size=104190 ## arithmetic stack: screen window 1012.5x1080 px = 52.7% of a 1920 px wide screen, scaled x1.067: 16 px text -> 17.1 px full-height 9:16 crop: 607.5 px = 31.6% of the width, scaled x1.778: 16 px text -> 28.4 px webcam strip 1080x768 = 40% of the frame; it starts at row 1152 and the bottom margin of the combined safe box starts at row 1248, so rows 1248..1920 of the webcam (87.5% of the strip) sit under app interface corner picture 300x300 at x=588..888, y=948..1248: inside the combined safe box (x 120..888, y 288..1248) stack, screen on top: screen rows 0..1152, clear of app interface rows 288..1152 = 75.0% of the screen strip stack, webcam on top instead: webcam rows 0..768 (clear 288..768 = 62.5%), screen rows 768..1920 (clear 768..1248 = 41.7%)