Last active
September 19, 2021 21:45
-
-
Save BSoDium/ec9979cc7319d40f5a04120dc975e6bc to your computer and use it in GitHub Desktop.
A simple nextcloud flow script to convert ac3 audio codec to acc in .mkv files
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
# When [ File created ] and [ File name ] matches [ /[[:ascii:]]+\.mkv/i ] run following script (tested on nc 21.0.1) | |
ffmpeg -i /var/www/nextcloud/data/%n -vcodec copy -acodec aac -strict -2 -ab 320K /var/www/nextcloud/data/$(dirname %n)/$(basename %n .mkv)_temp.mkv; | |
rm /var/www/nextcloud/data/%n; | |
mv /var/www/nextcloud/data/$(dirname %n)/$(basename %n .mkv)_temp.mkv /var/www/nextcloud/data/%n; | |
/var/www/nextcloud/occ files:scan --path="$(dirname %n)"; | |
chown www-data:www-data /var/www/nextcloud/data/%n; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment