Created
June 10, 2023 11:45
-
-
Save yogithesymbian/224e6936037bacd6d1101c78b59b8da3 to your computer and use it in GitHub Desktop.
using ffmpeg command on bashscript to short a command for compression video .mov to .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
1. create file custom | |
``` | |
touch ~/.custom_bash_commands.sh | |
``` | |
2. Open this up in your preferred text editor, and add the following code: | |
``` | |
#!/bin/bash | |
# greet the user | |
function yoVideo() { | |
ffmpeg -i $1.mov -c:v libx264 -preset medium -crf 23 -c:a aac -b:a 128k -movflags +faststart $1.mp4 | |
} | |
``` | |
3. Once you have saved that file, we need to test if it works. To make this command available, enter the following: | |
``` | |
$ source ~/.custom_bash_commands.sh | |
``` | |
4. done , try it by `yoVideo videoName` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
yoVideo videoName