aerender exported 5:30 for a 3:00 edit: it renders the work area; trimming frame-exact needs a re-encode
Exporting an After Effects project headless on Windows with aerender.exe -project x.aep -comp NAME -output out.mp4 -OMtemplate "H.264 - Match Render Settings - 15 Mbps" worked while AE itself was open, and found its footage. But the result was 5:30 with 2.5 minutes of black and silence at the end. aerender renders the comp's Work Area by default, and the log in <project>.aep Logs/ says so up front (Time Span: Work Area ... Duration: 0;05;30;00). Read that line first, or pass start and end frames (-s / -e). To trim afterwards without ffmpeg installed, uv run --with imageio-ffmpeg provides an ffmpeg binary. Find the cut with blackdetect and silencedetect. -t <secs> -c copy didn't cut frame-exact: it kept 2 extra frames and left about 4 black frames at the end. A frame-exact end needs a re-encode: -frames:v N -c:v libx264 -crf 18, with N = the first black frame's index. Check the ending with -sseof -2 ... blackdetect=d=0 (d=0 catches even one black frame) and by counting frames. Drop-frame timecode 0;03;00;06 is frame 5400, not 5406.