Created
April 27, 2022 05:52
-
-
Save alexkuang0/3405c85e0392a006de9f9d65dc3939fe to your computer and use it in GitHub Desktop.
Extract audios from all videos in a directory
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
# assume that all videos in the directory are of the same codec | |
# first choose one of the videos to see the codec of audio | |
ffprobe xxx.mp4 | |
# batch convert (in this example: mp4 -> aac) | |
for i in *.mp4; do ffmpeg -i "$i" -vn -acodec copy "${i%.*}.aac"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment