LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 09-16-2008, 08:40 PM   #1
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

Rep: Reputation: 34
Converting flash video (FLV) to AVI, MOV, others?


Hi.

I am wondering if there's a simple way of converting FLV (flash) files into other formats such as AVI, MOV (QuickTime) or even WMV? I can watch FLV files natively using Kaffeine, but the quality stinks. Besides, fast-forwarding or rewinding them will almost always cause them to act up. I'd like to avoid that problem.

TIA,
Dai
 
Old 09-16-2008, 10:06 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
MOV, AVI and WMV formats are to be avoided equally with FLV. Note - FLV is a container format which normally contains mpeg for video and mp3 for audio.

http://en.wikipedia.org/wiki/Flash_Video

For best results with gnu/linux, use Xiph.org formats ... ogg container with theora video and vorbis audio (will also support speex - speech - and FLAC - lossless audio).

http://www.playogg.org

You can easily convert FLV files which do not use DRM with a utility called ffmpeg2theora, which is available from your yum repos.
 
Old 09-16-2008, 11:05 PM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
For that matter, AVI is also a container format. But it's so old and commonplace now that just about everything supports it, and I don't think it's patent-encumbered, so it's not a big deal to use it. It's only the codecs inside that can be the problem.

They say that pretty much the best quality-for-filesize video codec is x264 (mpeg4). x264 is free, but the mpeg4 standard may have some patent encumbrances. xvid is also pretty good, but it uses an older version of the mpeg4 standard and doesn't give as good a compression rate. It's well supported across platforms though. If you want to go completely free, ogg theora is probably your best bet.

