Jeremy's Wiki

everything but the kitchen sink

User Tools

Site Tools


Some useful ffmpeg scripts

replace audio of video file

ffmpeg -i v.mp4 -i a.wav -c:v copy -map 0:v:0 -map 1:a:0 new.mp4

file → 4.8khz

ffmpeg -i %1 -ar 48000 -vcodec copy "%~dpn1_encoded%~x1"

video → aac

ffmpeg -i "%~1" -vn -c:a copy "%~1.m4a"

# OR easier to remember:

ffmpeg -i "%~1" -acodec copy "%~1.aac"

wav → mp3

::for mono: -ac 1
::for stereo: -ac 2
ffmpeg -i %1 -vn -ar 44100 -ac 1 -b:a 192k %1.mp3

mkv → mp4

ffmpeg -i "%~1" -acodec copy -vcodec copy "%~1.mkv.mp4"
useful_ffmpeg_scripts.txt · Last modified: 2023/09/04 11:58 by superuser

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki