Last active
February 5, 2021 16:27
-
-
Save vladdancer/3c1f687e2a2852f71276d14546fadeb3 to your computer and use it in GitHub Desktop.
FFmpeg converting m4a, wav files to mp3 examples.
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
ffmpeg -i in.m4a -codec:a libmp3lame -qscale:a 2 out.mp3 | |
ffmpeg -i in.wav -codec:a libmp3lame -qscale:a 2 out.mp3 | |
ffmpeg -i in.m4v -vcodec copy -acodec copy out.mp4 | |
# Dealing in bulk mode, origin: https://stackoverflow.com/a/33766147/552540 | |
for i in *.wav; do ffmpeg -i "$i" -codec:a libmp3lame -qscale:a 2 "${i%.*}.mp3"; done |
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
# show media file info | |
ffmpeg -i in.mp4 | |
# find video track ID and set as -map param value | |
ffmpeg -i in.mp4 -map 0:0 -vcodec copy out-wo-audio.mp4 |
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
# speed factor -> +50% | |
ffmpeg -i in.mp4 -vf "setpts=(PTS-STARTPTS)/1.5" -crf 18 out.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment