Fedora Linux Support Community & Resources Center
  #1  
Old 20th September 2009, 08:25 PM
CD-RW Offline
Registered User
 
Join Date: Nov 2006
Posts: 557
linuxkonqueror
How to convert *.flv & *.mp4 videos to *.swf format

Is there any way to convert *.flv and *.mp4 videos to *.swf format please?

I have some videos downloaded with youtube-dl that are in the above format.

I would like to make them all into SWF files, so anyone can watch them in their browser, without having to find a suitable multimedia player.
Reply With Quote
  #2  
Old 20th September 2009, 10:38 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
linuxopera
flv is a flash file.

You should be able to open it in your browser. So, that one should be fine.

mp4...hrrm

Shame on you, have you googled yet? It took about one minute to find using terms mp4 to flv linux

Oops, of course, you didn't realize flv was flash, so you wouldn't have used those terms.

Anyway, try
http://www.zimbio.com/mp4+Converter/...using+mencoder

And another Oops on my part. That requires mplayer, which is available from rpmfusion, not the standard repos.
__________________
--
http://home.roadrunner.com/~computertaijutsu

Do NOT PM forum members with requests for technical support. Ask your questions on the forum.


"I don't know why there is the constant push to break any semblance of compatibility" --anon
Reply With Quote
  #3  
Old 20th September 2009, 10:42 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
linuxopera
To add--in case you do prefer it to be swf, rather than flv (not sure of the exact difference, myself, I'm not a real video person, I just watch 'em from time to time.)

Another 30 seconds of googling revealed...

http://ubuntuforums.org/showthread.php?t=1001642

Note that I haven't tested that any of these answers actually work.
__________________
--
http://home.roadrunner.com/~computertaijutsu

Do NOT PM forum members with requests for technical support. Ask your questions on the forum.


"I don't know why there is the constant push to break any semblance of compatibility" --anon
Reply With Quote
  #4  
Old 21st September 2009, 07:34 PM
CD-RW Offline
Registered User
 
Join Date: Nov 2006
Posts: 557
linuxkonqueror
Thanks scottro.

The info in the link to convert *.mp4 to *.flv works fine.

I got some skipped frame messages, but the resulting *.flv file played fine in SMPlayer.

I converted a small 57 second *.flv file to *.swf using ffmpeg.

The resulting *.swf was only 15 seconds in length.

I would like to convert to them to *.swf - if not I'll just go with *.flv and hope that the people I give the videos to can play them.
Reply With Quote
  #5  
Old 21st September 2009, 07:46 PM
CD-RW Offline
Registered User
 
Join Date: Nov 2006
Posts: 557
linuxkonqueror
Just found this link on the Ubuntu page you gave me:

http://winff.org/html_new/features.html

Seems like an interesting application.

I managed to install the Red Hat RPM on Fedora 8 using Konqueror's KPackage.

Code:
[root]# yum info winff
Installed Packages
Name       : winff
Arch       : i386
Version    : 1.1.1
Release    : 1~ppa1k
Size       : 4.4 M
Repo       : installed
Summary    : graphical video and audio batch converter using ffmpeg
License    : see /usr/share/doc/winff/copyright
Description: WinFF is a graphical user interface for FFmpeg. It will convert almost
           : any video file that FFmpeg will convert. WinFF does multiple files in
           : multiple formats at one time. You can, for example, convert mpeg's,
           : flv's, and mov's into avi's (or DVD/VCD format or MPEG or 3gp etc.) all
           : at once.  This package provides a variety of preset conversion settings
           : for common formats and devices. These presets are intended to hit the
           : "sweet spot" for each individual codec. They have been written with a
           : tip of the balance to quality.  For most presets to work, it is
           : necessary to have the unstripped version of the libavcodec in the
           : multiverse repository, which can be obtained by installing ubuntu-
           : restricted-extras or kubuntu-restricted-extras or xubuntu-restricted-
           : extras as suggested by this package.   (Converted from a deb package by
           : alien version 8.73.)
Not used it yet. Will post my results soon.
Reply With Quote
  #6  
Old 21st September 2009, 10:15 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
linuxkonqueror
One thing I did find re the thread on the Ubuntu forum--the first method seemed to work better (for me) than the second. The second one (final post) also gave me a flash file at high speed. Did you try the easier looking one?

ffmpeg -i inputname.flv outputname.swf
__________________
--
http://home.roadrunner.com/~computertaijutsu

Do NOT PM forum members with requests for technical support. Ask your questions on the forum.


