Bash scripting 6 – Strip sound from video

I have further improved the script from the previous post, the text that is appended to the filename is now set via a variable.

echo strip sound content from video
echo
append=nosnd # set text to append to file

for file in *.MP4 # apply to all files ending with MP4
do
    filename="${file%.*}"
    ffmpeg -i $file -c copy -an ${filename}$append.MP4
done

As a further enhancement,

ffmpeg -i $file -c copy -an ${filename}_$append.MP4

Will put an underscore before the appended text.

Tags

#Bash,#Bashscripting,#BatchProcessing,


MastodonPeertubeJoin Mastodon

AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay