Roku Direct Publisher

The easiest way to create a great TV experience.
cancel
Showing results for 
Search instead for 
Did you mean: 
newchannel
Level 7

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.
http://www.victoryNOWfilmsandtv.com
0 Kudos
22 Replies
mitchstein
Level 8

Re: How to play a list of videos in a row?

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..
0 Kudos
tim1607
Level 7

Re: How to play a list of videos in a row?

"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?
0 Kudos
newchannel
Level 7

Re: How to play a list of videos in a row?

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.
http://www.victoryNOWfilmsandtv.com
0 Kudos
newchannel
Level 7

Re: How to play a list of videos in a row?

"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.
http://www.victoryNOWfilmsandtv.com
0 Kudos
tim1607
Level 7

Re: How to play a list of videos in a row?

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"
            }
        ]
    }
}
0 Kudos
newchannel
Level 7

Re: How to play a list of videos in a row?

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.
http://www.victoryNOWfilmsandtv.com
0 Kudos
mitchstein
Level 8

Re: How to play a list of videos in a row?

#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)
0 Kudos
newchannel
Level 7

Re: How to play a list of videos in a row?

"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. 
http://www.victoryNOWfilmsandtv.com
0 Kudos
mitchstein
Level 8

Re: How to play a list of videos in a row?

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....
0 Kudos