[Ffmpeg-devel] How to convert video file to SWF

shamju joseph shamjuj
Mon Aug 21 07:13:01 CEST 2006


Dear all,

(I'm sending this question to  ffmpeg-devel as there
was no proper response from ffmpeg-user mailing list)

I have some problem converting video files to SWF
format. I could convert AVI, MPG and WMV files to SWF
format, but while playing the SWF files, only audio
was played and no video. The audio was played normal
on ffplay but fast on mplayer. I could n't convert MOV
files to SWF format, the error reported was :
" Could not write header for output file #0 (incorrect
codec paramters ?) "

Is there any restriction converting video files to SWF
format? I could even convert all these files to FLV
format.

Please tell me what version and command line options
should I use to accomplish this.

version used : ffmpeg-0.4.9-pre1
OS : Fedora Core 5
System : HP Pavilion (Intel PIV 3GHz)

The ffmpeg output displayed while converting the video
files are listed below:

-------------------------------------------------

[root at localhost vtmp]# ffmpeg -i 1.wmv 1.swf
ffmpeg version 0.4.9-pre1, build 4718, Copyright (c)
2000-2004 Fabrice Bellard
  built on Aug 15 2006 15:59:05, gcc: 3.2.3 20030502
(Red Hat Linux 3.2.3-55.fc5)
Input #0, avi, from '1.wmv':
  Duration: 00:06:34.7, bitrate: 615 kb/s
  Stream #0.0: Video: mpeg4, 320x240, 25.00 fps
  Stream #0.1: Audio: mp3, 22050 Hz, stereo, 55 kb/s
Output #0, swf, to '1.swf':
  Stream #0.0: Video: flv, 320x240, 25.00 fps, q=2-31,
200 kb/s
  Stream #0.1: Audio: mp3, 22050 Hz, stereo, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 9867 q=7.9 Lsize=       0kB time=394.7 bitrate=
  0.0kbits/s
video:9902kB audio:3084kB global headers:0kB muxing
overhead -99.999850%
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]# ffmpeg -i 2.mov 2.swf
ffmpeg version 0.4.9-pre1, build 4718, Copyright (c)
2000-2004 Fabrice Bellard
  built on Aug 15 2006 15:59:05, gcc: 3.2.3 20030502
(Red Hat Linux 3.2.3-55.fc5)
Input #0, mov,mp4,m4a,3gp, from '2.mov':
  Duration: 00:00:38.0, bitrate: 5867 kb/s
  Stream #0.0: Video: mjpeg, 640x480, 15.00 fps
  Stream #0.1: Audio: pcm_u8, 8000 Hz, mono, 64 kb/s
Output #0, swf, to '2.swf':
  Stream #0.0: Video: flv, 640x480, 15.00 fps, q=2-31,
200 kb/s
  Stream #0.1: Audio: mp3, 8000 Hz, mono, 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 paramters ?)
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]# ffmpeg -i 3.MPG 3.swf
ffmpeg version 0.4.9-pre1, build 4718, Copyright (c)
2000-2004 Fabrice Bellard
  built on Aug 15 2006 15:59:05, gcc: 3.2.3 20030502
(Red Hat Linux 3.2.3-55.fc5)
Input #0, mpeg, from '3.MPG':
  Duration: 00:02:09.8, bitrate: 1373 kb/s
  Stream #0.0: Video: mpeg1video, 352x288, 25.00 fps
  Stream #0.1: Audio: mp2, 44100 Hz, stereo, 224 kb/s
Output #0, swf, to '3.swf':
  Stream #0.0: Video: flv, 352x288, 25.00 fps, q=2-31,
200 kb/s
  Stream #0.1: Audio: mp3, 44100 Hz, stereo, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
[flv @ 0x82b4fdc]removing common factors from
framerate
Press [q] to stop encoding
frame= 3285 q=31.0 Lsize=       0kB time=131.1
bitrate=   0.0kbits/s
video:3644kB audio:1024kB global headers:0kB muxing
overhead -99.999582%
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]#
[root at localhost vtmp]# ffmpeg -i 4.AVI 4.swf
ffmpeg version 0.4.9-pre1, build 4718, Copyright (c)
2000-2004 Fabrice Bellard
  built on Aug 15 2006 15:59:05, gcc: 3.2.3 20030502
(Red Hat Linux 3.2.3-55.fc5)
Input #0, avi, from '4.AVI':
  Duration: 00:03:01.5, bitrate: 870 kb/s
  Stream #0.0: Video: mpeg4, 352x288, 25.00 fps
  Stream #0.1: Audio: mp3, 22050 Hz, stereo, 55 kb/s
Output #0, swf, to '4.swf':
  Stream #0.0: Video: flv, 352x288, 25.00 fps, q=2-31,
200 kb/s
  Stream #0.1: Audio: mp3, 22050 Hz, stereo, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
[flv @ 0x82b4fdc]removing common factors from
framerate
Press [q] to stop encoding
frame= 4539 q=7.9 Lsize=       0kB time=181.6 bitrate=
  0.0kbits/s
video:4620kB audio:1419kB global headers:0kB muxing
overhead -99.999677%
[root at localhost vtmp]# 

------------------------------------------------

Thanks
shamju joseph

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the ffmpeg-devel mailing list