Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
streamingguy
Visitor

MP4 or HLS for VOD?

Hello,

We have several movie DVDs, which we want to stream on ROKU as VOD. We tried with HLS, but got few issues.

1. Many encoders are not supporting encoding directly/importing source from DVDs.
2. All of our DVDs have few seconds of silence at the beginning. Due to this, all the encoders are not creating audio track. We tried with Digital Rapids, Sorenson Squeeze, Rhozet etc.,
3. Not able to find suitable encoder to use AC3/surround sound as audio output in HLS stream.
4. When we fast forward the stream, some times the video will stuck, but the audio will continue. After few seconds, both audio & video will sync and everything looks good. We do not have any audio only streams.

If I go with multiple bitrate MP4, we got several small DVD to MP4 software, which are accepting DVD source and without audio issue (#2).

Also, I can include AC3 audio in MP4 files.

So, is it good to use multiple bitrate MP4 files instead of HLS for VOD streaming?

I see only one disadvantage - If you want to provide streaming of certain part of a DVD, you need to re-encode only that particular part again (Just like a song/scene/chapter from DVD). In case of HLS, we can prepare a custom .m3u8 and play only that particular part.

If I use "StreamStartTimeOffset" / "PlayStart" options, will I get the above functionality with MP4?

Please let me know your suggestions and let me know if you find any good encoder which supports DVD import/HLS segmenting/without audio issues.

Thank you for your time!
0 Kudos
6 REPLIES 6
RokuMarkn
Visitor

Re: MP4 or HLS for VOD?

Generally MP4 works fine for VOD content. HLS supports live streaming while MP4 doesn't. If you're not streaming live streams, MP4 should be fine. You can use PlayStart and PlayDuration to play a section of an MP4.

--Mark
0 Kudos
streamingguy
Visitor

Re: MP4 or HLS for VOD?

Hello Mark,

Thank you so much for your quick reply!

I have encoded my source into normal MP4 and I am able to stream part of the content using PlayStart and PlayDuration. Got few more questions:

1. While playing, if I use FF/REV, I am able go beyond the defined segment. Do we need to set other settings to restrict the user even on FF/REV?

2. Also, do we need to take any special instructions for encoding/hosting to support PlayStart/PlayDuration?

3. If I want to simulate playlist/Play All feature (playing two segments continuously from different MP4 files), will it display buffering screen in between two segments (similar to the buffering screen while loading individual item)? If so, is it possible to avoid the buffering and make it to appear as single continuous stream?

Thank you so much for your time!
0 Kudos
RokuMarkn
Visitor

Re: MP4 or HLS for VOD?

1. I'm not sure if you can restrict trickplay to a section of the file. Most apps that use this feature disable FF/REW. It would probably be better if seeking were restricted to the range specified. I'll file an enhancement request for this.

2. You don't have to do anything special, although remember that you can only seek to an I-frame. If you have certain critical seek points you should make sure that they each line up with an I-frame.

3. There will be buffering between the segments. There's no way to avoid this other than to encode the content as one stream.

--Mark
0 Kudos
streamingguy
Visitor

Re: MP4 or HLS for VOD?

Hello Mark,

Thank you so much for your prompt reply. I will disable the trick play for time being. Also, thank you for considering this feature for enhancements list.

Another question - Will "StreamStartTimeOffset" works fine, if I have DVR enabled on my streaming server? I am looking for time shifted streaming and enabling 3 hours of DVR on my streaming server.

So, for EST users, the stream will be live. For PST users, I want to use "StreamStartTimeOffset" to set their starting point on the stream, which is EST - 3. I will be disabling trick play for this stream.

Thank you
0 Kudos
TheEndless
Channel Surfer

Re: MP4 or HLS for VOD?

"RokuMarkn" wrote:
... Most apps that use this feature disable FF/REW ...

How do you disable FF/REW on the roVideoScreen?
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
RokuMarkn
Visitor

Re: MP4 or HLS for VOD?

"TheEndless" wrote:
How do you disable FF/REW on the roVideoScreen?


SetPreviewMode(true). The documentation could be clearer about this.

--Mark
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.