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: 
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

I forgot that I created that. It was before I decided git was taking up far more time than it was saving. I got tired of all the failed merges that left my repository in some screwed up state that took hours to fix. As you noticed, that fork is hopelessly out of date. It's the 'channel' branch from netguy204 that I'm pretty sure is the latest version on github.

There's still the problem of updating the channel on the Roku side. I'm sure I can get together with el.wubo to sort it out, but as I said I won't be doing that for a few weeks. I could probably create patches for the affected files or just create a full zip and post it somewhere, but you'd have to either side-load the channel or create your own private channel. I don't have a lot of time to put into this right now and if I'm on the forums you can bet I really should be doing something else.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

"raghu1111" wrote:
BIF files are pretty straight fwd to create. There is nice python script at https://bitbucket.org/bcl/homevideo/src ... makebif.py (part of 'homevideo' project) that uses ffmpeg to create jpegs. I have tried it and FF and REWIND are so much better with these.

Wow! I'm not sure I'd call that code straightforward. My method looks pedestrian in comparison. I could have used that
getMP4Info function a while back.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
raghu1111
Visitor

Re: My Media - Your Music and Video on the Roku DVP

"renojim" wrote:

Wow! I'm not sure I'd call that code straightforward. My method looks pedestrian in comparison. I could have used that
getMP4Info function a while back.

🙂 I meant straightforward to use. The current script does not actually use getMP4Info.
0 Kudos
raghu1111
Visitor

Re: My Media - Your Music and Video on the Roku DVP

"renojim" wrote:
There's still the problem of updating the channel on the Roku side. I'm sure I can get together with el.wubo to sort it out, but as I said I won't be doing that for a few weeks. I could probably create patches for the affected files or just create a full zip and post it somewhere, but you'd have to either side-load the channel or create your own private channel. I don't have a lot of time to put into this right now and if I'm on the forums you can bet I really should be doing something else.

no pressure! understood.
It does not need to be on the channel.. it might be better for some users to test it before it goes on the channel anyway,
When you get some time I hope you can post the code you have some where so that others can use it (just a zip file might do).
I am interested in getting BIF to work. may be its time for me to look at the client side as well.
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

"raghu1111" wrote:
I am interested in getting BIF to work. may be its time for me to look at the client side as well.

How's that saying go? Warning - there be dragons. I think the only changes were to dataModel.brs.

My personal version has diverged a bit from the github version, so I always have to strip out my experimental stuff before manually merging with the "public" version. I'll see what I can do in the next day or two. No promises.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
raghu1111
Visitor

Re: My Media - Your Music and Video on the Roku DVP

"renojim" wrote:

How's that saying go? Warning - there be dragons. I think the only changes were to dataModel.brs.

yep :). I took more time to figure out what to change in datamodel.brs. It needs server support as well.
My fork : https://github.com/raghu1111/roku_media_server
patch :

diff --git a/client/source/datamodel.brs b/client/source/datamodel.brs
index a270c84..6ec177b 100644
--- a/client/source/datamodel.brs
+++ b/client/source/datamodel.brs
@@ -266,7 +266,8 @@ Function itemGetPlayable()
sf = m.GetStreamFormat()
ct = m.GetContentType()
return { Url: m.GetMedia(), ContentType: ct, Title: m.GetTitle(), StreamFormat: sf,
- Length: m.GetLength(), Artist: m.GetArtist(), Album: m.GetAlbum(), ReleaseDate: m.GetDate()}
+ Length: m.GetLength(), Artist: m.GetArtist(), Album: m.GetAlbum(),
+ ReleaseDate: m.GetDate(), SDBifUrl: m.xml.SDBifUrl.GetText() }
End Function

Function itemGetPosterItem()
diff --git a/server/mymedia.py b/server/mymedia.py
index e943c88..3e3191c 100644
--- a/server/mymedia.py
+++ b/server/mymedia.py
@@ -66,7 +66,7 @@ class PublishMixin:
class RSSImageItem(PublishMixin, RSSItem):
"extending rss items to support our extended tags"
def __init__(self, **kwargs):
- self.TAGS = ('image', 'filetype', 'tracknum', 'ContentType', 'StreamFormat', 'playtime', 'album', 'bitrate', 'release_date', 'SubtitleUrl')
+ self.TAGS = ('image', 'filetype', 'tracknum', 'ContentType', 'StreamFormat', 'playtime', 'album', 'bitrate', 'release_date', 'SubtitleUrl', 'SDBifUrl')
self.set_variables(kwargs)
RSSItem.__init__(self, **kwargs)

