FFmpeg tips - I'm Siegfried. A developer. Yep.
Here are a few commands for FFmpeg that were useful for me.
The help page for all parameters is here.
A nice tool that uses FFmpeg is Handbrake.
Get some info about a file
ffmpeg -i video.mp4
Parameters:
ffmpeg
is the ffmpeg command :p-i video.mp4
specifies the input file
Extract the audio part of a video
ffmpeg -i video.mp4 -vn -acodec copy audio.m4a
Parameters:
-vn
disables the video-acodec copy
allows to copy the audio stream without touching itaudio.m4a
is the output file
Convert an audio file to another format
ffmpeg -i audio.m4a -acodec libmp3lame -ac 0 -ab 320k audio.mp3
Parameters:
-acodec libmp3lame
allows to use the lame mp3 library for conversion-ac 2
sets the number of channels-ab 320k
sets the bitrate
Of course, the previous command and this one can be merged for a 1 step audio extraction & conversion.
Read full article from FFmpeg tips - I'm Siegfried. A developer. Yep.
No comments:
Post a Comment