[MEncoder-users] mov to swf, mission impossible?
Barbara Maren Winkler-Wolff
barbara at wolffh.de
Thu May 21 15:44:25 CEST 2009
Hello to all,
can anyone help?
I thought what I want to do is pretty straightforward. I have a
Panasonic Lumix camera which can take little videos, and I want to put
one of those videos of my little newborn son on a website for my
parents and relatives to see. Oh, and I have a Linux (kubuntu) box
here, but will reluctantly boot Windows XP SP3 occasionally.
The videos from the camera come in Quicktime (.mov) format, and the
best way I have found to put video into a web page (I don't want to go
via YouTube) is to use Shockwave Flash (.swf). It only requires the
Flash player which I know my relatives have already got.
So... I need to convert .mov tu .swf. It shouldn't be hard. Except I
have found absolutely no way.
For instance, I can easily convert to .avi with mencoder:
$mencoder -ovc lavc -oac mp3lame -lameopts abr:br=1 -lavcopts
vcodec=mjpeg -o myVideo.avi myVideo.mov
at http://www.swftools.org/ they say they've got avi2swf. But unfortunately:
"AVI2SWF Converts AVI animation files to SWF. ... (Notice: this tool
is not included anymore in the latest version, as ffmpeg or mencoder
do a better job nowadays)
They say I can convert avi to swf with mencoder, but that's not true:
http://www.swftools.org/faq.html says:
"mencoder file.avi -lavfopts
i_certify_that_my_video_stream_does_not_use_b_frames \
-ffourcc FLV1 -oac mp3lame -of lavf -ovc lavc \
-lavcopts vcodec=flv:acodec=mp3:vbitrate=500:abitrate=56 -srate 22050 \
-o file.swf"
... admittedly I don't know what "my video stream does noy use b
frames" means, the option is of course bogus.
... but this does not create a valid .swf (gnash crashes on the
created .swf file, and firefox refuses to display it), just a valid
.flv:
mencoder myVideo.avi -of lavf -f fourcc FLV1 -oac mp3lame -ovc lavc
-lavcopts vcodec=flv:acodec=mp3:vbitrate=500:abitrate=56 -srate 22050
-o myVideo.flv
There is a significant difference between myVideo.swf and myVideo.flv,
namely, my browser with the Flash plugin will read myVideo.swf, and
not myVideo.flv. When Firefox (3.0) encounters myVideo.flv in
something like
<object data="myVideo.flv" type="video/x-flv" width="640" height="400">
<param name="src" value="myVideo.flv">
</object>
, it offers me to find the appropriate plugin, but doesn't find it
("Unknown plugin (video/x-flv)")... that's no good. My partner has a
plugin that does it, xine, and I should have it , too, at least I have
installed it, but it doesn't show up, Firefox still can't do it, and
then, that doesn't help, I don't want to just _view_ the video myself,
I want to _publish_ it to other people who can't be relied on finding
a nonexistent plugin.
So now, I have myVideo.mov, I can make myVideo.avi and myVideo.flv.
I need my Video.swf, and that's apparently impossible.
I have tried to build an old version of swftools that would still
contain avi2swf, but the tarball doesn't build.
I have installed the Perl flv2swf by Chris Dolan from
http://search.cpan.org/~cdolan/FLV-Info-0.24/bin/flv2swf
, but it fails on the .flv created by mencoder:
$ flv2swf myVideo.flv myVideo.swf
Failed to read FLV file: Unknown video frame type at byte 11686
(0x2da6) at /usr/local/share/perl/5.8.8/FLV/VideoTag.pm line 62.
I've spent day on this.
Please, does anyone have a solution? How can I convert a .mov, or
.avi, or .flv to .swf?
More information about the MEncoder-users
mailing list