Convert YouTube FLV files in Linux

By | December 16, 2008

If you downloaded a Flash FLV file and want to convert it to an audio or video file, do the following:

For audio:

ffmpeg -i input.flv -ar 44100 -ab 160 -ac 2 output.mp3

For video:

ffmpeg -i input.flv -s 352×288 -b 512 -ab 128 output.mpg 

10 thoughts on “Convert YouTube FLV files in Linux

  1. Pingback: Convert YouTube FLV files in Linux | Linux-Trickz

  2. flv to mp3

    thanks for this smart flv converter,i am looking for a flv to mp3 converter for quite some time. is this suitable for mac?

    Reply
  3. Craig B.

    Simple and fantastic solution. Really, great job. Ever since my Vista basically stopped connecting to the Internet, I’ve switched to Fedora. FLV conversion was one of the functions I could perform on Vista with a program but had no idea how to do on Linux. With this, you’ve definitely helped make my switch to Linux a permanent one!

    Reply
  4. Craig S

    I am new to linux (fedora). What do you mean

    For audio:

    ffmpeg -i input.flv -ar 44100 -ab 160 -ac 2 output.mp3

    For video:

    ffmpeg -i input.flv -s 352×288 -b 512 -ab 128 output.mpg

    What are the exact steps? where do these commands go, etc?

    Reply
  5. cool as ice

    Hi Craig S

    suppose you have a file named party.flv
    but you only want the music not de video so you can extract the
    audio to have a file named party,mp3
    then open a terminal, go to the directory where de file party.flv is…and write in a new command line

    ffmpeg -i party.flv -ar 44100 -ab 160 -ac 2 party.mp3

    -i means the input file
    -ab is the encoding bitrate

    for more information you can type in a new command line
    man ffmpeg > ffmpegmanual

    then you will have a text file with the manual for ffmpeg
    named ffmpegmanual

    if you have an error may be you have to install ffmpeg
    I think that in fedora you have to writte
    su yum ffmpeg

    go to
    http://www.ilovetux.com/2008/05/howto-install-ffmpeg-on-fedora-linux.html

    Reply
  6. Nerdiah

    I found that the bit-rate was too low. I got it to work when I used:
    ffmpeg -i input.flv -ar 44100 -ab 160000 -ac 2 output.mp3

    Reply
  7. Luciano

    A simple script I wrote and use often. This outputs only the mp3 and deletes the .flv, but that can be easily changed….

    #!/bin/bash
    clear
    echo
    echo “~~~~~~~~YouTube to MP3~~~~~~~~”
    echo
    echo “Contents of /tmp:”
    echo
    cd /tmp && ls
    echo
    printf “Select a File to convert: ” && read FILE
    clear
    mv $FILE file.flv
    clear
    printf “Enter a name for the mp3: ” && read MP3
    ffmpeg -i file.flv -ac 2 -ar 44100 -ab 320 $MP3 && rm file.flv
    mv $MP3 $FILE
    echo
    echo “Finished”
    echo
    echo “Exiting”
    sleep 5
    exit 0

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *