Your Digital Media Has Never Looked So Good

 
User avatar
RokuMarkn
Roku Engineering
Posts: 1581
Joined: Mon Jun 09, 2008 9:20 am

Tue Feb 16, 2010 9:05 am

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
 
dellsweig
Posts: 419
Joined: Mon Mar 31, 2008 10:03 am
Location: Campbell Hall NY

Re: Large video files

Tue Feb 16, 2010 9:11 am

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.....
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Tue Feb 16, 2010 9:24 am

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
Last edited by renojim on Tue Feb 16, 2010 9:32 am, edited 1 time in total.
 
bryankaiser
Posts: 23
Joined: Thu Feb 04, 2010 10:56 am

Tue Feb 16, 2010 9:25 am

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.
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Tue Feb 16, 2010 9:53 am

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
 
el.wubo
Topic Author
Posts: 243
Joined: Sun Jan 31, 2010 7:54 pm
Location: Baltimore, MD
Contact:

Tue Feb 16, 2010 10:17 am

renojim:

You're right. It is trying to read the whole file. Good catch. I'll fix that tonight. Thank you.
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Tue Feb 16, 2010 12:44 pm

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. :wink:

Thanks for all you've done!
-JT
 
el.wubo
Topic Author
Posts: 243
Joined: Sun Jan 31, 2010 7:54 pm
Location: Baltimore, MD
Contact:

Tue Feb 16, 2010 4:04 pm

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?
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Tue Feb 16, 2010 7:47 pm

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
 
canaws
** Valued Community Member **
Posts: 288
Joined: Mon Feb 15, 2010 8:45 pm

Tue Feb 16, 2010 10:25 pm

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!
Roku 3 (4230X) / 42" Sharp LED 1080p HDTV / RadioShack Amplified Indoor Antenna
Roku SE (2710X) / 25" Sharp SDTV / GE Indoor Antenna
ATT Uverse 18.0 Mbps / Motorola NVG589 Gateway
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Wed Feb 17, 2010 3:23 am

This is great! Not only did the davethomas video play fine, it's handled everything I've thrown at it including the first half of the Broncos/Ravens game - a 2GB, 5MB/sec, 54 minute video. It has rebuffered a couple of times, but that probably has more to do with my wireless network than anything. I wouldn't normally try to play a 5MB/sec video. Come next football season I expect to get a lot of use out of this feature watching downloaded Ravens games!

This is a feature Roku should seriously consider adding, with compensation to el.wubo of course. To be honest, I haven't been too impressed with its ability to stream Netflix movies. At times I've wanted to throw it out the window when I missed something and wanted to rewind the last few seconds. Its inability to do a decent rewind/fast forward can be extremely frustrating. Maybe I just need a 54Mbs internet connection. :D Maybe Roku cold hire el.wubo to work on their firmware. :wink: With this feature, I'm actually considering getting another Roku player to stream media to another room.

For anyone interested, I've just been using the CLI version of HandBrake to convert my files to the m4v format. It does a good enough job for me with just the default settings. Just make sure to add the -O option:
HandBreakCLI -i infile -o outfile.m4v -O

el.wubo, the next time I'm in Baltimore I'd like to buy you a beer!
-JT
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

jpeg support

Wed Feb 17, 2010 3:49 am

el.wubo,

On the subject of jpeg support, I think you hit the nail on the head with two good ideas. The ability to just automatically cycle through all the jpegs in a directory, repeatedly even, while playing music would be a great feature. At the same time, being able to manually cycle through photos with or without music would also be nice. I get your point about the lousy resolution of a TV, but if anyone out there is like me, I tend to look at the pictures I've taken when I upload them to my computer and then never really look at them again. Being able to display them on my TV I'm sure would make me more likely to enjoy them over and over again. I think it would be at least as good as one of those tiny digital photo frames.

Like you said, I could see someone putting together a showing of their vacation photos, perhaps even with narration timed to the cycling of the photos. I don't know if I'd like to watch something like that and I'm certainly too lazy to put something like that together, but I could still see it happening.

-JT
 
dellsweig
Posts: 419
Joined: Mon Mar 31, 2008 10:03 am
Location: Campbell Hall NY

Wed Feb 17, 2010 4:57 am

el.wubo wrote:
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?


ElWubo

A simple method of letting my wife peruse the photo library on my file share is all I am asking.

All photos are already in folders, much as the music collection, organized by topic/date/etc

A simple way to navigate to the folder then click for next photo would be great. Thumbnails even for quick navigation....

Simple is better - no need for association with music or anything tacky like that.

Also - Any luck on finding the issue with the deeply nested mp3 files not playing?
 
ashes00
Posts: 72
Joined: Mon Feb 08, 2010 5:41 pm

Wed Feb 17, 2010 9:06 am

I was able to download latest source, and get my roku to play .mp4 videos from my desktop/NAS. It played more than 30 minutes,and was actually one that came form DVDRip (512MB). SO length and large video size are covered. I am going to work on it later this eveing to see about over mp4/m4v videos.

This is great stuff you guys are doign here. I do like the idea of changing it to "My Media" as it has started to encompass more media types. jpeg would be nice.

One last question. Has the shufflle function been looked at any further on music? Last i was able to get working was just playing the mp3s in sequential order and only from one container folder. Shuffle would be great, as we could listen to all types of artists, and not just what we have drilled down to.

Again thanks for everything thisis amazing!
-Ash
 
dellsweig
Posts: 419
Joined: Mon Mar 31, 2008 10:03 am
Location: Campbell Hall NY

Wed Feb 17, 2010 9:11 am

ashes00 wrote:
I was able to download latest source, and get my roku to play .mp4 videos from my desktop/NAS. It played more than 30 minutes,and was actually one that came form DVDRip (512MB). SO length and large video size are covered. I am going to work on it later this eveing to see about over mp4/m4v videos.

This is great stuff you guys are doign here. I do like the idea of changing it to "My Media" as it has started to encompass more media types. jpeg would be nice.

One last question. Has the shufflle function been looked at any further on music? Last i was able to get working was just playing the mp3s in sequential order and only from one container folder. Shuffle would be great, as we could listen to all types of artists, and not just what we have drilled down to.

Again thanks for everything thisis amazing!
-Ash


Have not seen the latest version so this point may be mute but

Are there separate base folders/paths for music and video (and photos?)

Who is online

Users browsing this forum: blade_005, denhow, hinkle911, robertkay008 and 35 guests