"I don't know why there is the constant push to break any semblance of compatibility" --anon
Reply With Quote
  #7  
Old 22nd September 2009, 08:32 AM
CD-RW Offline
Registered User
 
Join Date: Nov 2006
Posts: 557
linuxfedorafirefox
Quote:
Originally Posted by scottro View Post
One thing I did find re the thread on the Ubuntu forum--the first method seemed to work better (for me) than the second. The second one (final post) also gave me a flash file at high speed. Did you try the easier looking one?

ffmpeg -i inputname.flv outputname.swf

That's the command that for me truncated a 57 second video, down to about 15 seconds.

It was this one from Youtube:

Code:
[root VideoConvertTester]# ./youtube-dl.py -b -l http://www.youtube.com/v/z8qvSNkiB9M
[youtube] Setting language
[youtube] z8qvSNkiB9M: Downloading video info webpage
[youtube] z8qvSNkiB9M: Extracting video information
[youtube] z8qvSNkiB9M: URL: http://www.youtube.com/get_video?video_id=z8qvSNkiB9M&t=vjVQa1PpcFOi6tuV3nwV3eiY8lx56ZwDYTMHbq-We_U=&eurl=&el=detailpage&ps=default&gl=US&hl=en&fmt=22
[youtube] z8qvSNkiB9M: Format 22 not available
[youtube] z8qvSNkiB9M: Downloading video info webpage
[youtube] z8qvSNkiB9M: Extracting video information
[youtube] z8qvSNkiB9M: URL: http://www.youtube.com/get_video?video_id=z8qvSNkiB9M&t=vjVQa1PpcFPF817TiQwNvSCAAYI7sKD-gw2YPY4Ie4g=&eurl=&el=detailpage&ps=default&gl=US&hl=en&fmt=35
[youtube] z8qvSNkiB9M: Format 35 not available
[youtube] z8qvSNkiB9M: Downloading video info webpage
[youtube] z8qvSNkiB9M: Extracting video information
[youtube] z8qvSNkiB9M: URL: http://www.youtube.com/get_video?video_id=z8qvSNkiB9M&t=vjVQa1PpcFMzFNoeEGgwG-r8uCrfAwGqh7bW2FPZOvU=&eurl=&el=detailpage&ps=default&gl=US&hl=en&fmt=18
[download] Destination: SEG+voltage+controlled+demonstration-z8qvSNkiB9M.mp4
[download] 100.0% of 4.34M at  209.43k/s ETA 00:00
[root VideoConvertTester]#
Code:
[root VideoConvertTester]# ls
CONVERTING-NOTES        SEG-Demo-57seconds.mp4  youtube-dl.py.bak
CONVERTING-NOTES.bak    SEG-Demo-57seconds.swf
SEG-Demo-57seconds.flv  youtube-dl.py
[root VideoConvertTester]# ffmpeg -i SEG-Demo-57seconds.flv -acodec copy \ 
-vcodec copy SEG-Demo-57seconds.swf
FFmpeg version SVN-r15261, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/usr --incdir=/usr/include/ffmpeg --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --arch=i386 --extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fasm -std=c99 -fno-math-errno --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-swscale --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-optimizations --disable-stripping
  libavutil     49.10. 0 / 49.10. 0
  libavcodec    51.71. 0 / 51.71. 0
  libavformat   52.22. 1 / 52.22. 1
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 1. 0 /  0. 1. 0
  libswscale     0. 6. 1 /  0. 6. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Sep 28 2008 16:03:53, gcc: 4.1.2 20070925 (Red Hat 4.1.2-33)

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 24.00 (24/1)
Input #0, flv, from 'SEG-Demo-57seconds.flv':
  Duration: 00:00:57.75, start: 0.000000, bitrate: 48 kb/s
    Stream #0.0: Video: flv, yuv420p, 480x270, 24.00 tb(r)
    Stream #0.1: Audio: mp3, 22050 Hz, stereo, s16, 48 kb/s
File 'SEG-Demo-57seconds.swf' already exists. Overwrite ? [y/N] y
Output #0, swf, to 'SEG-Demo-57seconds.swf':
    Stream #0.0: Video: flv, yuv420p, 480x270, q=2-31, 1000.00 tb(c)
    Stream #0.1: Audio: libmp3lame, 22050 Hz, stereo, s16, 48 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 1386 fps=  0 q=-1.0 Lsize=    5595kB time=57.71 bitrate= 794.2kbits/s
