Skip to content

Instantly share code, notes, and snippets.

@Swyter
Last active May 14, 2016 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Swyter/35baaa156671d8c780799d3c4b814df7 to your computer and use it in GitHub Desktop.
Save Swyter/35baaa156671d8c780799d3c4b814df7 to your computer and use it in GitHub Desktop.
split video into image frames with ffmpeg -> batch composite overlay with imagemagick -> merge composited frames back into a video with the same framerate in ffmpeg
ffmpeg -i Descargas/output.mp4 -to 0:00:03.086 mosca%03d.png
for i in {58..60}; do thing=`printf "%03d" $i`; composite mask.png mosca${thing}.png mosca${thing}_comp.png; done
ffmpeg -framerate 23.98 -i mosca%03d_comp.png mosca_comp.mp4
ffmpeg -r 23.98 -i final/%04d.png final_b.mp4
ffmpeg -i __tost.mp4 -ss 04:30 -c copy __tost_b.mp4
ffmpeg -i __tost.mp4 -t 04:24.2 -c copy a.ts
ffmpeg -i "concat:a.ts|b.ts" -c copy -bsf:a aac_adtstoasc reassembled.mkv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment