Last active
June 30, 2023 06:33
-
-
Save lewangdev/4949643f82573431478f2c5a2ae753d0 to your computer and use it in GitHub Desktop.
Revisions
-
lewangdev revised this gist
Jun 30, 2023 . 1 changed file with 14 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,15 @@ #!/bin/bash if [ -z "$1" ] then echo "Please provide the directory as an argument." exit 1 fi for file in "$1"/*.mkv do echo "Processing $file" filename=$(basename -- "$file") filename="${filename%.*}" ffmpeg -i "$file" -c:v libx264 -crf 23 -c:a aac "$1/$filename.mp4" done -
lewangdev created this gist
Jun 30, 2023 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ for i in *.mkv; do ffmpeg -i "$i" -c:v libx264 -crf 23 -c:a aac "${i%.*}.mp4" done