Looking for a Linux application that extracts audio from video

Discussion in 'all things UNIX' started by lotuseclat79, Apr 27, 2013.

Thread Status:
Not open for further replies.
  1. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    Is there a Linux application that can extract an audio track from e.g. a Youtube video?

    I understand there is a Windows application that can do that named freez_flv2mp3.exe which can take a .flv video and extract the mp3 audio track, but when I tried to run it under wine 1.4 on Ubuntu 12.04.2 Ubuntu - it did not work.

    -- Tom
     
  2. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,381
    Location:
    West Yorkshire, UK
  3. vasa1

    vasa1 Registered Member

    Joined:
    May 1, 2010
    Posts:
    4,417
    These commands, run from the relevant folder, works for me in Lubuntu 13.04 and worked as well in Lubuntu 12.10. I have installed restricted extras:

    To extract audio from an entire video:
    Code:
    ffmpeg -i input_file -vn -acodec output_file.ogg
    To extract audio corresponding to a specific interval in a video:
    Code:
    ffmpeg -i input_video.mp4 -ss 01:23:54 -t 00:10:26 -vn -acodec libvorbis output_audio.ogg
    This will extract 10 min and 26 seconds of audio starting from 1 hour, 23 min and 54 sec from the start of the video.
     
  4. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    Thanks!

    -- Tom
     
  5. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    WinFF does that plus plus.

    winff.gif
     
  6. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    I did manage to extract the audio tracks, but only to mp2, so now since Brasero is total trash as an application (so many bugs probably regressions in Ubuntu 12.04.2 LTS), I find it is necessary to convert all the files to .wav files in order for K3b to work in Kubuntu 12.04.2 LTS. The problem with Brasero is that it categorizes Blank CD-R and CD-RW discs as having 2kB capacity, while K3b looks like it will create an audio CD without any problems as long as the files have been converted to .wav.

    Thus far have located mpg321, but having a little bit of difficulty compiling it. I should be able to resolve it soon, but am taking 1 week break to visit relatives and friends and for my mums birthday.

    Thanks for the info Ocky, but unless WINFF works under Wine on Ubuntu I can't use it as I do not have a working Windows platform - and I refuse to resurrect my WinXP Pro SP2 on principle by doing a parallel re-install. It's been toast since June 2006, and I see no reason to bring it back to life. A matter of letting sleeping/dead dogs lie.

    -- Tom
     
  7. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    Tom, it is available for most Linux OS's and is included in the repos of most distros.
    http://winff.org/html_new/downloads.html :)
     
  8. cet

    cet Registered Member

    Joined:
    Sep 3, 2006
    Posts:
    876
    Location:
    Turkey/İzmir
    I am using a firefox add-on called ''mp3 it'' .It is version 1.4
    While watching the video I click on mp3 it and I download the converted file.
     
  9. malexous

    malexous Registered Member

    Joined:
    Jun 18, 2010
    Posts:
    830
    Location:
    Ireland
    I use the command-line program youtube-dl (it works for some other sites too) for downloading a video and occasionally converting the video to just audio. Converting "requires ffmpeg or avconv and ffprobe or avprobe".
     
  10. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    The command avconv worked well:

    Code:
        avconv -vn -i inputfile -map 0:1 outputfile.wav
    
    I wrote a script to convert some 13 flv files and another 2 mp3 files to wav.

    You can also use it to reference different audio streams (0:1, 0:2, 0:3, 0:4) to extract audio only tracks, i.e. the -vn turns off video extraction.

    Now, onto Kubuntu 12.04.2 LTS to burn the wav audio files to a CD-R with K3b.

    Thanks for all the help!

    -- Tom
     
  11. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    K3b burped on my CD drive, but was successful at burning 15 tracks onto a CD-R with my CD/DVD drive.

    -- Tom
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.