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: 
RokuMarkn
Visitor

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

el.wubo: yes, putting the moov atom at the beginning of the file, before the mdat atom (but after ftyp of course), will allow the player to start up faster.

renojim, can you check what version of Roku software you're running? el.wubo's davethomas clip plays fine for me.

--Mark
0 Kudos
dellsweig
Visitor

Re: Large video files

"renojim" wrote:
el.wubo and umbighouse,

Thanks for the explanation and verification that it should work, but I'm not getting anywhere. The information about the metadata makes sense, but I've tried all of the following without any luck:
FormatFactory
HandBrakeCLI with default settings
HandBrakeCLI with default settings and -O (--optimize) option
Handbrake GUI with Normal, High Profile, and iPod Legacy presets all with "Web optimized" checked

I looked at the resulting files with a hex editor and it appears that the metadata is at the beginning of the file. I even dumped the first 64MB of a file that won't play (gives a "format not supported" error message from the client) and the resulting file plays fine. The Roku player "thinks" the file is the full length since pressing pause shows the length of the non-truncated file on the progress bar.

The one interesting thing I've noticed with the files that won't play is that the server never receives (or at least never displays) any "player requested range" messages. There are three identical (except for the port) SERVER_PROTOCOL messages that end in "HTTP/1.1 GET /media" - 200 OK and then no more messages. On the working files there are only two of those messages before the "player requested range" messages.

I'm kind of at a loss as to what to try now. If anyone has a 70MB or so file that works for them that they could upload somewhere, I'd like to try it.
Edit: el.wubo, I tried your Dave Thomas video, but I wasn't clear on whether that was one that should work or does not work. Anyway, it doesn't work for me.

On a totally unrelated note, since it appears that this is becoming much more than a music player, might I suggest changing the name of the channel to "my media"? I think with the addition of some sort of jpeg support like a slideshow this would do everything I'd need it to do.

Thanks for reading!
-JT


I second the suggestion of renaming it to a medai player and to giving access to the family photo album - slide shows or direct viewing of photos from the network share.....
Going where the wind don't blow so strange
0 Kudos
renojim
Community Streaming Expert

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

Ok, I'm starting to feel like a fool. :oops: I got the client code from the "Download Source" button on the github site that leads to a zip file "netguy204-roku_media_server-9df271b.zip". If I compare the client code in that zip to a direct download from the other links, it's completely different. Clearly I don't understand how that github site is supposed to work. Let me try getting all of the code from the individual links and see how that goes. That can't be how you're supposed to get everything, is it?

Edit: I take it back. They are the same. It is the "netguy204-roku_media_server-9df271b.zip" that has everything, right?

Thanks for your help!
-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
bryankaiser
Visitor

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

For everyone that's having trouble with videos rebuffering here's what I've found to work:

There seems to be an issue with transcoding directly from a 5.1 ac3 stream into aac. What I've done to overcome the issue is decoded the ac3 into a wav file (and doing a downmix along the way), then I use that wav file as the source for the audio during the conversion. I also trim 1-2 seconds off the end of the video. Doing these two things results in videos that will play successfully all the way through. I have not done any tinkering with the moov atoms, although I probably should have played with that.

I'm using ffmpeg and BeSweet to do this for me. Here are the commands I run:

c:\ffmpeg\bin\ffmpeg -i INPUT.vob -vn -acodec copy INPUT.ac3
"C:\Program Files\BeSweet\BeSweet.exe" -core( -input "INPUT.ac3" -output "INPUT.wav" -2ch ) -azid( -c light --maximize )
del INPUT.ac3
c:\ffmpeg\bin\ffmpeg -i INPUT.vob -i INPUT.wav -map 0:0 -map 1:0 -acodec aac -ab 160k -ac 2 -vcodec libx264 -vpre normal -crf 21 -threads 0 -s 720x404 -t 1:30:00 -aspect 16:9 -r 23.976 OUTPUT.mp4
del INPUT.wav


The first ffmpeg call splits the 5.1 ac3 track out into it's own file. Then I call BeSweet to do a downmix and spit out a stereo wav file. I then delete the ac3 file (it's no longer needed). I then use ffmpeg to do the encode using the video stream from the vob file and the audio from the wav file. I specify the size (-s), the duration (-t), stripping of a couple of seconds, the aspect ratio (-aspect) and the frame rate (-r). Finally, delete the wav file. I have done several videos this way and they are all working successfully. If anyone tries this, I'd love to hear if it was successfull or not.

