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

Add egress image output #457

Merged
merged 13 commits into from
Sep 28, 2023
Merged

Add egress image output #457

merged 13 commits into from
Sep 28, 2023

Conversation

biglittlebigben
Copy link
Contributor

No description provided.


message ImageOutput {
uint32 capture_interval = 1; // in seconds (required)
int32 width = 2; // (required)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we default to either Track dimensions (for track/participant composite), or a fixed size? would simplify usage.

string filename_prefix = 4; // (optional)
ImageFileSuffix filename_suffix = 5; // (optional, default INDEX)
ImageCodec image_codec = 6; // (optional)
bool disable_manifest = 7; // disable upload of manifest file (default false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will images have a separate manifest too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. Currently, we upload one (identical) manifest per output (segment + file). For consistency, images should have their own, if we want a manifest for images.

There is a bit of a question of what a manifest for images should be. One option would be a manifest file uploaded at the end of the session with a summary of the session, similar to what we do for file/segments. More useful for images may be something closer to a m3u8 playlist: a file updated after each new image is uploaded that provides a list of all image filenames with their pts/time of the day. My initial idea when writing this proto file was the latter.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thinking out loud. per image manifest would allow them to identify the JPEGs in near-real-time, as opposed to waiting until it's over.

@@ -57,6 +57,11 @@ enum VideoCodec {
VP8 = 4;
}

enum ImageCodec {
DEFAULT_IC = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IC prefix is preferred

IC_DEFAULT
IC_JPEG

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that a prefix is cleaner. This is inconsistent with the current audio and video codec definitions though:

enum AudioCodec {                 
  DEFAULT_AC = 0;                       
  OPUS = 1;                                          
  AAC = 2;          
}                                                       
                           
enum VideoCodec {           
  DEFAULT_VC = 0;      
  H264_BASELINE = 1;                                                   
  H264_MAIN = 2;                          
  H264_HIGH = 3;          
  VP8 = 4;                                                                       
}    

Do we mind?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @boks1971 proposed prefixes after some of these are already in-use. So I think we can keep the newly adopted patterns without going back and changing everything else; since doing so may cause some breakage.

Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg, just proposing to clarify method naming

@@ -258,6 +286,12 @@ message UpdateStreamRequest {
repeated string remove_output_urls = 3;
}

message UpdateOutputsRequest {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdyt?

Suggested change
message UpdateOutputsRequest {
message UpdateImageOutputsRequest {

Copy link
Contributor Author

@biglittlebigben biglittlebigben Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial logic was that this message could be eventually used to update other kinds of output. If we don't forsee this happening, sure.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah understood.. yeah if we are going to use it for other outputs.. then what we have is better

@@ -36,6 +36,9 @@ service Egress {
// add or remove stream endpoints
rpc UpdateStream(UpdateStreamRequest) returns (EgressInfo);

// add or remove outputs
rpc UpdateOutputs(UpdateOutputsRequest) returns (EgressInfo);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rpc UpdateOutputs(UpdateOutputsRequest) returns (EgressInfo);
rpc UpdateImageOutputs(UpdateOutputsRequest) returns (EgressInfo);

@biglittlebigben biglittlebigben merged commit a73f47f into main Sep 28, 2023
1 check passed
@biglittlebigben biglittlebigben deleted the benjamin/egress_image_output branch September 28, 2023 22:01
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

Successfully merging this pull request may close these issues.

2 participants