💾 Archived View for darknesscode.xyz › notes › ffmpeg-examples.gmi captured on 2024-05-10 at 10:57:07. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-12-28)

-=-=-=-=-=-=-

ffmpeg Examples

Extract audio from a video

ffmpeg -i video.mp4 -b:a 128k -filter:a "volume=1dB" -codec:a libmp3lame audio.mp3

- -b:a (vibrated)

- -filter:a "volume=1dB" (increase volume)

- -codec:a libmp3lame (mp3 codec)

For scripts

mkv to mp3

for f in *.mkv; do 
    ffmpeg -i "$f" -b:a 128k -filter:a "volume=1dB" -codec:a libmp3lame -map 0:1 "${f%mkv}mp3" 
done

mp4 to mp3

for f in *.mp4; do 
    ffmpeg -i "$f" -b:a 128k -filter:a "volume=1dB" -codec:a libmp3lame -map 0:1 "${f%mp4}mp3" 
done

----------

Home

Linux

Notes

MicroLog

----------

© DarknessCode