Created
November 25, 2016 18:49
-
-
Save markvdb/b23cb2f4cc2a158e15f65ad1e390a776 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/bash | |
PRES=Welcome_to_IoT_Devroom.webm | |
CAM=Wine_hacking_session.webm | |
TITLE="Test talk" | |
SUBTITLE="jjjjjj a talk to demonstrate the compositing setup" | |
SPEAKERS="Niels" | |
ffmpeg -framerate 1/5 -i artwork/preroll-%d.jpg \ | |
-loop 1 -i artwork/bg.jpg \ | |
-framerate 1/5 -i artwork/postroll-%d.jpg \ | |
-i "$PRES" \ | |
-i "$CAM" \ | |
-filter_complex ' | |
[0:0] setsar=1/1 [preroll]; | |
aevalsrc=0:d=1 [silence_pre]; | |
[2:0] setsar=1/1 [postroll]; | |
aevalsrc=0:d=1 [silence_post]; | |
[1:0] setsar=1/1 [bg]; | |
[3:0] scale=800:600 [pres]; | |
[4:0] scale=490:368, crop=368:368:61:0 [cam]; | |
[bg][pres] overlay=x=16:y=64:eof_action=endall [bg_p]; | |
[bg_p][cam] overlay=x=864:y=296 [bg_pc]; | |
[bg_pc] drawtext=expansion=none:fontcolor=#ffffff:fontfile=artwork/font/Light.otf:fontsize=16:x=0.5*lh:y=H-2.5*lh:textfile=artwork/copyright, | |
drawtext=expansion=none:fontcolor=#ffffff:fontfile=artwork/font/Black.otf:fontsize=20:x=16:y=8:text='"$TITLE"', | |
drawtext=expansion=none:fontcolor=#ffffff:fontfile=artwork/font/Light.otf:fontsize=16:x=16:y=28:text='"$SUBTITLE"', | |
drawtext=expansion=none:fontcolor=#ffffff:fontfile=artwork/font/Roman.otf:fontsize=16:x=16:y=44:text='"$SPEAKERS"' [mainv]; | |
[4:1] channelmap=map=FL|FL, compand=attacks=5|5:decays=10|10:volume=-20:points=-90/-90|-40/-20|0/-10:delay=5 [mic]; | |
[3:1] compand=attacks=.3|.3:decays=15|15:volume=-20:points=-90/-90|-40/-20|0/-10:delay=1 [compa]; | |
[compa][mic] amix=inputs=2 [maina]; | |
[preroll][silence_pre] [mainv][maina] [postroll][silence_post] concat=n=3:v=1:a=1 [outv][outa] | |
' -map '[outv]' -map '[outa]' \ | |
-r 50 -pix_fmt yuv420p \ | |
-vcodec libx264 -crf 22 -acodec aac -aq 80 -strict -2 test.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment