Difference between revisions of "Audio Video"

From Leaky
Jump to: navigation, search
(Created page)
 
(No difference)

Latest revision as of 18:27, 6 June 2014

Extracting the audio from a video

ffmpeg -i videofile.mp4 -vn -acodec copy audiotrack.m4a

ffmpeg: The command.

-i videofile.mp4: The source video file.

-vn: Do not record (do not consider) video data.

-acodec copy: Copy the audio source as-is, here's where all the magic is. ffmpeg will write the audio data out as various supported codecs, but specifying copy leads a bit-for-bit exact copy of the stream. Coupled with disabling video via -vn leaves you with a lone audio track inside an mp4 container.

audiotrack.m4a: The output filename.