Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

export thumbnails of swf/flv

New Here ,
Oct 21, 2011 Oct 21, 2011

Hi

I have to deliver thumbnails along with SWFs to an asset management tool.

Using Adobe Bridge (CS4) I can see previews of selected SWF files but can't see how to export them.

I tried the BridgeExportToJpegCS4 extension which works well for images but got an error for an SWF test file I have.

"Error: Could not obtain a valid bitmap to export."

I'm not sure I'm using the correct application but open to other suggestions.

Any ideas?

Also, I'd appreciate if there are any suggestion on how to extract the thumbnails and XMP metadata programmatically.

I'm a java developer and hoping I could automate this process for users through an SDK or by calling a utility.

Regards,

Carmine

TOPICS
Scripting
2.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Oct 21, 2011 Oct 21, 2011

From a quick google search I found this...

http://www.eltima.com/products/swf-live-preview/

It looks as this might be able to create thumbnails.

Translate
Valorous Hero ,
Oct 21, 2011 Oct 21, 2011

See http://forums.adobe.com/thread/852571?tstart=30 for an idea of sizes available.

Here is an example of getting a thumbnail and saving it on the desktop....

#target bridge

var thumb = app.document.selections[0];

var sourceBitmap = undefined;

app.synchronousMode = true;

sourceBitmap = thumb.core.thumbnail.thumbnail; //smallest

//sourceBitmap = thumb.core.preview.preview; //next size

app.synchronousMode = false;

if( !sourceBitmap || sourceBitmap.width == undefined || sourceBitmap.width == 0 ){

    alert("Unable to get bitmap");

    }else{

var Name = decodeURI(thumb.spec.name).replace(/\.[^\.]+$/, '');

var exportFile = new File( Folder.desktop + "/" + Name + "-thumb.jpg" );

sourceBitmap.exportTo( exportFile,  100);

}

There are many examples of extracting metadata and it might be best to look at some of them, also download the sdk where you will find all the documentation and examples.

http://www.adobe.com/devnet/bridge.html

If it looks a bit complex you could use ExifTool http://www.sno.phy.queensu.ca/~phil/exiftool/ as an alternative.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2011 Oct 21, 2011

Hi Paul

Thanks for the snippet.  Except for the menu item addition, I added it as is to Bridge but got the alert error.

"Unable to get bitmap"

I also tried to comment out the thumbnail code and uncomment the preview but still no good.

I'll try to break up the if tests to see if I can nail down if there is no bitmap or if the width is 0;

Other suggestions?

Regards

Carmine

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 21, 2011 Oct 21, 2011

I would try ExifTool and see if that can extract a thumbnail

exiftool -b -ThumbnailImage MyPhoto.swf>MyThumb.jpg

If Exiftool can't extract a thumbnail, one doesn't exist.

Apart from this I'm out of suggestions as I don't use this type of file.

All the very best Carmine and good luck with the project.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2011 Oct 21, 2011

For a baseline, I used exiftool on a jpg file and it worked but on my swf it created a 0 byte file.

I guess a thumbnail doesn't exist for the files we have which changes the quest to see if a thumbnail can even be expected from swf.

Many Thanks for the help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 21, 2011 Oct 21, 2011

From a quick google search I found this...

http://www.eltima.com/products/swf-live-preview/

It looks as this might be able to create thumbnails.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2011 Oct 21, 2011
LATEST

Now that worked liked a charm.  The tool is a little short on an interface but it works great and its free.

It appears as if swf-live embeds a thumbnail into the swf.  Then I used your script to export the thumbnail from bridge without error.

Thanks again Paul.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines