Elastic transcoder(HLS): generating playlist based on original video

339 Views Asked by At

I am developing a service which converts uploaded video to hls stream using elastic transcoder. uploaded video can vary the resolution. I have to generate streams based on resolution of video.

for example if original video is full hd(1080p) then I want to generate 240p, 360p, 480p, 720p and 1080p streams but if original video is 360p then i want to generate only 2 streams 240p and 360p since it wont make sense to generate higher quality by stretching.

I am able to define presets to generate fixed length playlist. How can make is variable based on video.

One way could be to make different presets and parse video to read resolution then choose presets accordingly. could there be some better approach or something provided by transcoder?

thanks

0

There are 0 best solutions below