Ubuntu Geek

Ubuntu Linux Tips,Howtos&Tutorials|Edgy,Feisty,Gutsy,Hardy,Intrepid

  • RSS Feed

    subscribe to the ubuntu Geek RSS feed


  • Sponsor



  • Categories

  • Meta

  • Sponsor

  • Archives

  • Support Ubuntugeek

    Amount $:
    Website(Optional):


  • Favourite Sites

Convert .flv (Google Videos) to .mpg using ffmpeg

Posted by admin on July 16th, 2007 Email This Post Email This Post

FFmpeg is a complete solution to record, convert and stream audio and video. It includes libavcodec, the leading audio/video codec library. FFmpeg is developed under Linux, but it can compiled under most operating systems, including Windows. In ubuntu This package contains the ffplay multimedia player, the ffserver streaming server and the ffmpeg audio and video encoder. They support most existing file formats (AVI, MPEG, OGG, Matroska, ASF, …) and encoding formats (MPEG, DivX, MPEG4, AC3, DV, …).

ffmpeg Features

  • ffmpeg is a command line tool to convert one video file format to another. It also supports grabbing and encoding in real time from a TV card.
  • ffserver is an HTTP (RTSP is being developped) multimedia streaming server for live broadcasts. Time shifting of live broadcast is also supported.
  • ffplay is a simple media player based on SDL and on the FFmpeg libraries.
  • libavcodec is a library containing all the FFmpeg audio/video encoders and decoders. Most codecs were developped from scratch to ensure best performances and high code reusability.
  • libavformat is a library containing parsers and generators for all common audio/video formats.

Install ffmpeg Ubuntu

sudo apt-get install ffmpeg

convert .flv to .mpg using ffmpeg

First you need to download your .flv file to a folder and you need to Open a terminal window and go in to the .flv file folder and type the following command

ffmpeg -i jokes.flv -ab 56 -ar 22050 -b 500 -s 320×240 jokes.mpg

jokes.flv is the file you want to convert, so the name must be the same as the source file.You can name jokes.mpg whatever you want as long as it has the .mpg extension.

-b bitrate: set the video bitrate in kbit/s (default = 200 kb/s)

-ab bitrate: set the audio bitrate in kbit/s (default = 64)

-ar sample rate: set the audio samplerate in Hz (default = 44100 Hz)

-s size: set frame size. The format is WxH (default 160×128 )

Share/Save/Bookmark

If you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!

Related Articles

