top | item 42258407

Generate video sprites using just FFmpeg

80 points| steelcm | 1 year ago |steelcm.com

24 comments

order

EE84M3i|1 year ago

Is it common to call these sprites in British English? I would call them "thumbnails".

wmf|1 year ago

The term "sprite" is mostly used in games. A single image file that contains multiple sub-images is called a "sprite sheet". (This reduces overhead compared to loading a large number of image files.) In this case they happen to be video thumbnails.

allenu|1 year ago

I'll admit I was expecting an explanation of how to extract sprites from retro video game footage using FFmpeg, which I can see totally being possible with a bit of work.

steelcm|1 year ago

Maybe thumbnail sprite sheet is a more accurate term? I would have thought thumbnail on it's own doesn't represent the fact we're stitching together all the thumbnails of the video into a single image.

bastloing|1 year ago

Back in the day a sprite was a smaller 2d bitmap you'd superimpose on the screen. A key frame was a marker like this.

smitelli|1 year ago

I’m trying to remember the name of a UI control that could be backed by something like this. It was a sequence of thumbnails laid out in a row like a film strip. (For all I know, that was what it was called.)

wslh|1 year ago

Yes, and the sprites were supported by a specific coprocessor. For example, the Apple II didn't have one.

montroser|1 year ago

A long time ago, we used this approach to play videos at 15 fps in IE6, with no flash or realplayer plugins required! No sound though...

jvan|1 year ago

I've used vcs[0] to make contact sheets from videos. It has a nice feature that if it detects the frame is blacked out, it will shift the capture time so every frame on the sheet has something to look at. Easy syntax to set capture at every delta or capture x number of frames evenly distanced, columns per row, ignore a set length of end time, and frame size.

[0] https://p.outlyer.net/vcs

steelcm|1 year ago

This sounds like a more robust tool, however I wanted to keep our external tooling to a minimum. The contact sheet generation sits as part of our transcoding pipeline for uploaded media which already uses ffmpeg.

kookamamie|1 year ago

A "sprite" is commonly understood to have no background, so I'd say these are closer to thumbnails.

brokenmachine|1 year ago

I wish there was some way to get vlc to use external sprite files.

While I'm thinking about it, external chapter files would be great too. Then you could make your own bookmarks without modifying the video file.

lofaszvanitt|1 year ago

I get chills every time I watch this open source video. I don't know who created these mongrel creatures, but it's worse than a horror flick.

pdyc|1 year ago

interesting will probably integrate as sprite mode in my ffmpeg video editor https://newbeelearn.com/tools/videoeditor/

steelcm|1 year ago

We're using this method as part of our user media upload pipeline at editsquare.com I'm guessing you're using ffmpeg wasm on your editor? One thing to note, that I didn't mention in the article, is generating a JPEG output is substantially quicker than a PNG.