Your Digital Media Has Never Looked So Good

 
User avatar
atc98092
Topic Author
Posts: 3248
Joined: Tue Dec 31, 2013 5:09 pm
Location: Auburn, WA

Can I use Direct Publisher to connect to an internal server

Mon Dec 31, 2018 6:55 pm

I want to attempt to build a channel to connect to a Serviio DLNA server. While the Roku Media Player works fine via DLNA, Serviio also offers an API for direct connection. I was thinking something along the lines of a Plex or Emby channel, only Serviio is the media source. I tried walking through the DP setup page, but it seems to want to connect to something that is available on the Internet, rather than a server on my internal network. While it would be possible to make this channel work across the Internet, I want to start with the internal connection first.
.
I've been over the Brightscript documentation, and other docs on the Roku developers site, but can't seem to find where to start. I don't know if Direct Publisher supports what I'm looking for, or if I need to program directly with Brightscript, using Eclipse as the IDE. 
.
I have some programming background, but not with this specific language. Can someone help me out with a starting point? The Serviio API is described as follows: Serviio API

Serviio REST interface is powered by Restlet. It exposes server functionality to the clients via a combination of HTTP and XML or JSON protocols.

Serviio CDS API supports both, XML and JSON languages for the REST protocol via content negotiation mechanism. XML is the default format but the client should still specify Accept HTTP header with value application/xml. JSON format will be used with the header's value of application/json. The same values should be used for Content-Type HTTP header when submitting data in the request body (POST and PUT methods).
Dan
Nvidia Shield, Roku Stick (2016), and Ultra (2016), Insignia Roku TV, Sharp 4K Roku TV, Windows 10 Pro x64 running Serviio and Plex on a wired Gigabit network. Samsung JU7100 4K TV, Yamaha RX-V583, CenturyLink DSL
 
tim1607
Posts: 29
Joined: Sat Jun 03, 2017 4:53 pm

Re: Can I use Direct Publisher to connect to an internal server

Tue Jan 01, 2019 2:21 pm

I'm no expert, but a JSON or XML has to be generated for Direct Publisher to work no matter what your server is. I'm not familiar with "Serviio DLNA server" but DP only works with JSON and XML files. As long as the server can serve up HTTP protocol you should be good.
What is generating the XML files for your channel?  What does that look like?  If this is just being hosted locally then it should work but the json still has to be there.

I know that's not very helpful, but can you give some additional information about the links that are being provided?  The API is probably not going to be an option for a DP channel. I still haven't figured out Brightscript or the SDK enough to help with getting that up and going.  (If there are anybody who can provide some insight on that it would be AWESOME.)
 
User avatar
atc98092
Topic Author
Posts: 3248
Joined: Tue Dec 31, 2013 5:09 pm
Location: Auburn, WA

Re: Can I use Direct Publisher to connect to an internal server

Tue Jan 01, 2019 4:05 pm

tim1607 wrote:
I'm no expert, but a JSON or XML has to be generated for Direct Publisher to work no matter what your server is. I'm not familiar with "Serviio DLNA server" but DP only works with JSON and XML files. As long as the server can serve up HTTP protocol you should be good.
What is generating the XML files for your channel?  What does that look like?  If this is just being hosted locally then it should work but the json still has to be there.

I know that's not very helpful, but can you give some additional information about the links that are being provided?  The API is probably not going to be an option for a DP channel. I still haven't figured out Brightscript or the SDK enough to help with getting that up and going.  (If there are anybody who can provide some insight on that it would be AWESOME.)

