ruffle icon indicating copy to clipboard operation
ruffle copied to clipboard

desktop cli: Is there a way to dump frames to raw video, à la `dump-gnash`

Open nthapaliya opened this issue 6 years ago • 8 comments

The (now defunct?) project gnash had a dump option in its cli which could play and dump some specified number of frames out to a raw video file. Could this functionality be implemented in the ruffle_desktop cli?

Possible use cases:

  • Mass generating thumbnails of flash movies
  • Mass convert old static SWF files to PNG serverside. I would dump out the first frame, then use imagemagick to convert it to whatever format I need.

nthapaliya avatar Jan 16 '20 17:01 nthapaliya

This might be easy when we add video playback in Ruffle, because we may be able to use the encoders along with the decoders.

In the meantime you may try my previous project Swivel, which is no longer maintained but might be able to fulfill your needs.

Herschel avatar Jan 16 '20 18:01 Herschel

Thanks for the tip, I'll take a look at that. I'd love to be able to to do it all from the commandline for scriptability.

nthapaliya avatar Jan 21 '20 04:01 nthapaliya

@nthapaliya is the new "export" tool enough for your needs here?

Dinnerbone avatar May 11 '20 08:05 Dinnerbone

I just ran the export tool. I'm really impressed, it works like a charm!

I would like to be able to specify a scale though, because the output (screenshot?) seems to be kind of small. Is there somewhere in the code that sets a default output size?

nthapaliya avatar May 11 '20 08:05 nthapaliya

Right now it's exporting at the size that the swf is set to, but you're right - we should add a custom resolution or scale option. Maybe a command line argument.

Dinnerbone avatar May 11 '20 08:05 Dinnerbone

Maybe a command line argument.

Yes, it would be best as a command line argument

nthapaliya avatar May 11 '20 16:05 nthapaliya

@nthapaliya Arguments for size just landed with #709 from the amazing @birktj. Does that work for you? If so, can we consider this closed now?

Dinnerbone avatar Jun 13 '20 21:06 Dinnerbone

Really nice! Thanks @birktj and @Dinnerbone

nthapaliya avatar Jun 15 '20 16:06 nthapaliya