<---- template headericclude ----->
How to convert video to flv (flash video)
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2007
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to convert video to flv (flash video)

    Hello,

    I just came home from a long trip, with a lot of videos shot during the holiday. I wish to share them with the rest of the family and friends, but the files are huge (full HD). I intend to upload them to the family server, so youtube and the likes are not something I want.

    I did google but never found a proper guide: How to convert video to flash video?

    Thank you!

  2. #2
    Join Date
    Jan 2010
    Posts
    8,210
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: How to convert video to flv (flash video)

    http://forums.fedoraforum.org/showthread.php?t=255842

    Found with the google term linux convert video to flash

    It was about the second hit--note that it's completely untested on my part. (That's not an insult to your googling skills, just giving the terms, that this time at least, seem to have been successful.)

    A little more googling indicates that ffmpeg -i my.avi my.flv will also work--no idea about the quality.

  3. #3
    Join Date
    Oct 2008
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to convert video to flv (flash video)

    Hi,

    ffmpeg does a decent job. You'd better specify a desired bitrate for video (as default 256 kbps is often too low) and desired audio quality (as default mono 64 kbps MP3 is often not enough).

    WWell,

  4. #4
    Join Date
    Jul 2007
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to convert video to flv (flash video)

    Quote Originally Posted by smr54
    http://forums.fedoraforum.org/showthread.php?t=255842

    Found with the google term linux convert video to flash

    It was about the second hit--note that it's completely untested on my part. (That's not an insult to your googling skills, just giving the terms, that this time at least, seem to have been successful.)

    A little more googling indicates that ffmpeg -i my.avi my.flv will also work--no idea about the quality.
    Interesting - you were able to find my own thread using Google and then give me a link for it? WOW

    The suggested ffmpeg -i input_file.avi output_file.flv does NOT work, as most of the time, there is an error message like:

    Code:
    FFmpeg version SVN-r24044, Copyright (c) 2000-2010 the FFmpeg developers
      built on Jul 21 2010 15:07:15 with gcc 4.5.0 20100716 (Red Hat 4.5.0-3)
      configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib --mandir=/usr/share/man --arch=i686 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' --extra-version=rpmfusion --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib --cpu=i686 --enable-runtime-cpudetect
      libavutil     50.20. 0 / 50.20. 0
      libavcodec    52.79. 1 / 52.79. 1
      libavformat   52.73. 0 / 52.73. 0
      libavdevice   52. 2. 0 / 52. 2. 0
      libavfilter    1.20. 1 /  1.20. 1
      libswscale     0.11. 0 /  0.11. 0
      libpostproc   51. 2. 0 / 51. 2. 0
    Input #0, avi, from 'An.Idiot.Abroad.S01E01.WS.PDTV.XviD-aAF.avi':
      Duration: 00:44:03.16, start: 0.000000, bitrate: 1112 kb/s
        Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 25 tbr, 25 tbn, 25 tbc
        Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 128 kb/s
    [libmp3lame @ 0x8722140] flv does not support that sample rate, choose from (44100, 22050, 11025).
    Output #0, flv, to 'aaaaaa-demo.flv':
      Metadata:
        encoder         : Lavf52.73.0
        Stream #0.0: Video: flv, yuv420p, 624x352 [PAR 1:1 DAR 39:22], q=2-31, 200 kb/s, 1k tbn, 25 tbc
        Stream #0.1: Audio: libmp3lame, 48000 Hz, 2 channels, s16, 64 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    Could not write header for output file #0 (incorrect codec parameters ?)

  5. #5
    Join Date
    Apr 2010
    Location
    uk
    Posts
    726
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to convert video to flv (flash video)

    Hello
    the simplest way to convert to .flv would be
    Code:
    ffmpeg -i ~/input-file.mpg -ar 44100 ~/output-file.flv
    this will create a file the same res and default bitrates etc and therefore not really reduce the file size.
    To reduce the file size I'd recommend using x264 this has about the best compression to quality ratio, or reduce the resolution
    try these two out
    Code:
    ffmpeg -i ~/input-file.mpg -acodec copy -vcodec libx264 -vpre hq -vpre main -threads 0 -b 768k -s 720x576 ~/output-file.mp4
    this will create a pal resolution but better quality vid and much smaller file size that should look excellent on a big screen
    if you must have .flv
    Code:
    ffmpeg -i ~/input-file.mpg -ar 44100 -s 720x576 -b 768k ~/output-file.flv
    if you leave out the acodec copy you get the default mp3 audio at 64k
    if your video has a lot of movement i.e motor racing and the picture is blocky up the bitrate (that's the -b 768k)
    You can press q at any time to check the results, it depends on the spec of your pc as to how long this will take but assume about 1 and a half times the original video length
    I've tried to keep this as simple as possible as ffmpeg has a lot of options
    any problems post back
    Edit: just seen your new post, Karl Pilkington rules
    Last edited by bonedome; 9th December 2010 at 12:29 AM.
    fedora 14 fluxbox and gnome2 hp compaq nx9030 laptop 2Gb ram, helicopter landing pad, jacuzzi, mini fridge, gateway to alternative dimension

  6. #6
    Join Date
    Jan 2010
    Posts
    8,210
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: How to convert video to flv (flash video)

    Oops, oddly enough, copied the wrong thing. Blame it on old age.

    I'd stick with ffmpeg over mencoder. Using the keywords I mentioned above, the actual link was

    http://studge.com/creating-flash-video-in-linux/

    which uses mencoder.

    Sorry about the errm, missing link?

  7. #7
    Join Date
    Jul 2007
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to convert video to flv (flash video)

    Quote Originally Posted by bonedome
    Hello
    the simplest way to convert to .flv would be
    Code:
    ffmpeg -i ~/input-file.mpg -ar 44100 ~/output-file.flv
    this will create a file the same res and default bitrates etc and therefore not really reduce the file size.
    To reduce the file size I'd recommend using x264 this has about the best compression to quality ratio, or reduce the resolution
    try these two out
    Code:
    ffmpeg -i ~/input-file.mpg -acodec copy -vcodec libx264 -vpre hq -vpre main -threads 0 -b 768k -s 720x576 ~/output-file.mp4
    this will create a pal resolution but better quality vid and much smaller file size that should look excellent on a big screen
    if you must have .flv
    Code:
    ffmpeg -i ~/input-file.mpg -ar 44100 -s 720x576 -b 768k ~/output-file.flv
    if you leave out the acodec copy you get the default mp3 audio at 64k
    if your video has a lot of movement i.e motor racing and the picture is blocky up the bitrate (that's the -b 768k)
    You can press q at any time to check the results, it depends on the spec of your pc as to how long this will take but assume about 1 and a half times the original video length
    I've tried to keep this as simple as possible as ffmpeg has a lot of options
    any problems post back
    Edit: just seen your new post, Karl Pilkington rules
    Sir, I thank you for your time and wisdom

    I will use the time I am away at work to give the workstation some food-for-thought and feed it one of the larger files I filmed: this way, I'll know if the audio/video is in sync and if the process works.

    Started two streams, one of them making a x264, one of them a flv file. Depending on how big they turn up and how they embed on the family website, I'll pick me the format. Will report back late tonight

  8. #8
    Join Date
    Sep 2006
    Location
    On up the road a piece
    Posts
    869
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: How to convert video to flv (flash video)

    Converting to mp4 will result in better overall quality, usually slightly smaller file size, and mp4 is less cpu intensive to run than flash. Just a thought.
    Mike
    I know things. It's what I do.

  9. #9
    Join Date
    Jul 2007
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to convert video to flv (flash video)

    @bonedome: THANK YOU for sharing wisdom again. The x264 conversion went like a charm and reduced the FullHD file roughly 10 times in size and still produced excellent quality.

    @SomeDamFool: indeed, when comparing similar sized flv and x264 files, the x264 is by far better in quality. This is why I shall convert all to x264. thanks.

    to all who search after me, the best results in terms of smaller size and preserved quality I accomplished using this command from @bonedome:

    Code:
    ffmpeg -i input-file.mp4 -acodec copy -vcodec libx264 -vpre hq -vpre main -threads 0 -b 850k -s 720x576 output-file-x264.mp4

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]