video:5226kB audio:330kB global headers:0kB muxing overhead 0.707559%
[root VideoConvertTester]#
I've tried again with the exact command and the conversion works OK now. However the quality is very poor. Considerably different to *.mp4 or *.flv

Code:
[root VideoConvertTester]# ffmpeg -i SEG-Demo-57seconds.flv SEG-Demo-57seconds.swf
FFmpeg version SVN-r15261, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/usr --incdir=/usr/include/ffmpeg --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --arch=i386 --extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fasm -std=c99 -fno-math-errno --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-swscale --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-optimizations --disable-stripping
  libavutil     49.10. 0 / 49.10. 0
  libavcodec    51.71. 0 / 51.71. 0
  libavformat   52.22. 1 / 52.22. 1
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 1. 0 /  0. 1. 0
  libswscale     0. 6. 1 /  0. 6. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Sep 28 2008 16:03:53, gcc: 4.1.2 20070925 (Red Hat 4.1.2-33)

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 24.00 (24/1)
Input #0, flv, from 'SEG-Demo-57seconds.flv':
  Duration: 00:00:57.75, start: 0.000000, bitrate: 48 kb/s
    Stream #0.0: Video: flv, yuv420p, 480x270, 24.00 tb(r)
    Stream #0.1: Audio: mp3, 22050 Hz, stereo, s16, 48 kb/s
Output #0, swf, to 'SEG-Demo-57seconds.swf':
    Stream #0.0: Video: flv, yuv420p, 480x270, q=2-31, 200 kb/s, 24.00 tb(c)
    Stream #0.1: Audio: libmp3lame, 22050 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[libmp3lame @ 0x9560410]lame: output buffer too small (buffer index: 8150, free bytes: 490)
frame= 1386 fps= 86 q=19.2 Lsize=    2163kB time=57.75 bitrate= 306.9kbits/s
video:1673kB audio:453kB global headers:0kB muxing overhead 1.762326%
[root VideoConvertTester]
My main concern is to get all 22 videos for this video topic into the same consistent format, whatever that may be that is the most common format for others to play. So if someone can play one of them, they can play them all.

As the conversion process may take some time, I'm just using a small file to practice on first.

Once I have a suitable common video format to convert to that works OK, I'll write a bash script to do the conversion over night.
Reply With Quote
  #8  
Old 22nd September 2009, 11:37 AM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
linuxopera
Well, as I said, that was a rather quick google on my part. I think, if it were me, I'd just google around till I found one that worked. I suspect it's a common thing, so there's probably a good way, or good tool for it, or perhaps, beter options to feed mencoder or ffmpeg.
__________________
--
http://home.roadrunner.com/~computertaijutsu

Do NOT PM forum members with requests for technical support. Ask your questions on the forum.


"I don't know why there is the constant push to break any semblance of compatibility" --anon
Reply With Quote
  #9  
Old 22nd September 2009, 03:38 PM
CD-RW Offline
Registered User
 
Join Date: Nov 2006
Posts: 557
linuxfedorafirefox
Quote:
Originally Posted by scottro View Post
Well, as I said, that was a rather quick google on my part. I think, if it were me, I'd just google around till I found one that worked. I suspect it's a common thing, so there's probably a good way, or good tool for it, or perhaps, beter options to feed mencoder or ffmpeg.
Thanks for your help scottro.

I will do that.

When I get some suitable results I'll post them back here
Reply With Quote
  #10  
Old 22nd September 2009, 10:50 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
linuxkonqueror
Please do, it's the sort of thing that's probably simple (to do right, that is, as opposed to a 15 second version of a 59 second file) if you know how.
__________________
--
http://home.roadrunner.com/~computertaijutsu

Do NOT PM forum members with requests for technical support. Ask your questions on the forum.


"I don't know why there is the constant push to break any semblance of compatibility" --anon
Reply With Quote
Reply

Tags
convert, flv, format, mp4, swf, videos

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to download YouTube flash videos in Linux and convert to ffmpeg jonathonp Guides & Solutions (No Questions) 19 6th May 2010 03:55 PM
Convert DVD to pal format Golf4Fun Using Fedora 2 15th August 2009 02:32 AM
Convert videos? (ASF > MPEG) Firewing1 Using Fedora 0 24th August 2005 05:41 PM


Current GMT-time: 06:13 (Sunday, 21-12-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
...Old Cutler Road - Icebox Cafe Travel Photos on Instagram - Kinopalatsi Instagram Photos