BTW, the avi container doesn't support mpeg4 very well. There's a lack of b-frame support (although it can be hacked around, it's nonstandard and thus not supported everywhere). The ogg container can hold mpeg4, I believe, as can the Matroska container (probably the most advanced and flexible container format out there). And of course mpeg4 has it's own container as well.

Finally, if you're thinking of converting an FLV file to another format in order to improve the quality, just stop right there. The quality of any video can never be better than that of the source it's encoded from. If the source file is already low-quality, then converting it is certainly not going to improve things. It might help with fast-forwarding/scanning problems though, since that is dependent on the formats used.
 
1 members found this post helpful.
Old 09-17-2008, 03:55 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
You can try avidemux, or if you want to use ffmpeg, run it first on a file to get some info on it:
Code:
ffmpeg -i input.flv
 
Old 09-17-2008, 11:01 PM   #5
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by Simon Bridge View Post
MOV, AVI and WMV formats are to be avoided equally with FLV. Note - FLV is a container format which normally contains mpeg for video and mp3 for audio.

http://en.wikipedia.org/wiki/Flash_Video

For best results with gnu/linux, use Xiph.org formats ... ogg container with theora video and vorbis audio (will also support speex - speech - and FLAC - lossless audio).

http://www.playogg.org

You can easily convert FLV files which do not use DRM with a utility called ffmpeg2theora, which is available from your yum repos.
Thanks for the info. I just installed and tried ffmpeg2theora. I get the following error (and segfault).

Code:
$ ffmpeg2theora 4859.flv
Input #0, flv, from '4859.flv':
  Duration: 00:28:28.9, start: 0.000000, bitrate: 32 kb/s
  Stream #0.0: Video: vp6f, yuv420p, 1280x720, 15.00 fps(r)
  Stream #0.1: Audio: mp3, 22050 Hz, stereo, 32 kb/s
picture size invalid (0x0)
picture size invalid (0x0)
picture size invalid (0x0)
picture size invalid (0x0)
picture size invalid (0x0)
picture size invalid (0x0)
Segmentation fault
Can you think of any reason for this off the top of your head? The original FLV file can be viewed by Kaffeine.

Thanks again!
Dai
 
Old 09-18-2008, 01:37 AM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
GIYF: googling the error gives stuff like this:
http://readlist.com/lists/mplayerhq....er/1/9948.html

... perhaps you could try specifying the video size explicitly with the -s flag. (man ffmpeg2theora)
 
Old 09-18-2008, 02:29 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you use the firefox browser, you can try the dwhelper plugin. It will download flash videos and will use either mencoder or ffmpeg to convert them. In Windows, it adds an overlay to the video's unless you purchase the commercial version. In linux it uses ffmpeg or mencoder to convert the videos. The latest version claims to support converting to wmv's but I don't know if this would include the Linux version.

Generally, in Linux you can play wmv9 videos but not encode to that format. You shouldn't want to.
It's a really nasty format.

I don't mind the avi container format. It doesn't support interactive DRM schemes which could be a form of spyware.

Last edited by jschiwal; 09-18-2008 at 02:30 AM.
 
Old 10-14-2008, 12:05 AM   #8
lucy624
LQ Newbie
 
Registered: Oct 2008
Posts: 2

Rep: Reputation: 0
See from your questions, you are all experts on programming.
As a layman, I use an flv converter named Aunsoft flv converter to help me convert flv to vieos such as AVI, MPEG, MOV, WMV, MP4 and others.
 
Old 10-14-2008, 12:41 AM   #9
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by daihard View Post
Hi.

I am wondering if there's a simple way of converting FLV (flash) files into other formats such as AVI, MOV (QuickTime) or even WMV?
You can do this with mencoder.
 
Old 10-14-2008, 09:18 AM   #10
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Depends on how you define simple.

ffmpeg -i SOURCE.FLV -sameq -target ntsc-dvd DESTINATION.MPEG

Which you can put into a dvd with dvdauthor and other tools.

Not that it's really the same quality in that you're probably going from 320x240 (or 160x120) to 720x480. ffmpeg is supposed to just work with -i source.ext destination.ext. But not always functional depending on source and destination formats. And some quality isses if you don't tell it to keep the same quality -sameq. And various options for optimizing to filesize and/or quality. Simple in concept, but can get a bit more complex depending on the standards you're wanting to achieve for your results.
 
Old 05-06-2009, 02:04 AM   #11
justmore
LQ Newbie
 
Registered: May 2009
Posts: 6

Rep: Reputation: 0
now you guys can use a free flv converter, with which you can convert flv to all kinds of video formats including avi, mov, mpeg, mp4, etc.
http://www.leawo.com/flv-converter/
 
Old 05-06-2009, 04:06 AM   #12
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by justmore View Post
now you guys can use a free flv converter, with which you can convert flv to all kinds of video formats including avi, mov, mpeg, mp4, etc.
http://www.leawo.com/flv-converter/
That program is for windoze only, this is a Linux forum. And it's shareware too, probably malware as well.
 
Old 05-06-2009, 11:44 AM   #13
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
I got this script from somewhere on LQ in the past.
It works fine:
Code:
tred@vaio:~$ cat /home/tred/flv2avi
#!/bin/sh
#
if [ -z "$1" ]; then
  echo "Usage: $0 {-divx|-xvid} list_of_flv_files"
  exit 1
fi

# video encoding bit rate
V_BITRATE=1000

while [ "$1" ]; do
  case "$1" in
    -divx)
      MENC_OPTS="-ovc lavc -lavcopts \
        vcodec=mpeg4:vbitrate=$V_BITRATE:mbd=2:v4mv:autoaspect"
      ;;
    -xvid)
      MENC_OPTS="-ovc xvid -xvidencopts bitrate=$V_BITRATE:autoaspect"
      ;;
    *)
      if file "$1" | grep -q "Macromedia Flash Video"; then
        mencoder "$1" $MENC_OPTS -vf pp=lb -oac mp3lame \
          -lameopts fast:preset=standard -o \
          "`basename $1 .flv`.avi"
      else
        echo "$1 is not Flash Video. Skipping"
      fi
      ;;
  esac
  shift
done
tred@vaio:~$
 
  


Closed Thread



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion of mpg,avi,mov,wmv formats to flv manu82 Linux - Software 6 07-30-2008 04:31 AM
converting all kind of videos to flash ( FLV zafar466 Linux - General 1 07-25-2008 05:17 AM
How do you find video info (duration, width, height) for avi, mov, mpg, etc.? BrianK Linux - Software 2 04-17-2007 09:31 PM
Help embedding FLV flash video MicahCarrick Programming 3 07-24-2006 08:40 PM
Trouble getting .avi .mov .mov files to run redman13 Linux - Newbie 4 11-09-2003 01:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration