Elastic Transcoder (HLS): Create a playlist based on original video

I am developing a service that converts an uploaded video to an hls stream using an elastic transcoder. the downloaded video may differ from the resolution. I have to generate streams based on video resolution.

For example, if the original video is full hd (1080p), then I want to generate 240p, 360p, 480p, 720p and 1080p streams, but if the original video is 360p, then I only want to generate 2 streams 240p and 360p, since that doesn't make sense to generate higher quality by stretching.

I can define presets to create a fixed length playlist. How to make a variable based on video.

One way is to make different presets and parse the video for reading, then select the presets accordingly. could there be some better approach or something provided by the transcoder?

thank

+3


source to share





All Articles