ffmpeg \ -framerate 90 -i vmd/final.molecule.%05d.tga \ -framerate 90 -i plot/frame%05d.png \ -c:v libx264 \ -preset slow \ -crf 18 \ -filter_complex "\ [1:v] scale=in_w*0.8:in_h*0.8 [sclvrl] ;\ [0:v][sclvrl] overlay=eval='init':x=W-w-5:y=5 [overout] ;\ [overout] scale=trunc(in_w/2)*2:trunc(in_h/2)*2" \ movie.overlay.mkv # syntax for ffmpeg "filters" is # [in_stream_name] command=parameter1=value1:parameter2=value2 [out_stream_name] ; # # The above takes video stream 1 [1:v] and scales it by 0.8 # It then overlays the output of that [sclvr1] onto the vmd movie [0:v] # The final line rounds the whole video to have a width and height divisible # by 2, which is something needed by h264 (??). I think the default width for # vmd is an odd number.