-
-
Save Bioblaze/b43d8b86a543fffb95b7e0642d4cddf6 to your computer and use it in GitHub Desktop.
画像と音声からMP4動画を作る
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/sh | |
### 画像と音声からMP4動画を作る | |
# なんでかわからんけどこれで順番に引数が入る | |
image=$1 | |
shift | |
audio=$* | |
# shift | |
# dai_3_no_hikisuu=$* | |
if [ -z "$audio" ]; then | |
echo 'Usage: imageaudio2mp4 image.jpg audio.m4a' | |
exit 1 | |
fi | |
ffmpeg \ | |
-loop 1 \ | |
-r 30000/1001 \ | |
-i "$image" \ | |
-i "$audio" \ | |
-c:v libx264 \ | |
-c:a copy \ | |
-pix_fmt yuv420p \ | |
-shortest \ | |
"$audio.mp4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment