How to play a list of videos in a row?

Can someone lead me in the right direction? I am looking for information on how to code a list of videos in json, one right after the other in continuous play ie: pseudo live tv is best way I know to describe.

I am able to do this with xml in my sdk channels. But with json and DP, I have no idea.

Thanks.

just make a text file that contains a list of files to play and give it the extension .m3u then point the json file at m3u file and it will play them in order. It also can be updated onthefly..

For instance:

playlist.m3u:

inside that file is just

c:\videos\video1.mp4
c:\videos\video2.mp4

and you can have as many lines as you want and you can keep adding lines as you need… It’s actually how unreal media server does rmtp feeds to IIS and HLS..

“mitchstein” wrote:
just make a text file that contains a list of files to play and give it the extension .m3u then point the json file at m3u file and it will play them in order. It also can be updated onthefly..

For instance:

playlist.m3u:

inside that file is just

c:\videos\video1.mp4
c:\videos\video2.mp4

and you can have as many lines as you want and you can keep adding lines as you need… It’s actually how unreal media server does rmtp feeds to IIS and HLS..
Hi Mitchstein,
I tried doing this with a DP channel and it didn’t work.
My text file was saved as playlist.m3u and looks like this:
http://mydomain.com/rokufiles/videos/video1.mp4
http://mydomain.com/rokufiles/videos/video2.mp4
http://mydomain.com/rokufiles/videos/video3.mp4
I am wondering what I have left out? Should there be comma’s after each video? Should they be surrounded with quotes? Have you gotten this to work with a public facing channel?

Thank you. Good to know it can be done. I will have to try this. I’ll be watching the thread to further learn how to get it working.

Thanks much.

“tim1607” wrote:

“mitchstein” wrote:
just make a text file that contains a list of files to play and give it the extension .m3u then point the json file at m3u file and it will play them in order. It also can be updated onthefly..

For instance:

playlist.m3u:

inside that file is just

c:\videos\video1.mp4
c:\videos\video2.mp4

and you can have as many lines as you want and you can keep adding lines as you need… It’s actually how unreal media server does rmtp feeds to IIS and HLS..
Hi Mitchstein,
I tried doing this with a DP channel and it didn’t work.
My text file was saved as playlist.m3u and looks like this:
http://mydomain.com/rokufiles/videos/video1.mp4
http://mydomain.com/rokufiles/videos/video2.mp4
http://mydomain.com/rokufiles/videos/video3.mp4
I am wondering what I have left out? Should there be comma’s after each video? Should they be surrounded with quotes? Have you gotten this to work with a public facing channel?
Hi Tim,
Did you get yours to work? I’m going to attempt it.

I got it to work, but I didn’t use the playlist file that was suggested.
My DP channel has the “Hero” layout.
The top row is “Featured” and I have put the tag of “featured” on 7 or 8 of the songs on my channel
The next row is titled “Play them All” and it allows the full list of songs to play through. Then I have songs from the 50’s, 60’s and so on.
My categories are listed at the bottom of the JSON file and they look like this:

“categories”:
[{“name”:“Featured”,“query”:“featured”,“order”:“most_popular”},
{“name”:“Play them all”,“query”:“pre50 OR the50s OR the60s OR the70s OR pre2000 OR post2000”,“order”:“most_popular”},]

It does take a few seconds for the next song to start because there isn’t a way to “prebuffer” them using direct publisher, but it does play the full list of about 50 songs because is has all of the categories that I use.
Until I get the SDK figured out, I’m almost there with that, that’s what I’m sticking with.

This is an example of the video specifics :
{
“id”: “1045”,
“title”: “title”,
“shortDescription”: “A short description of the video”,
“thumbnail”: “http://domainlink_to_the_image/unknow.jpg”,
“genres”: [
“comedy”
],
“tags”: [
“the60s”, “featured”
],
“releaseDate”: “1965-07-07”,
“content”: {
“dateAdded”: “2018-08-12T14:14:54.431Z”,
“captions”: ,
“duration”: 152,
“adBreaks”: [
“00:00:00”
],
“videos”: [
{
“url”: “http://domainlink_to_the_video/videoname.mp4”,
“quality”: “HD”,
“videoType”: “MP4”
}
]
}
}

I have a couple of channels with DP that I have with json like yours. I’m hoping I can figure out how to play a list of videos from my server and have only one “live” channel without having categories ie: the channel open and begin playing the playlist.

#EXTM3U
#EXT-X-TARGETDURATION:69999 (maximumduration of a file)
#EXT-X-MEDIA-SEQUENCE:43031 (files must be named by sequential numbers)
#EXTINF:250, (the 5 represents how many seconds long the file should play, must be less then the targetduration above)
http://www.tvbydemand.com/live/hls/uliv … 043031.mp4
#EXTINF:260,
http://www.tvbydemand.com/live/hls/uliv … 043032.mp4

that is an .m3u8 playlist file..
(it won’t play now because my songs rotate hourly)

