Skip to main content

ffmpeg , separating the audio from a video


If you ever wanted to grab the audio from any kind of video file, ffmpeg seems to be easiest way.  

If you aren't familiar with ffmpeg, it is a free software project that produces libraries and programs for handling multimedia data - on just about every operating system you can think of.  Amazingly powerful Swiss Army knife - this is just one of many things it can do.

Below are some examples of extracting audio out of a video file.  (ffmpeg runs from the command line)

In this example 

  • i indicates the input
  • ab indicates the bit rate (in this example 160kb/sec)
  • vn means no video ouput
  • ac 2 means 2 channels
  • ar 44100 indicates the sampling frequency. 
  • "video.m4v" is the full path to the video file 
  • audio.mp3 is the audio file that gets created as an output


ffmpeg -i "video.m4v" -ab 160k -ac 2 -ar 44100 -vn audio.mp3
In this example the -vn switch extracts the audio portion from a video and we are using the -ab switch to save the audio as a 256kbps MP3 audio file.

 ffmpeg -i "video.mp4" -vn -ab 256 audio.mp3

After you have the audio file I recommend using Audacity to manipulate it if needed.




Comments

Popular posts from this blog

Dancratic method in a nutshell

With the help of good friends, I've developed an approach to conversation over the last couple of decades.  In this blog I'm trying to forge that approach into a system that I'm calling the Dancratic method. PREMISE : Everything should be able to be questioned.  If it doesn't hold up to scrutiny it should be considered theoretical at best. i.e. You should be able to question 2+2= 5 and adhere to the rules below. Even the most volatile topics can be discussed with civility if  followed properly.   Dancratic method is a specific application of Socratic method.  Instead of a group discussion lead by a teacher or leader, these rules can facilitate 1 on 1 conversation for productive truth seeking.  There is no persuasive element to Dancratic rules.   GOAL : The goal is learning something new.  Perhaps understanding a different perspective a little more.  There is no winning, and no losing unless you break a rule- then everyone loses.   5 RULES : Be kind No name calling of an

Salsa!

Here is THE salsa recipe 1 tomato (medium to large).  cut out stem area. 1 slice of red onion - 1/8" thick 3" circumference  1/2 green onion sliced long way with stem 1/2 lime juice squeezed fresh but not too hard 1/2 Serrano pepper - no seeds 1 Jalapeno - no seeds 1 small clump of cilantro - cut bottom of stems 2 garlic cloves Step 1. Put all in the ninja. Step 2. Add fresh cracked sea salt & pepper to taste Step 3. Yummmmm  :)

Top 10 Financial mistakes

In my experience, if you want an easier life, don't do any of the things below!  This is a list I compiled of financial mistakes people make all the time that can usually be avoided.   Putting off saving for the future Especially Roth IRA or matched 401 K! Employer paid benefits are the best free money Time value of money - rule of 72 Not building an emergency fund Accumulating debt  when not absolutely necessary For credit card debt always pay in full monthly “It is the debtor that is ruined by hard times.”   Times have changed as far as Americans attitude toward mortgages.  Do the math on the tax savings of a mortgage and see what it really means. Proverbs 22:7 "The borrower is servant to the lender" Not investing You want your money to work for you. Making bad investments AKA - educate yourself before buying Examples time shares certain insurance products like annuities. Do NOT trust that someone else can handle your finances better th