Adaptive HLS for all media example

Archived from the Transloadit support forum. Originally posted on May 12, 2014; details may be outdated, see our docs for current behavior. Original thread

Hi,

Does the HLS robot automatically create the industry standard for adaptive HLS?

That would include iphone, ipad, android, low bandwidth web and high bandwidth web

0x240,0x288,0x360,0x432,0x480,0x576,0x720, 0x1080p
200k,420k,1000k,1400k,2000k,2600k,3400k, 5000k

Is it smart enough to only create versions based on input file resolution?
Eg if i send in a 720p video it will not upscale itself to 1080p

Thanks
John

Hi John,

We don’t have a dedicated HLS robot. However you can use the segment parameters of the video encode bot to achieve what you want.

We realise it’s a good idea if we make it easier to achieve what you are asking, but before we’ve come to a good abstraction, we can still help you flesh out the template that does this.

Would you like us to come up with an example?

Best regards,
Kevin

Definitely would love to have a base template with industry standard which i can use to save my time researching on the best bitrates and sizes

Thanks lots!

Hey John,

here is the template that should get you going in the right direction: https://gist.github.com/tim-kos/4e6814bb53b40a069b5f

Please keep in mind that it does not contain any store steps yet. You need to add them in order to persist your files.

Please let us know if we should explain any of this. I realize it’s a complicated template so you might need some help to fully understand it.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Hi Tim,

yes it is a pretty complicated template indeed. Could you help clarify some parts of it?

  1. Does it handle 4:3 (SD) files?
  2. What does “codecs”: “avc1.42001e,mp4a.40.34” mean?
  3. Is it necessary to create the full files (full/540, full/720 … ) before segmenting it?
  4. Why did you create a playlist for each segment instead of lumping it all into a master?
  5. Could you explain
    “relative_to”: “/segmented/270p/”, “use”: { “steps”: “export_segmented/270p”, “bundle_steps”: true }

export_segmented/xxx steps do not exist

  1. Will it upscale SD videos to 720p?

Maybe a blog post explaning your choices of why its done that way (and resolution / bandwith choices) would be really really helpful :slight_smile: Appreciate your time a lot!

John

Hi Tim,

I tried modifying the template and putting in the export steps but I am still not able to get it to do anything

Is there a way you could include something with all the steps including the s3/store
All i need to do is import a file and change the s3 credentials
At least i know where to move on from there

A HLS robot would help a lot actually..
Just specify resolutions, it spits out all the correct video streams inside a subfolder of the path .. and creates the playlist files for all of them and a master playlist file in the root

John

Hey John,

do you still need help here?

It’s hard to design a robot that does several things at once and relies on proper paths / dependencies between its results. That can actually be more confusing, especially if you do not have the usual use case that you describe.

Please contact me on Skype. My username is “transloadit_tim”. Then we can discuss where the documentation falls short and how we can improve there.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Hi guys,

Did you resolve this over Skype? I’ve also noticed there are more tickets about this subject, one I’ve just replied to. Let me know if this needs more attention.

Kind regards,
Kevin

We haven’t had that call yet… but

I have used a lot of guesswork and managed to get it to work. Till now i find it a little clunky
There are some things i cant fix on my own though.

http://support.transloadit.com/discussions/problems/15035-adaptive-hls-playlist-does-not-set-resolution-attribute

Could you help me resolve this?

Hi John,

Yes, I will close this ticket and continue in the one you mentioned. We’ll work this out!

Kind regards,
Kevin