“mitchstein” wrote:
#EXTM3U
#EXT-X-TARGETDURATION:69999 (maximumduration of a file)
#EXT-X-MEDIA-SEQUENCE:43031 (files must be named by sequential numbers)
#EXTINF:250, (the 5 represents how many seconds long the file should play, must be less then the targetduration above)
http://www.tvbydemand.com/live/hls/uliv … 043031.mp4
#EXTINF:260,
http://www.tvbydemand.com/live/hls/uliv … 043032.mp4

that is an .m3u8 playlist file..
(it won’t play now because my songs rotate hourly)
Hi Mitch,
So what you sent would be saved on my server as a file with the list of the mp4 videos?
For DP json file link that has to be added, what changes in the json for the channel to open on roku without categories but just to open and begin playing?
Thanks again. Appreciate you being in this form. You are a lot of help to people.

that the contents of the playlist file… then just point the url in the json file to the m3u8 file instead of the mp4 file..
also mke sure your webserver has the proper mime types for m3u8 extensions.

http://help.encoding.com/knowledge-base … deo-files/

that url lists them all.. I know IIS 7 and 8 do not come configured properly for m3u8…

Your welcome I try to help everyway I cn.. it’s why we built the internet, to freely exchange ideas!! of course it’s been perverted into making money as well…

“mitchstein” wrote:
that the contents of the playlist file… then just point the url in the json file to the m3u8 file instead of the mp4 file..
also mke sure your webserver has the proper mime types for m3u8 extensions.

http://help.encoding.com/knowledge-base … deo-files/

that url lists them all.. I know IIS 7 and 8 do not come configured properly for m3u8…

Your welcome I try to help everyway I cn.. it’s why we built the internet, to freely exchange ideas!! of course it’s been perverted into making money as well…
Thanks again. It was people like you that were a big help to me when I first started building my channels. Sometimes it feels like information is held “top secret”. I can understand that since building channels is what many of them do for a living but it sure does make it harder to learn.
Using your suggested way of a having a playlist file and that playlist file being coded into the json via url, does this mean that an ad network link for monetization will still fire off the ads at the ad breaks? The ad breaks of course are coded into the json file but I just wondered if the videos would play “pseudo live tv” and then the ad breaks would kick in and go back to playing the playlist where it left off? Or, would it start again at the first video in the playlist after the ad breaks end and videos not resume where it left off?

it should just pause the list play the ad and return.. but that is controled by the code in DP. So hopefully roku keeps it that way..

“mitchstein” wrote:
it should just pause the list play the ad and return.. but that is controled by the code in DP. So hopefully roku keeps it that way..
okay, thanks.

well it’s my theory that there are too many “developers” and they can’t (roku staff) keep up with all the questons, so they leave it up to the forums and only the ones that really want it get it to work. So being someone who was developing software before the web existed and a true believer in “free exchange of ideas and information” I do my best to help everyone out. And I keep all my services 100% free…

“mitchstein” wrote:
well it’s my theory that there are too many “developers” and they can’t (roku staff) keep up with all the questons, so they leave it up to the forums and only the ones that really want it get it to work. So being someone who was developing software before the web existed and a true believer in “free exchange of ideas and information” I do my best to help everyone out. And I keep all my services 100% free…
You’re amazing. Don’t go anywhere lol stay in the forum please :slightly_smiling_face:

“mitchstein” wrote:
just make a text file that contains a list of files to play and give it the extension .m3u then point the json file at m3u file and it will play them in order. It also can be updated onthefly..

For instance:

playlist.m3u:

inside that file is just

c:\videos\video1.mp4
c:\videos\video2.mp4

and you can have as many lines as you want and you can keep adding lines as you need… It’s actually how unreal media server does rmtp feeds to IIS and HLS..
Hi,
Tim in the forum here was helpful in posting two great files to look at for scenegraph. I’m the process of migrating my channels over from the old sdk. I’m wondering if one of the files he sent can possibly be used with a playlist m3u that links to a list of video files? If you get time to take a look at it, review the “videoscene.xml” in the components folder. I’m thinking a link to a playlist can be placed there and that playlist then refer to the video files to play them in a row using scenegraph. In the old sdk it was called rourltransfer. There is a different name for it with scenegraph. I can’t recall what it’s called right now.
https://sdkdocs.roku.com/download/attac … 110&api=v2

Do all of the videos in a playlist need to be encoded the same? I can get 2 videos to play but the 3rd one stops.

I would believe so.. I always encode with the same settings for all my videos. So I never tried with different settings..

“mitchstein” wrote:
I would believe so.. I always encode with the same settings for all my videos. So I never tried with different settings..
I was able to get my list to play. Now I’m trying to find a way to loop when it gets to the end. I tested the playlist in one of the scenegraph samples.
Thanks for the info.

can’t you just add the playlists file name as the last item in the playlist to make it loop forever?
I never tried it so… but it is logical..