@@ -151,12 +151,15 @@ def call_protected(f, default):
return v

def with_srt(fname, linker, addl):
- "update the addl with an srt tag if that file is available"
+ "update the addl with an srt tag if that file is available. also add bif url"

basepath = os.path.splitext(fname)[0]
srtname = basepath + ".srt"
if os.path.exists(srtname):
addl['SubtitleUrl'] = linker(srtname)
+ bifname = basepath + ".bif"
+ if os.path.exists(bifname):
+ addl['SDBifUrl'] = linker(bifname)
return addl

def file2item(key, fname, base_dir, config, image=None):
@@ -842,7 +845,8 @@ class MediaHandler:
mimetype = ext2mime(ext)
if not mimetype:
logging.debug("couldn't determine mimetype for %s" % name)
- return
+ #return
+ mimetype="application/octet-stream"

logging.debug("guessing mimetype of %s for %s. filesize is %d" % (mimetype, name, size))
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

Good job! That looks a lot like what I had except that I added a itemGetBifUrl() function. I hate all those one line functions, but that's just me.

For mymedia.py, I added a with_bif function, basically duplicating with_srt and changing 'srt' to 'bif'.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
raghu1111
Visitor

Re: My Media - Your Music and Video on the Roku DVP

I had some trouble uploading the client. Then I deleted the MyMedia private channel that was installed, then uploaded the client. It worked.
One odd thing I noticed is that I can not change the position of the channel on home screen. I can change the position of the other channels (with '*' button). For MyMedia '*' just shows two options 'show channel description', 'exit' (no 'remove channel' either).
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

I don't think you can change the position of a side-loaded channel; it's always last. You can create your own private channel and load that on your box. Instructions for packaging a channel are in ChannelPackagingAndPublishing.pdf. Let me know if you need any help.

I should also tell you at this point that the zip that is created by springboard.py is needlessly huge. Here's a list of the files that are really required:
manifest
source/appMain.brs
source/datamodel.brs
images/shuffleall_square.jpg
images/playall_square.jpg
images/nowplaying_square.jpg
images/settings_square.jpg
images/Overhang_BackgroundSlice_HD.gif
images/Overhang_BackgroundSlice_SD43.gif
images/media_Logo_Overhang_HD.gif
images/photo_Logo_Overhang_HD.gif
images/media_Logo_Overhang_SD43.gif
images/music_Logo_Overhang_SD43.gif
images/photo_Logo_Overhang_SD43.gif
images/settings_Logo_Overhang_HD.gif
images/settings_Logo_Overhang_SD43.gif
images/streams_Logo_Overhang_HD.gif
images/music_Logo_Overhang_HD.gif
images/streams_Logo_Overhang_SD43.gif
images/video_Logo_Overhang_HD.gif
images/video_Logo_Overhang_SD43.gif
images/folder_square.jpg
images/music_square.jpg
images/videos_square.jpg
images/streams_square.jpg
images/livestream_square.jpg
images/media_wide.jpg

Most of the graphics should be retrieved from the server instead of being put in the package, but that's something for another day...

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
cdvijay
Visitor

Re: My Media - Your Music and Video on the Roku DVP

DNS 323 Question

Hello,

Linux newbie here...

I am trying to get one media server for my needs (mp3, wma, avi, mkv, vob,etc.). Tried Mediatomb, works most of the time. Thot Roku was the answer...but cannot get it to work (fully).

1. After adding MyMedia, gives me a 4-char regn code, type that in at rokumm.appspot.com. That is it. No progress from that point. Get a "Regn. incomplete."

2. On my DNS, I did the github thing, manually changed the config to match my local IPs. When, I call up 192....110:8001, I get a small page with 4 links. Only the "My music" link works partially. The other "My Media" does not show me any media titles that it should have found at the locations specified.

3. But, everytime, I go to "MyMedia" on Roku, it gives me a new 4-char code.

4. I have installed Python, PIL, modified config.ini, etc.

Don't know what else to do. Any help will be appreciated.

If this method (i.e., Roku for my media files) is not the answer, is that "MiniDLNA" the answer? I cannot find some libraries for it to work either...

Thank you,
Vj
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.