Last active
May 6, 2021 00:16
-
-
Save Wikinaut/fa5145684e6943a4fd7eecc5ac271957 to your computer and use it in GitHub Desktop.
Create a video for Twitter from an audio and a dummy image file - transcode audio into a video for twitter
This file contains hidden or 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 | |
if [[ $# -ne 2 ]]; then | |
echo "audio2video: create a video for Twitter from audio and a dummy image." | |
echo "Usage:" | |
echo "audio2video audio.mp3 dummyimage.png" | |
echo | |
echo "Remark: width and height need to be divisible by 2." | |
exit | |
fi | |
ffmpeg -loop 1 -i "$2" -i "$1" -filter_complex "loop=-1:1:0" -c:v libx264 -x264-params keyint=1 -shortest -pix_fmt yuv420p -c:a aac ${1%.*}.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment