Linux: Extract audio and video using ffmpeg

Today I had some mp4 video files and I wanted to extract the audio and video into separate files. So to do that you can do the following:

  • Extract audio from video file and convert it to mp3

    To accomplish that, execute the command:

    ffmpeg -i logothetis-bureaucracy.mp4  -ab 128k -ac 2 -ar 44100 -vn logothetis-bureaucracy.mp3
    
  • Extract only the video segment from a video

    To accomplish that, execute the command:

    ffmpeg -i video.wmv -vcodec copy -an onlyvideo.wmv 
    
Advertisements

About cmanios

programming
This entry was posted in Linux, Uncategorized and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s