Menu

Beginner: Does open rokn it support subtitle ?

Glenn
2014-10-19
2014-10-31
  • Glenn

    Glenn - 2014-10-19

    Hi there,

    First of all, many many thanks to the developer or this open rokn.
    Im using it for my personal purpose as i have 3 roku at home.

    I do little understand the coding in the brs and have found something that may refer to how it handles the subtitle., but it does not seem to work.
    i have a working XML file already and is properly playing the video, displaying the pictures, etc.

    then i added an attribute called "subtitleurl" which points to the path of the subtitle.but it does not seem to display it. i ensured the path is correct and is the same name as with the mp4 video.

    I found the function "PlayAudioVideo" (see below) on Openrokn.brs which seems to have the function that supposedly gets the subtitle attribute, but i still couldn't get this to work.

    would someone have tips or lead me on how to get this to work. please?

    * EXCERPT XML FILE ****
    <item type="video" title="Naruto-382 " subtitleurl="http://server/videos/Naruto-382%20.srt" sdposterurl="http://server/thumbnail/naruto_250x320.jpg" hdposterurl="http://server/naruto_250x320.jpg" length="20" url="http://server/videos/Naruto-382%20.mp4" contentid="1234567890" streamformat="mp4">
    </item>

    **EXCERPT FROM OPENROKN.BRS ( Function PlayAudioVideo) *

    itype = getStringAttribute(xe, "type", false)
    title = getStringAttribute(xe, "title", true)
    ' new attribute in orml v1.2
    suburl = getStringAttribute(xe, "subtitleurl", true)
    if len(suburl) < 1 then
    ' added to maintain backwards compatibility with orml v1.1
    suburl = getStringAttribute(xe, "suburl", true)
    endif
    sdbifurl = getStringAttribute(xe, "sdbifurl", true)
    hdbifurl = getStringAttribute(xe, "hdbifurl", true)

     
    • johnnyviera

      johnnyviera - 2014-10-31

      In your XML file Under

      <item type="video" you need to add the next line
      suburl="http://www.yourserver.com/subdirectory/subsfile.srt"

      I added just before the line url="http://www.yourserver.com/videodirectory/video.mp4" and it worked fine for me

      Hope this helps.

       

      Last edit: johnnyviera 2014-10-31

Log in to post a comment.