I'm starting to wonder now if it's actually an issue with how the video and audio streams are being packaged in an mp4 (or m4v). If my suspicions are correct about the issue actually revolving around differing lengths in the audio and video streams (the audio streams seem to be longer than the video streams when you demux them, which is why shortening the duration helps), then it may indicate an issue with how ffmpeg is muxing the streams. I'm going to try doing it with mp4box at some point, but I haven't gotten there yet.
0 Kudos
renojim
Community Streaming Expert

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

I'm thinking my large file problem is a server problem. When I select a large video, I get the "retrieving" screen, but no data ever gets sent to the Roku player beyond the file name, length, etc. Meanwhile, on the server the disk access light is on constantly as if it's trying to read the whole file. This is using the davethomas video, so I don't believe the video file is to blame. For what it's worth, I've tried a Windows 7 and an XP server and I get the same results. This is really getting me down since it seems to work so well on short videos.

-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
el_wubo
Visitor

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

renojim:

You're right. It is trying to read the whole file. Good catch. I'll fix that tonight. Thank you.
0 Kudos
renojim
Community Streaming Expert

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

"el.wubo" wrote:
renojim:

You're right. It is trying to read the whole file. Good catch. I'll fix that tonight. Thank you.


Wow! I'm right? That's great news! I was afraid it was something unique to my configuration and we'd never figure it out. You wouldn't believe what I've been through trying to figure out what's going on: sniffing packets, transcoding numerous video files, installing Ubuntu... I even gave going through the code a shot. This probably isn't the easiest application to try to learn Python on. 😉

Thanks for all you've done!
-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
el_wubo
Visitor

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

renojim and all:

I've just pushed out the update that lets the server stream from disk instead of read the entire file first. Great catch to renojim for suggesting this was the issue.

All of my test videos (even those with metadata at the end) are starting in under 10 seconds. This update is in both the main and the partitioning version.

renojim:

You got the right zip. The random looking characters on the end correspond to the version of the zip you're downloading. With this number in hand you can click on the "commits" link and find that version number to view the source tree for that particular zip file. The latest version is 6b8b472a75c8ac7fba59b5f22e5f08e3e9f1437b (at least, right now) so you'll see the first few characters of that on the end of the zip file you download. More more exciting details on how this crazy looking version number comes about (it's a SHA1 hash), check out the git documentation.

all:

I'm definitely catching on that photo support is something everyone would like to have. Since I really don't get the value of this feature, can someone enlighten me? How would you use this? Here are the use cases I've dreamed up:

* You want to leave something cool running on your TV (like a screen saver)
--In this, auto-cycling is important and something like being able to still quickly select music to play along with your cycling pictures would be valuable

* You want to show off pictures of your vacation to a group of people
--In this case, manual cycling is important and maybe we'd want to explore associating music with collections of photos for more of a slide show / presentation type feel.

* You actually like looking at low resolution pictures on what amounts to a junky monitor 😉 (j/k)
--Hm... maybe this is actually something people do with their leisure time and would like to be able to do it from their television.


Thoughts? Votes? What matters to you?
0 Kudos
renojim
Community Streaming Expert

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

el.wubo,

You are the man! I'm "watching" the davethomas video now. I want to make sure it gets through the whole hour and I'll post back.

Thanks again!
-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
canaws
Binge Watcher

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

I figured out what was wrong. The music file location was incorrect. =/ Everything is working great!

"canaws" wrote:
Anyone mind helping me? I can't figure out what I'm doing wrong.

Problem...
When I go to the channel on the roku box it only says receiving. It never changes.

Info...
I downloaded all the files fresh today.
I have the MyMusic Channel on my roku box, so installation when a-ok.
My file path for python is C:\Python26\python.exe
My file path for the media server files is C:\roku_media_server (all subfolders are in place with no name changes).
The ip addresses for my roku box and laptop are correct.
The directory for my music is correct.
When I launch the server (via springboard.vbs) I get the small stop server box. My task manager shows two instances of python.exe every time. When I click stop server only one instance of python closes. I have to close the other one via the taskbar.
I can see the feed page, but is nothing on it except for the title & subtitle.
I'm running Vista.
I'm behind a router w/firewall.

Things I've tried...
I thought the size of my music file might be a problem, so I temporarily moved all my music files and left a single mp3 file in the music folder, but no luck. It still only says retrieving.
I made sure that python can get through Windows firewall.
I've tried it with Windows firewall and the router firewall off.
I ran the debug for springboard and launch server. I don't really know what I'm supposed to look for with these, but I only got 200 OKs.

Any idea what I'm missing?

Thanks!
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.