24 Responses to “Convert .flv (Google Videos) to .mpg using ffmpeg”

  1. Ben Says:

    Great!

    Thanks very much for your effort!

    Greetz ;-)

  2. Alephcat Says:

    if the video is available on the Google Video site you just need to click on the “Download” button, cancel the download of the Google video player then in the bit of the sidebar that has just expanded click on the “Manually download the video” link. Save the file then open it with a text editing program such as notepad or Gedit. Once open look for the section of text starting “url:http://vp.video.google.com/videodownload” copy everything after the “url:” up to just before “docid:” and paste it into firefox (may work with other browsers but I have only tested this with firefox) and save the .AVI file when it asks you to.

  3. Hans-Werner Says:

    Given that FLV plays fine in ffmpeg-based media players (more or less all media players) — what’s the point in making MPEGs from them? Well, OK, if you really want to make a VCD of them, right. But then you’d have to use other encoding parameters. Also, I don’t see any point in scaling the small video to a larger size before encoding. That just introduces some extra quality loss for a fixed bandwith.

    BTW: With more or less any flash-based embedded video player, you can “pause” the video, wait until it is completely downloaded (since FLV media is *not* real-time streaming data) and then have a look in either /tmp (most Flash video players) or the Browser cache directory (e.g. the MySpace FLV player). The FLV is waiting there to get copied :-) No need for “download” links which in most cases offer only quality-reduced versions for mobile phones anyway.

  4. Download Says:

    Thanks

    very nice

  5. giuseppe Says:

    i have ffmpeg and i used a guide when i firstr found it the command i used was something like ffmpeg -ie get.flv get.wma and it worked the only pproblem is i forgot the command and i need to make mp3 files for my song colection…

  6. منتديات Says:

    thanks

  7. Marc de Vries Says:

    Can i convert wma to flash with ffmpeg for windows?

  8. مسجات Says:

    convert .flv to .mpg using ffmpeg

    nice work

  9. العاب Says:

    good work man :)

  10. Paul Dufresne Says:

    Seems that to convert to VCD format you just have to:
    ffmpeg -i input.flv -f vcd output.mpg

  11. منتديات Says:

    Can i convert wma to flash with ffmpeg for windows?

    yeaha

  12. دردشة Says:

    thank you

    very nice

  13. فنادق Says:

    its good job

  14. جده Says:

    Thank you very much ,,

  15. افلام Says:

    appreciate it ,,,,,,,,

  16. directory Says:

    Thank you very much

    Please visit my sites:
    http://www.3in.cc/
    http://www.stuff9.com
    http://www.directory-world-languages.com/

  17. m7mmad Says:

    Thanks for sharing this useful info … regards

  18. s-h-o-a-i-b Says:

    Thanks for sharing but its useless again bunch of files which is most likely to be the case when downloading a few clips and wanna batch them in to one job.

    For bunch of files in a folder you can do this

    for file in `file -1`; do `ffmpeg -i $file -ab 56 -ar 22050 -b 500 -s 320×240 $file.mpg`; done

  19. bassam Says:

    can i convert rmvb to mpeg?

    i wont search if i can, ubuntu is the best.

    thank you.

  20. nobody Says:

    use..

    /usr/bin/ffmpeg -i “/home/me/film.avi” -vcodec flv -f flv -r 29.97 -s 320×240 -aspect 4:3 -b 300kb -g 160 -cmp 2 -subcmp 2 -mbd 2 -flags +aic+cbp+mv0+mv4+trell -ac 1 -ar 22050 -ab 56k “/home/me/film.flv”

    ..or..

    /usr/bin/ffmpeg -i “/home/me/film.avi” -vcodec flv -f flv -r 29.97 -s 320×180 -aspect 16:9 -b 300kb -g 160 -cmp 2 -subcmp 2 -mbd 2 -flags +aic+cbp+mv0+mv4+trell -ac 1 -ar 22050 -ab 56k “/home/me/film.flv”

    ;)

    have fun

  21. nobody Says:

    And backwards..

    /usr/bin/ffmpeg -i “/home/me/film.flv” -target ntsc-dvd -r 29.97 -s 720×480 -aspect 4:3 -b 8000k -mbd rd -flags +trell -mv0 -cmp -subcmp 2 “/home/me/film.mpg”

    ..or..

    /usr/bin/ffmpeg -i “/home/me/film.flv” -target ntsc-dvd -r 29.97 -s 720×480 -aspect 16:9 -b 8000k -g 12 -mbd rd -flags +trell -mv0 -cmp -subcmp 2 “/home/me/film.mpg”

  22. paul Says:

    I use my step 1 to convert using ffmpeg. I use 2-4 to put it on a dvd for later viewing.

    1) Convert any file format (including flv) to mpeg4 format
    ffmpeg -i video.avi -target ntsc-dvd -aspect 4:3 output.mpg

    2) Convert mpeg4 to dvd format with 15 minute chapters
    dvdauthor -o dvd.movie -t -c 0,15:00,30:00,45:00,1:00:00,1:15:00,1:30:00,1:45:00 output.mpg

    3) Close out the dvdproject
    dvdauthor -o dvd.movie/ -T

    4) Burn to dvd media with k3b

    I’ll have to look into the streaming aspects of ffmpeg. Currently using vlc from the command line to perform this and works pretty darn good.

  23. يوتيوب Says:

    Thank you very much ,,

  24. GagetPig Says:

    There is a front end to ffmpeg that makes this easier.

    http://code.google.com/p/winff/

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>