Appreciate the reply. From the Serviio API documentation page, it does support an HTTP via JSON or XML. This is the result of the application.xml file from the server:
<application>
[color=#000000][size=100][font=monospace]<version>1.10.1</version>
<edition>PRO</edition>
<license>
<id>license data removed</id>
<type>NORMAL</type>

</license>
<databaseUpdateId>1342370f144244a9b2e8306872265deb</databaseUpdateId>
<cdsAnonymousEnabled>false</cdsAnonymousEnabled>
<serviioId>KwzJibMYKq</serviioId>
[/font][/size][/color]
</application>

The API is server based, so it isn't something the player has to have installed. The API is what generates the XML files. Like I said, I'm a complete newbie when it comes to Brightscript and Roku programming. If I could understand how to make that initial connection (and probably have to build a connection screen for user input for server URL and password), I should be well on the way to get the basic functionality.
Thanks!
Dan
Nvidia Shield, Roku Stick (2016), and Ultra (2016), Insignia Roku TV, Sharp 4K Roku TV, Windows 10 Pro x64 running Serviio and Plex on a wired Gigabit network. Samsung JU7100 4K TV, Yamaha RX-V583, CenturyLink DSL
 
tim1607
Posts: 29
Joined: Sat Jun 03, 2017 4:53 pm

Re: Can I use Direct Publisher to connect to an internal server

Tue Jan 01, 2019 7:53 pm

That's kind of what I was expecting to see.
With DP, I don't believe that will work.
Check out the DP specifications at this webpage
The JSON snippet from my channel that does work with DP looks like:
{
  "providerName": "This can be pretty much anything.",
  "language": "en-US",
  "lastUpdated": "2018-07-27T23:46:13+00:00",
  "shortFormVideos": [
    {
      "id": "1001",
      "title": "Name of videos",
      "shortDescription": "This would be a short description of the video that you want folks to know. ",
      "thumbnail": "http://domainname.com/path_to_thumbnail_image.jpg",     
'If you have an internal address this can also be an IP address.'
      "genres": [
        "comedy"  
'this has to be from the list of genres that roku supports'
      ],
      "tags": [
        "the60s"  
'this is how to identify specific playlists or ways that you want videos to play back'
      ],
      "releaseDate": "1960-07-24",
      "content": {
        "dateAdded": "2018-07-21T14:14:54.431Z",
        "captions": [],
        "duration": 105,  
'this is in seconds'
        "adBreaks": [
          "00:00:00"
        ],
        "videos": [
          {
            "url": "http://ip_address_or_domain_name.com/path_to_video.mp4",
            "quality": "HD",
            "videoType": "MP4"
          }
        ]
      }
    },
  ],
  "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"
    },
    {
      "name": "1960 to 1969",
      "query": "the60s",
      "order": "chronological"
    },
  ]
}

That format, at least for a JSON, is pretty much non-negotiable. The order can of course change but all of that has to be there.

XML will of course look pretty different but it is still going to need everything listed in this URL for the XML (MRSS) Feed specs
https://github.com/rokudev/feed-specifications/blob/master/mrss-feed-specification.md
{
    "providerName": "Acme Productions",
    "lastUpdated": "2015-11-11T22:21:37+00:00",
    "language": "en",
    "categories": [
        ...
    ],
    "playlists": [
        ...
    ],
    "movies": [
        ...
    ],
    "series": [
        ...
    ],
    "shortFormVideos":  [
        ...
    ],
    "tvSpecials": [
        ...
    ]
}


      <adBreaks>00:00:00</adBreaks>
      <videos>
        <url>http://ipaddress_or_domainname.com/path-to-video-file.mp4</url>
        <quality>HD</quality>
        <videoType>MP4</videoType>
      </videos>
    </content>
  </shortFormVideos> 
<categories>
    <name></name>
    <query></query>
    <order>chronological</order>
  </categories>
  <categories>
    <name></name>
    <query></query>
    <order>chronological</order>
  </categories>
</root>

When publishing with Direct Publisher feeds, it takes the guess work out of it, just follow the abc's. It is also something that doesn't allow for a lot of creativity and there isn't really anything that you can add to the basics.  To use the SDK there is much more flexibility but that learning curve is crazy steep for somebody like me, who has trouble getting the basic concepts of programming.
Your FeedURL is going to be just that, a URL that points to either the json or xml.  There is a WordPress plugin called WP-SmartTV which some folks have had some really good results.  It is published by Rovidx Media.
May the Roku DP be with you.
 
User avatar
atc98092
Topic Author
Posts: 3248
Joined: Tue Dec 31, 2013 5:09 pm
Location: Auburn, WA

Re: Can I use Direct Publisher to connect to an internal server

Wed Jan 02, 2019 8:55 am

Thanks. Looking like Direct Publisher isn't going to work. Using Brightscript in the Eclipse IDE is comfortable, as it resembles working with Visual Basic all those years ago. Just have to learn a whole new language. :lol: Fortunately it's similar enough to what I've used in the past, so I can at least follow most of the processes. 
Dan
Nvidia Shield, Roku Stick (2016), and Ultra (2016), Insignia Roku TV, Sharp 4K Roku TV, Windows 10 Pro x64 running Serviio and Plex on a wired Gigabit network. Samsung JU7100 4K TV, Yamaha RX-V583, CenturyLink DSL

Who is online

Users browsing this forum: No registered users and 2 guests