Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a frame extraction appliance #64

Open
slifty opened this issue Oct 18, 2020 · 2 comments
Open

Create a frame extraction appliance #64

slifty opened this issue Oct 18, 2020 · 2 comments

Comments

@slifty
Copy link
Member

slifty commented Oct 18, 2020

Task

Description

The appliance should take STREAM.CONTAINER payloads and spit out frames as png files.

The appliance should allow the user to specify the number of frames per second.

Question

We need to decide whether the resulting frames are (A) written to disk or (B) emitted directly as part of the payload.data or (C) some flavor of both.

This question has deeper implications, since this will set a precedent for all kinds of appliances that generate self contained outputs. For instance, will the SRT appliance (#58) write to a file? What about an appliance that generates gifs from these extracted frames? Etc.

Similarly, what about appliances that, for instance, burn captions onto a keyframe? Or highlight something about that keyframe? Should those appliances write directly to disk?

To be clear: we do ultimately want the ability to write to a disk. The question is simply whether that should be:

  1. An appliance configuration (e.g. "please store a copy of each image this appliance generates")
  2. If the TVK implementation should handle the logic for writing to disk (i.e. countertop.on('data', (payload) => write image payloads to disk)
  3. If we should create appliances whose sole purpose is to record various types of data (e.g. ImageRecorderAppliance which can be added to a topology and instructed to record certain types of output from certain stations in certain ways)

I'm leaning into the idea that, at least for now, appliances should never write to the file system (unless they need to internally).

This means that TVK implementations would be responsible for writing files however / wherever they would like, which gives them full control over things like naming, location, etc.

@slifty
Copy link
Member Author

slifty commented Oct 19, 2020

This is going to ultimately use ffmpeg -- something like the commane in this superuser question.

@slifty
Copy link
Member Author

slifty commented Oct 21, 2020

This tool splits up an ffmpeg png stream: https://github.com/eugeneware/png-split-stream

slifty added a commit that referenced this issue Jan 29, 2021
The video-image-extractor appliance will take a video stream and split
it into individual pngs.

Issue #64
slifty added a commit that referenced this issue Jan 29, 2021
We're going to use ffmpeg to convert a video stream into a stream of png
data.  This package will take that stream of pngs and split them into
independent chunks of data.

Issue #64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant