swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] Extracting images from swf (version 8 swf vs versi


From: Ryder Wright
Subject: Re: [Swftools-common] Extracting images from swf (version 8 swf vs version 10)
Date: Sun, 9 Oct 2016 11:38:20 -0700

Ah, I think I've answered my own question (posting the result in case it is
useful for anyone else)

# See what objects exist in the SWF file

% swfextract b.swf
Objects in file b.swf:
 [-i] 1 MovieClip: ID(s) 3
 [-F] 1 Font: ID(s) 2
 [-b] 1 Binary: ID(s) 1
 [-f] 1 Frame: ID(s) 0

# Extract out the MovieClip
% swfextract -i 3 b.swf -o b-3.swf

# See what is in the MovieClip
% swfextract b-3.swf
Objects in file b-3.swf:
 [-i] 1 MovieClip: ID(s) 3
 [-f] 1 Frame: ID(s) 0

% ls -l b*.swf
-rw-r--r--  1 wmh  eng      53 Oct  9 11:24 b-3.swf
-rw-r--r--  1 wmh  eng  115136 Oct  9 10:17 b.swf

>From the size of the b-3.swf file, it is not storing any actual data.

# See what is in the Binary object:

% swfextract b.swf -b 1 -o b-1.bin
% file b-1.bin
b-1.bin: Macromedia Flash data, version 9
% mv b-1.bin b-1.swf
% ffmpeg -i b-1.swf -f image2 -vcodec png -r 30 k%02d.png

Success!











On Sun, Oct 9, 2016 at 11:12 AM, Ryder Wright <address@hidden> wrote:

> Hi all,
>
> I have a collection of swf files, some of which are version 8 and some are
> version 10. I want to create animated gifs from these files.
>
> I've established that I can obtain a collection of images from the version
> 8 swfs using:
>   % ffmpeg -i $swf -f image2 -vcodec png -r 30 i%02d.png
> but when the above is invoked on version 10 swfs, I get an error:
>   could not find codec parameters
>
> So, this brings me back to first principles, learning how to extract the
> images using swfextract.
>
> When I invoke 'swfextract' on a version 8 image, I get something like:
>
> % swfextract a.swf
> Objects in file a.swf:
>  [-i] 6 Shapes: ID(s) 2, 5, 9, 11, 13, 16
>  [-i] 2 MovieClips: ID(s) 10, 17
>  [-f] 1 Frame: ID(s) 0
>
> I understand that I can extract the shapes and movieclips, but if they are
> just nested .swf files, how to I ever get to an actual png or jpg file?
> For version 8 files, this wasn't a problem for me because ffmpeg was doing
> what I wanted.
>
> When I invoke 'swfextract' on a version 10 image, I get something like:
>
> % swfextract b.swf
> Objects in file b.swf:
>  [-i] 1 MovieClip: ID(s) 3
>  [-F] 1 Font: ID(s) 2
>  [-b] 1 Binary: ID(s) 1
>  [-f] 1 Frame: ID(s) 0
>
> No shapes, just a single MovieClip (and a Font).
> How can I extract out png files?
>
> Any thoughts on why ffmpeg works for version 8 swf files but not version
> 10 files?
>
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]