Last active
July 20, 2019 16:52
-
-
Save leogdion/2e5f9b8311d6ecdc8c8202eadba0861d to your computer and use it in GitHub Desktop.
An example of turning podcast clip into a video clip for empowerapps.show
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
# Created by https://www.gitignore.io/api/macos | |
# Edit at https://www.gitignore.io/?templates=macos | |
### macOS ### | |
# General | |
.DS_Store | |
.AppleDouble | |
.LSOverride | |
# Icon must end with two \r | |
Icon | |
# Thumbnails | |
._* | |
# Files that might appear in the root of a volume | |
.DocumentRevisions-V100 | |
.fseventsd | |
.Spotlight-V100 | |
.TemporaryItems | |
.Trashes | |
.VolumeIcon.icns | |
.com.apple.timemachine.donotpresent | |
# Directories potentially created on remote AFP share | |
.AppleDB | |
.AppleDesktop | |
Network Trash Folder | |
Temporary Items | |
.apdisk | |
# End of https://www.gitignore.io/api/macos | |
.temp | |
empower* |
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
#!/bin/bash | |
for script in ./Empower*.sh; do "$script" & done | |
wait |
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
#!/bin/bash | |
FONT="/Users/leo/Library/Fonts/skyfonts-google/Cardo 700.ttf" | |
SHOW_NAME="empowerapps.show" | |
FCLIP_NAME=${CLIP_NAME//,} | |
LOGO_PATH=brightdigit.png | |
ANIMATED_LOGO_FORMAT=Logo-%d.png | |
mkdir -p .temp | |
yes | convert -gravity East -font "$FONT" -pointsize 48 label:"$SHOW_NAME" -pointsize 32 label:"episode $EPISODE_NO" -pointsize 52 label:"$EPISODE_NAME" -pointsize 42 label:"$GUEST_APPEND" -pointsize 56 label:"$CLIP_NAME" -append ".temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.text.16x9.png" | |
yes | convert -size 1920x1080 xc:white -gravity SouthEast -draw "image over 200,100, 0,0, '$LOGO_PATH'" -gravity NorthEast -draw "image over 200,100, 0,0, '.temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.text.16x9.png'" ".temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.background.16x9.png" | |
yes | ffmpeg -loop 1 -framerate 1 -i ".temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.background.16x9.png" -framerate 1 -f image2 -i $ANIMATED_LOGO_FORMAT -filter_complex "[1:v]scale=iw/2:ih/2 [ovrl],[0:v][ovrl] overlay=200:(H-h)/2:shortest=1,format=yuv420p" -vcodec libx264 -crf 25 -pix_fmt yuv420p -r 60 ".temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.loop.16x9.mp4" | |
ffmpeg -i "$AUDIO_FILE" -filter_complex movie=".temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.loop.16x9.mp4":loop=0,setpts=N/FRAME_RATE/TB -shortest "$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.16x9.mp4" | |
yes | convert -gravity East -font "$FONT" -pointsize 36 label:"$SHOW_NAME" -pointsize 28 label:"episode $EPISODE_NO" -pointsize 36 label:"$EPISODE_NAME" -pointsize 32 label:"$GUEST_APPEND" -pointsize 52 label:"$CLIP_NAME" -append ".temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.text.1x1.png" | |
yes | convert -size 1080x1080 xc:white -gravity SouthEast -draw "image over 100,100, 0,0, '$LOGO_PATH'" -gravity NorthEast -gravity NorthEast -draw "image over 100,100, 0,0, '.temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.text.1x1.png'" ".temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.background.1x1.png" | |
yes | ffmpeg -loop 1 -framerate 1 -i ".temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.background.1x1.png" -framerate 1 -f image2 -i $ANIMATED_LOGO_FORMAT -filter_complex "[1:v]scale=iw/3:ih/3 [ovrl],[0:v][ovrl] overlay=(W-w)/2:(H-h)/2+50:shortest=1,format=yuv420p" -vcodec libx264 -crf 25 -pix_fmt yuv420p -r 60 ".temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.loop.1x1.mp4" | |
ffmpeg -i "$AUDIO_FILE" -filter_complex movie=".temp/$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.loop.1x1.mp4":loop=0,setpts=N/FRAME_RATE/TB -shortest "$SHOW_NAME.$EPISODE_NO.$EPISODE_NAME.$FCLIP_NAME.1x1.mp4" | |
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
#!/bin/bash | |
EPISODE_NO=17 | |
EPISODE_NAME="Subcontracting" | |
GUEST_APPEND=" with Joe Cieplinski" | |
CLIP_NAME="Communication and Relationships" | |
AUDIO_FILE="Empower Apps 17 quote 1.mp3" | |
. ./podcast_video_clips.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fixed audio issue with twitter