2
rated 0 times
[
2]
[
0]
/ answers: 1 / hits: 2480
/ 3 Years ago, fri, august 6, 2021, 5:00:04
I have written a little bash script to extract audio from video files in batch mode.
Sound is extracted from each mp4 file to flac format using avconv (and the flac codec).
#!/bin/sh
#
# Batch conversion of audio extraction from video
FOLDER_SRC="/home/Me/Music/TestBatchConv"
for myvid in $(find ${FOLDER_SRC} | grep mp4)
do
avconv -i $myvid -acodec flac "${myvid}.flac"
done
exit 0
It works fine, but I would like to improve it.
The script only detects mp4 format. Is it possible to recognize a video file with a command (instead of testing each video format) ?
Thank you for advices.
More From » bash