[FFmpeg-devel] [FFmpeg-user] Need Solution for SWF to Jpeg conversion

Manav Arora marora26
Tue Aug 11 05:40:53 CEST 2009



Hi Jensen,
Thanks for your reply. But it still didn't work. I did the same thing  using swftools but the conversion didn't happen with ffmpeg.
Used your garth.swf file qwhich yielded a output.swf and then ran the following command.
ffmpeg  -itsoffset -4  -i output.swf -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg

It gave:-

FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-postproc --enable-swscale --enable-avfilt
er --enable-avfilter-lavf --enable-pthreads --enable-avisynth --enable-libfaac -
-enable-libfaad --enable-libmp3lame --enable-libspeex --enable-libtheora --enabl
e-libvorbis --enable-libxvid --enable-libx264 --enable-memalign-hack
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7.. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Mar 16 2009 16:09:18, gcc: 4.2.4 [Sherpya]
[swf @ 0x11eab20]Compressed SWF format not supported
output.swf: I/O error occurred
Usually that means that input file is truncated and/or corrupted.

can you assist me in resolving this?




________________________________
From: K?re Hartvig Jensen <kare1234 at gmail.com>
To: FFmpeg user questions and RTFMs <ffmpeg-user at mplayerhq.hu>
Sent: Friday, 7 August, 2009 4:32:11 PM
Subject: Re: [FFmpeg-user] Need Solution for SWF to Jpeg conversion

Dear Manav,

On Thu, Aug 6, 2009 at 11:49 AM, Manav Arora<marora26 at yahoo.com> wrote:
> Issue: How to extract a JPEG file out of a SWF file?
>
> Please provide the solution for the same. At every post, there is only the issue and not the solution for it.

Contributing to the list generally increases the chances that your
question will be answered.

>
> I ran this command
> ffmpeg  -itsoffset -4  -i 241231.swf -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg

This command works for me using the input file
http://www.britarch.ac.uk/caf/uploads/TestSWF/garth.swf .
To extract the raw swf video, I ran

swfextract -i 1 garth.swf

(Swfextract is a part of the package swftools (see
http://linuxappfinder.com/package/swftoolsor www.swftools.org)).

Then, the command
ffmpeg  -itsoffset -4  -i output.swf -vcodec mjpeg -vframes 1 -an -f
rawvideo -s 320x240 test.jpg

generated a nice jpg picture.
>
> And it gave the following error:-
>
> FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
>  configuration: --enable-gpl --enable-postproc --enable-swscale --enable-avfilt
> er --enable-avfilter-lavf --enable-pthreads --enable-avisynth --enable-libfaac -
> -enable-libfaad --enable-libmp3lame --enable-libspeex --enable-libtheora --enabl
> e-libvorbis --enable-libxvid --enable-libx264 --enable-memalign-hack
>  libavutil     49.15. 0 / 49.15. 0
>  libavcodec    52.20. 0 / 52.20. 0
>  libavformat   52.31. 0 / 52.31. 0
>  libavdevice   52. 1. 0 / 52. 1. 0
>  libavfilter    0. 4. 0 /  0. 4.. 0
>  libswscale     0. 7. 1 /  0. 7. 1
>  libpostproc   51. 2.. 0 / 51. 2. 0
>
>  built on Mar 16 2009 16:09:18, gcc: 4.2.4 [Sherpya]
> Input #0, swf, from '241231.swf':
>  Duration: 00:00:32.66, bitrate: 31 kb/s
>    Stream #0.0: Audio: mp3, 22050 Hz, mono, s16, 32 kb/s

The problem seems to be, that according to ffmpeg, your swf file does
not contain a video stream. Normally, you would see something like:

Stream #0.0: Audio: mp3, 22050 Hz, mono, s16, 32 kb/s
Stream #0.1: Video: flv, yuv420p, 320x240, 12 tbr, 12 tbn, 12 tbc

Best Regards,
Kaare


> Output #0, rawvideo, to 'test.jpg':
> Output file #0 does not contain any stream
>
> Or sometimes it gives Compressed SWF format not supported error.
>
>
> Manav Arora
> ?
>
>
>      Love Cricket? Check out live scores, photos, video highlights and more. Click here http://cricket.yahoo.com
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
>



-- 
Best regards,

K?re Hartvig Jensen
M.Sc., Ph.d.-stipendiat
Theoretical Microfluidics Group
DTU Nanotech
Department of Micro- and Nanotechnology
Technical University of Denmark
Building 345 East
DK-2800 Kongens Lyngby
Denmark
Direct +45 45 25 57 42
Mobile + 45 22 31 52 41
kaare.hartvig.jensen at nanotech.dtu.dk
WEB (Work): http://www.nanotech.dtu.dk/microfluidics
WEB (Personal): http://www.hartvig.de
PGP key id: 0x0595E444
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
________________________________
 See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz.


      Looking for local information? Find it on Yahoo! Local http://in.local.yahoo.com/



More information about the ffmpeg-devel mailing list