Fedora Linux Support Community & Resources Center
  #1  
Old 8th December 2010, 06:57 PM
defcon3 Offline
Registered User
 
Join Date: Jul 2007
Posts: 73
linuxfedorafirefox
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!
Reply With Quote
  #2  
Old 8th December 2010, 08:41 PM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 5,515
linuxopera
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.
Reply With Quote
  #3  
Old 8th December 2010, 09:23 PM
assen Offline
Registered User
 
Join Date: Oct 2008
Posts: 492
linuxfedorafirefox
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,
Reply With Quote
  #4  
Old 8th December 2010, 11:01 PM
defcon3 Offline
Registered User
 
Join Date: Jul 2007
Posts: 73
linuxfedorafirefox
Re: How to convert video to flv (flash video)

Quote:
Originally Posted by smr54 View Post
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 ?)
Reply With Quote
  #5  
Old 8th December 2010, 11:20 PM
bonedome Offline
Registered User
 
Join Date: Apr 2010
Location: uk
Posts: 727
linuxfedorafirefox
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
__________________
fedora 14 fluxbox and gnome2 hp compaq nx9030 laptop 2Gb ram, helicopter landing pad, jacuzzi, mini fridge, gateway to alternative dimension

Last edited by bonedome; 8th December 2010 at 11:29 PM.
Reply With Quote
  #6  
Old 9th December 2010, 12:33 AM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 5,515
linuxopera
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?
Reply With Quote
  #7  
Old 9th December 2010, 06:37 AM
defcon3 Offline
Registered User
 
Join Date: Jul 2007
Posts: 73
linuxfedorafirefox
Re: How to convert video to flv (flash video)

Quote:
Originally Posted by bonedome View Post
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
Reply With Quote
  #8  
Old 9th December 2010, 11:52 AM
SomeDamFool Offline
Registered User
 
Join Date: Sep 2006
Location: On up the road a piece
Posts: 499
linuxfedorafirefox
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'm living in an age that screams my name at night
But when I get to the doorway there's no one in sight
Reply With Quote
  #9  
Old 10th December 2010, 06:13 AM
defcon3 Offline
Registered User
 
Join Date: Jul 2007
Posts: 73
linuxfedorafirefox
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
Reply With Quote
Reply

Tags
convert, fedora, flash video

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Current GMT-time: 17:51 (Tuesday, 30-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat