# tivostream - video streaming server for Series 3 Tivos



## moyekj

Thanks to excellent work by wmcbrine (see this thread) it was discovered that since the 9.4 software update and YouTube support, video *streaming* now works to Series 3 Tivos. I have built a Java based HME video streaming server which can serve up video files on your computer to your Series 3 Tivos. Note that this is different than the traditional TTCB servers which copy (and transcode to mpeg2 if needed) files to your Tivo. Some advantages of streaming over TTCB:
* No copy is made on the Tivo, so you don't have to worry about deleting it after watching
* For mpeg4/h.264 videos you can watch them in their native format without having to transcode to mpeg2 on the fly as Tivo Desktop (or other TTCB applications) currently does.
* Since the HME server is in complete control of remote control functions it's possible to define further navigation options than is possible with normal Tivo video playback such as arbitrary skip n minutes back or forwards and other interesting ideas.

Home Page:
http://code.google.com/p/tivostream/


----------



## StanSimmons

Very nice.

Can this co-exist with pyTivo on a WinXP box, with both of them running?


----------



## moyekj

StanSimmons said:


> Very nice.
> 
> Can this co-exist with pyTivo on a WinXP box, with both of them running?


 Haven't tried yet but don't see why not. pyTivo I believe uses port 9032 by default (but you can change that in the config). This application uses port 7288 (the default port for HME applications). I do run pyTivo once in a while (in console mode) so I can try it tonight, but I fully expect it to have no conflicts.


----------



## windracer

moyekj said:


> * No copy is made on the Tivo, so you don't have to worry about deleting it after watching]


But on the flip side this means that if you say, drop to Live TV while watching the stream, you'll have to start it over again, right?


----------



## moyekj

windracer said:


> But on the flip side this means that if you say, drop to Live TV while watching the stream, you'll have to start it over again, right?


 Yes. There are some down sides too. This brings up a limitation I am trying to overcome that currently you cannot jump ahead of the buffer. For a true file stream of course you can jump arbitrarily anywhere into the stream regardless of the buffer. For this case, especially since this app is designed to stream a local file there should be a way to get the byte offset into the file associated with the specified time offset and then start the stream from that offset. It's on my to do list to look at but on the surface doesn't sound impossible.
Once/if I can fix the above limitation, then at least if you stop watching and later want to continue then you can jump back to where you were (and I could implement some bookmarking to remember last position of recent files).

Extending the above thought further, one could potentially also skip commercials automatically during playback by pre-processing the file and building a boomark list of the commercial segments which could be referenced during playback to skip over the commercial blocks. So short of editing out commercials yourself before streaming this could be an interesting option.

I haven't put too much thought into this yet but the more you think about this the more possibilities open up.


----------



## StanSimmons

I'm getting "ERROR: Stream rejected by Tivo" when playing any of my mp4 files on my TiVoHD. The console has the following:



> 10.0.0.52 Comedy/Blazing Saddles (1974).mp4 HTTP GET - to factory /videostream/
> 10.0.0.52 I/O Exception handling HTTP GET Comedy/Blazing Saddles (1974).mp4: Co
> nnection reset by peer: socket write error


----------



## jmemmott

StanSimmons said:


> Very nice.
> 
> Can this co-exist with pyTivo on a WinXP box, with both of them running?


There doesn't appear to be any problem running both on the same box at the same time. However, I did find out that the two mechanisms handle captioning differently. A file sent through pyTivo will show the captioning it contains. The same file streamed back will not. This is mostly of interest to those who require closed captions or use that captioning mechanism to pick up English subtitles from foreign language media.


----------



## moyekj

StanSimmons said:


> I'm getting "ERROR: Stream rejected by Tivo" when playing any of my mp4 files on my TiVoHD. The console has the following:


 Is *"Comedy/Blazing Saddles (1974).mp4"* the name of file in this example? If so the "/" spaces and/or parenthesis in the name are probably causing problems. As an experiment rename the file or choose one with a simple name without special characters to try. If still no go then it could be the particular .mp4 encoding is not liked by Tivo. Try choosing an mpeg2 file to stream to confirm the program does work. I haven't tested out a big variety of .mp4 files but several test clips I downloaded from the web have worked OK, though some of them don't fast forward or other trick functions very well.

EDIT: Come to think of it I didn't test out file names and folders with spaces and other special characters in them so it could be those are causing an issue right now too (which I can fix).


----------



## Da Goon

:up::up: good stuff! works great streaming hd files to my THD. Much better than using the cumbersome TD software.


----------



## moyekj

jmemmott said:


> There doesn't appear to be any problem running both on the same box at the same time. However, I did find out that the two mechanisms handle captioning differently. A file sent through pyTivo will show the captioning it contains. The same file streamed back will not. This is mostly of interest to those who require closed captions or use that captioning mechanism to pick up English subtitles from foreign language media.


 That is interesting. Out of curiosity can you get captions with any YouTube files? Does YouTube even support closed captioning?


----------



## wmcbrine

If you're talking about TiVo-rendered captions (as opposed to TV-rendered), you'd have to do them yourself in the HME app. They're rendered the same way as menus, etc.

For some reason, this app won't play a certain high-def file that works in my own player. (It's the episode of Systm that's referenced in the "Video Streaming in HME thread". I haven't tried others yet.) The bar appears, and advances, but the video never does.


----------



## jmemmott

moyekj said:


> That is interesting. Out of curiosity can you get captions with any YouTube files? Does YouTube even support closed captioning?


I don't think it does. My motivation comes from a slightly different path. I am playing with T2Sami code extensions in house that allow me to dynamically convert English subtitled files (mkv anime files) for pyTivo.

I also have streaming to other platforms such as the Hauppauge MediaMVP boxes working. If Tivo had handled captioning in the same way in a stream as it handles captioning for the "Come Back" path, the ability to stream captioned mpegs or mp4's (such as movie rentals) would have been within an easy experimental reach...


----------



## StanSimmons

moyekj said:


> Is *"Comedy/Blazing Saddles (1974).mp4"* the name of file in this example? If so the "/" spaces and/or parenthesis in the name are probably causing problems. As an experiment rename the file or choose one with a simple name without special characters to try. If still no go then it could be the particular .mp4 encoding is not liked by Tivo. Try choosing an mpeg2 file to stream to confirm the program does work. I haven't tested out a big variety of .mp4 files but several test clips I downloaded from the web have worked OK, though some of them don't fast forward or other trick functions very well.
> 
> EDIT: Come to think of it I didn't test out file names and folders with spaces and other special characters in them so it could be those are causing an issue right now too (which I can fix).


Same error. I changed the name to "BlazSadd.mp4" and dropped it into the same folder that I started the jar file in.


> 10.0.0.52 icon.png HTTP GET - to factory /videostream/
> 10.0.0.52 icon.png HTTP GET - to factory /videostream/
> SDK debug level = 1. Will log: errors,warnings
> To control HME SDK debugging, set the property com.tivo.hme.sdk.debug.level
> The integer debug level is interpreted as follows:
> 0: Only errors logged (default, recommended for installed apps)
> 1: Level 0 + errors and warnings logged (recommended for development)
> 2: Level 1 + events from receiver logged
> 3: Level 2 + commands to receiver logged
> Using vStrings!
> 10.0.0.52 BlazSadd.mp4 HTTP GET - to factory /videostream/
> 10.0.0.52 I/O Exception handling HTTP GET BlazSadd.mp4: Connection reset by pee
> r: socket write error
> Connection terminated by receiver
> connection to receiver closed


Video Lan says that the file info is:



Code:


Stream 0
 Codec: avc1
 Type: Video
 Resolution: 706x480
 Frame Rate: 23.988005
Stream 1
 Codec: mp4a
 Type: Audio
 Channels: 2
 Sample Rate: 48000 Hz
 Bits Per Sample: 16
 Bitrate: 1536kb/s


----------



## moyekj

wmcbrine said:


> If you're talking about TiVo-rendered captions (as opposed to TV-rendered), you'd have to do them yourself in the HME app. They're rendered the same way as menus, etc.


 That explains it, I'll have to look into it, thanks.



> For some reason, this app won't play a certain high-def file that works in my own player. (It's the episode of Systm that's referenced in the "Video Streaming in HME thread". I haven't tried others yet.) The bar appears, and advances, but the video never does.


 I just tried the hi def version of the file: systm--0063--dolby--hd.h264.mp4 and it worked fine for me. Can you provide the link of the one you are talking about? The specs on the above file are:
Video: Codec=avc1, Resolution=1280x720, Frame Rate=24 fps
Audio: codec=mp4a, Channels=2, Rate=44100Hz, 16 bits per sample, 1411 kb/s bit rate


----------



## Chew

The only way "videoserver" appears for me on the TiVo is when the cmd box remains open. As soon as I close it, it disappears.

Dumb question: is it supposed to be that way? Or did I install something incorrectly?


----------



## moyekj

Chew said:


> The only way "videoserver" appears for me on the TiVo is when the cmd box remains open. As soon as I close it, it disappears.
> 
> Dumb question: is it supposed to be that way? Or did I install something incorrectly?


 You are supposed to keep it open. As soon as you kill the "cmd" shell window you kill the program. It would be pretty easy to setup to run this program as a service in Windows (and hence no popup window) but that's not a priority for me right now. You can just minimize the cmd window instead of closing it to get it out of the way.


----------



## moyekj

StanSimmons said:


> Same error. I changed the name to "BlazSadd.mp4" and dropped it into the same folder that I started the jar file in.
> 
> Video Lan says that the file info is:
> 
> 
> 
> Code:
> 
> 
> Stream 0
> Codec: avc1
> Type: Video
> Resolution: 706x480
> Frame Rate: 23.988005
> Stream 1
> Codec: mp4a
> Type: Audio
> Channels: 2
> Sample Rate: 48000 Hz
> Bits Per Sample: 16
> Bitrate: 1536kb/s


 By those specs it should work. Can you provide a link to the above file or a clip from it so I can try it out? Only thing I can think of is I don't provide a type hint to Tivo for the stream (i.e. "video/mpeg4"), but I haven't found an mpeg4 file that didn't at least start for me. If I can get hold of one that should work but doesn't then I can debug further.

P.S. I tried several files and paths with spaces, brackets etc. and had no problem, so no need to rename files as I originally expected could be causing a problem.


----------



## wmcbrine

moyekj said:


> I just tried the hi def version of the file: systm--0063--dolby--hd.h264.mp4 and it worked fine for me. Can you provide the link of the one you are talking about?


That's the one. I renamed it to "systm.mp4", but that's all.


----------



## StanSimmons

moyekj said:


> By those specs it should work. Can you provide a link to the above file or a clip from it so I can try it out? Only thing I can think of is I don't provide a type hint to Tivo for the stream (i.e. "video/mpeg4"), but I haven't found an mpeg4 file that didn't at least start for me. If I can get hold of one that should work but doesn't then I can debug further.
> 
> P.S. I tried several files and paths with spaces, brackets etc. and had no problem, so no need to rename files as I originally expected could be causing a problem.


The full file is 1.03GB. I'm not sure how to get a clip from it. I'll see if I can find a smaller file that has the same problem.


----------



## rfryar

EDIT: Nevermind.. My java on my HTPC was only 1.5. Will download 1.6 and see if that fixes the issue.

Just downloaded and tried to run the windows batch file and Java is throwing an unsupported class exception. Here is the stack trace. Any clues?

Rick

E:\Program Files\tivostream_v0p2>java -cp tivostream_v0p2.jar com.tivo.hme.host.
sample.Main com.hme.tivo.videostream.videostream
Instance ID = 0002dcbbfba7c4c1
hme-host-sample version: 1.4.1 threadsafe-experimental
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version n
umber in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)


----------



## bluetex

> I/O Exception handling HTTP GET BlazSadd.mp4: Connection reset by peer: socket write error
> Connection terminated by receiver
> connection to receiver closed .


My guess. Software firewall, something blocking the port being requested (other services on the port) or similar.

The file request looks good, the problem seems to be in the connection/port negotiation


----------



## moyekj

rfryar said:


> EDIT: Nevermind.. My java on my HTPC was only 1.5. Will download 1.6 and see if that fixes the issue.
> 
> Just downloaded and tried to run the windows batch file and Java is throwing an unsupported class exception. Here is the stack trace. Any clues?
> 
> Rick
> 
> E:\Program Files\tivostream_v0p2>java -cp tivostream_v0p2.jar com.tivo.hme.host.
> sample.Main com.hme.tivo.videostream.videostream
> Instance ID = 0002dcbbfba7c4c1
> hme-host-sample version: 1.4.1 threadsafe-experimental
> Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version n
> umber in .class file
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at java.security.SecureClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.access$100(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)


 Edit the run_win.bat script and put in the full path to the java.exe that matches your recent installation. My guess is that java.exe in your default path is an older one. For example, for one of my Java installations:
c:\Program Files\Java\jre1.6.0_01\bin\java.exe
So replace "java" in the run_win.bat script with the full path as in example above.


----------



## StanSimmons

bluetex said:


> My guess. Software firewall, something blocking the port being requested (other services on the port) or similar.
> 
> The file request looks good, the problem seems to be in the connection/port negotiation


Windows XP Firewall disabled. No antivirus installed. Same symptoms.

pyTivo works fine on this same machine with the same file.


----------



## moyekj

StanSimmons said:


> Windows XP Firewall disabled. No antivirus installed. Same symptoms.
> 
> pyTivo works fine on this same machine with the same file.


 Note that for mpeg4 videos pyTivo transcodes to mpeg2 first before sending to Tivo so the Tivo is not getting same thing in that case. I don't think it's a firewall issue as with firewall blocking you wouldn't be able to get to the initial file browser window either. Give systm--0063--dolby--hd.h264.mp4 file a go as it works for me.


----------



## Chew

My videos stop playing after a certain number of minutes. 

Tekzilla played for 10 minutes (twice) and the TiVo returned to live TV.
The Digg Reel played for 5 and did the same thing.

I have the port open and it's playing fine for the time it plays. 

Anything else I can do?


----------



## BrianAZ

I think I read somewhere that HME doesn't have access to the local video files on the Tivo, but assuming it did (or will in the future), is there any reason that this couldn't be used to get around the CCI protection which makes 2/3rds of my recordings off limits to MRV? Just so we're clear, I'm not talking about making a copy of it.. just streaming from Tivo2Tivo.

Also thinking perhaps the HME app could also write to a log of where it was in a specific stream so when you select it again, it asks if you want to resume from the point you stopped? That's how my D-Link DSM520 works. Seems to do the trick.


----------



## wmcbrine

Chew: I wonder if you're seeing an idle timeout? That's something I fixed in my streamer; I don't know if it's handled in this one.

BrianAZ: In regard to your first question, there is no reason to ever expect such a capability in HME -- it doesn't really fit the HME model at all. But even if it did, there's even less reason to think that it would let you get around the DRM. The distinction between copying and streaming is pretty much imaginary. If TiVo won't support MRV of DRM'd programs, they're not likely to support transferring them in any other way.


----------



## moyekj

Chew said:


> My videos stop playing after a certain number of minutes.
> 
> Tekzilla played for 10 minutes (twice) and the TiVo returned to live TV.
> The Digg Reel played for 5 and did the same thing.
> 
> I have the port open and it's playing fine for the time it plays.
> 
> Anything else I can do?


 wmcbrine is right, in the released version I'm not handling idle timeout properly, so after 5 minutes of inactivity you will be returned to Live TV. This will be fixed in next release.


----------



## BrianAZ

Oh well. Hopefully DRM will evolve at some point to allow copying across Tivos owned by one person. Maybe they'll be able to allow it if the Tivo's in question are all on the same account, or perhaps have the same public IP showing they're likely to be in the same lan/house. Then again, maybe that's just more wishful thinking.


----------



## lrhorer

I have some questions:


Will this app run under Linux? I need any video transfer application to run under Linux, because my video server is a Linux machine.
Will it co-exist with Galleon? I have both Galleon and pyTiVo running on the server.
Have you tried any high bandwidth videos? Of course a 20 Mbps MPEG-II video when converted to MPEG-IV probably streams at only 10 Mbps or so, but if the TiVo (S3 or THD) has a problem keeping up with the video content, this could mean trouble.
Do you have folder support built-in like pyTiVo?
Do you have Metafile support built-in?


----------



## windracer

lrhorer said:


> ill this app run under Linux? I need any video transfer application to run under Linux, because my video server is a Linux machine.


I got it to start on my Ubuntu machine, but kept getting http errors when connecting to it with my TiVo.


lrhorer said:


> Will it co-exist with Galleon? I have both Galleon and pyTiVo running on the server.


Seems to, I've got Galleon and pyTiVo running on my server as well. I tried to get tivostreamer to run _through_ Galleon (via launcher.txt) and had problems, though.


----------



## moyekj

lrhorer said:


> I have some questions:
> 
> 
> Will this app run under Linux? I need any video transfer application to run under Linux, because my video server is a Linux machine.
> Will it co-exist with Galleon? I have both Galleon and pyTiVo running on the server.
> Have you tried any high bandwidth videos? Of course a 20 Mbps MPEG-II video when converted to MPEG-IV probably streams at only 10 Mbps or so, but if the TiVo (S3 or THD) has a problem keeping up with the video content, this could mean trouble.
> Do you have folder support built-in like pyTiVo?
> Do you have Metafile support built-in?


1. Yes. In fact a lot of my development is on a Linux server.
2. Yes, this app uses different ports than the default ports used by those apps.
3. Yes. I've served up some 1080i & 720p mpeg2 streams to my S3s as well as a few 720p h.264 streams. One issue of course is how fast the transfers happen. S3s do a better job than THD units but for high bit rates you will likely end up catching up to the buffer pretty quickly. h.264 files HD files since they are smaller than mpeg2 obviously transfer faster. This app automatically pauses when you catch up to the buffer (similar to MRV viewing while transferring). Haven't tried 1080p and I doubt the tivo decoder can even handle those never mind the transfer speed issue.
4. Yes, you browse for video files on your computer in any folder structure you want.
5. No. Currently pressing info button simply shows the name of the file being streamed. Parsing the metafile to grab more information about what's playing is a good idea and I'll put it on the to do list.


----------



## lrhorer

windracer said:


> I got it to start on my Ubuntu machine, but kept getting http errors when connecting to it with my TiVo.


I'm seeing something like that, as well. From the server:



Code:


RAID-Server:/RAID/Recordings# sh run_unix.sh
Instance ID = 000b143431bee13b
hme-host-sample version: 1.4.1 threadsafe-experimental
debug: Loaded factory: com.hme.tivo.videostream.videostream
debug: Class loader for com.hme.tivo.videostream.videostream: sun.misc.Launcher$AppClassLoader
debug: Context class loader: sun.misc.Launcher$AppClassLoader
added factory
MDNS ADD: http://192.168.0.56:0/videostream/
Contacting mDNS localhost daemon at 127.0.0.1:5354
Connection to mDNS localhost daemon failed: java.net.ConnectException: Connection refused
mDNS localhost daemon: service not found.
        > java.net.ConnectException: Connection refused
jmdns library: register [start]: http://192.168.0.56:0/videostream/
jmdns library: register [done]:  http://192.168.0.56:0/videostream/

On the TV:



Code:


An error occurred while running the application. HTTP failure (Http connection error. 0x50005).




windracer said:


> Seems to, I've got Galleon and pyTiVo running on my server as well. I tried to get tivostreamer to run _through_ Galleon (via launcher.txt) and had problems, though.


I'm just trying it directly from bash, at the moment.

Edit: The docs call for JRE 1.6.0_01-b06 or later. I'm running 1.6.0_03-b05, which I would think is later than 1.6.0_01-b06. I'm running the 64 bit JRE, if that makes a difference.


----------



## lrhorer

moyekj said:


> 1. Yes. In fact a lot of my development is on a Linux server.


See my post above.



moyekj said:


> 3. Yes. I've served up some 1080i & 720p mpeg2 streams to my S3s as well as a few 720p h.264 streams. One issue of course is how fast the transfers happen. S3s do a better job than THD units but for high bit rates you will likely end up catching up to the buffer pretty quickly


They don't when I'm using pyTivo or galleon, except whenI am transferring the very highest bitrate programs. As long as the average bit rate is below around 16Mbps, I don't usually have any trouble:










As you can see, I'm usually able to get TTCB transfers above 16 Mbps, but some of the MPEG-II programs I have exceed that, requiring me to buffer as much as 5 minutes per hour of program time. That means waiting about 15 minutes before starting to watch Lawrence of Arabia or Judgment at Nuremberg, for example.



moyekj said:


> h.264 files HD files since they are smaller than mpeg2 obviously transfer faster.


Well, one would tend to think so, but not necessarily. If any extra overhead is involved between the TCP stack and the hard drive for h.264 content versus MPEG-II, it could slow down the transfer. Also, it's possible HMO transfers might tend to be faster than HME. I'd be interested in quantitative comparisons. For that matter, I'll do them myself, if I can get the app running.

I'm hoping for two things:

1. Smaller program files stored on the server, whihc obviously allows me to store more programs. I'm running out of room fast, and I didn't want to have to upgrade the RAID array until the 2T drives are released, and hopefully drop in price. Cutting the file sizes in half will take me a long, long way.

2. To have even the very highest bandwidth videos stream without bumping up against the buffer.



moyekj said:


> Haven't tried 1080p and I doubt the tivo decoder can even handle those never mind the transfer speed issue.


That's OK. Almost all the videos were transferred from the TiVos in the first place.


----------



## bradleys

So now you have me wondering. Is this, or something similar now going to allow us to watch Netflix movies streamed through the PC?


----------



## moyekj

lrhorer said:


> Code:
> 
> 
> jmdns library: register [start]: http://192.168.0.56:0/videostream/
> jmdns library: register [done]:  http://192.168.0.56:0/videostream/


It's not binding to the correct port. If it's working right it should be on port 7288 not port 0. Use ps to find and kill any stray java jobs and then try it again. Once it starts on port 7288 then it should work. I found on Linux once in a while a previous server run did not die correctly and was hogging port 7288 and subsequent runs wouldn't bind. That portion of the HME code is not in my control so I can't look for alternate available ports.


----------



## lrhorer

moyekj said:


> It's not binding to the correct port. If it's working right it should be on port 7288 not port 0. Use ps to find and kill any stray java jobs and then try it again. Once it starts on port 7288 then it should work. I found on Linux once in a while a previous server run did not die correctly and was hogging port 7288 and subsequent runs wouldn't bind. That portion of the HME code is not in my control so I can't look for alternate available ports.


Well, there was a java job, but it wasn't a stray. It was clearly spawned by galleon. When I killed the child process, the parent spawned another one automatically, and I still could not launch tivostream. When I killed the parent process and then the child process, tivostream launched correctly, but galleon went crunch. I could neither launch the Galleon GUI on the server nor any Galleon apps on the TiVos.

I'll gather some greater detail later. In the mean time, I've started a TTCB session of pyTivo transferring an episode of Planet Earth I'm going to get some sleep and then transfer the same episode using tivostream and see how the transfer rates compare.


----------



## moyekj

lrhorer said:


> Well, there was a java job, but it wasn't a stray. It was clearly spawned by galleon. When I killed the child process, the parent spawned another one automatically, and I still could not launch tivostream. When I killed the parent process and then the child process, tivostream launched correctly, but galleon went crunch. I could neither launch the Galleon GUI on the server nor any Galleon apps on the TiVos.
> 
> I'll gather some greater detail later. In the mean time, I've started a TTCB session of pyTivo transferring an episode of Planet Earth I'm going to get some sleep and then transfer the same episode using tivostream and see how the transfer rates compare.


 Galleon uses a few ports, one of them being 7288 which would conflict with this app. According to this page Galleon should look for alternate ports if not available, but that doesn't seem to be happening in your case:
http://galleon.sourceforge.net/index.php?option=com_content&task=view&id=36&Itemid=47


----------



## windracer

Ok, that would explain why I couldn't get tivostreamer to work either (through Galleon or alongside it). I see the same thing as lrhorher (the http error and tivostreamer is unable to bind to port 7288). The lack of an icon next to the app name should have been a giveaway to that. I guess I'll try starting tivostreamer first, and then Galleon.

_edit:_ that worked. I started tivostream first, then Galleon grabbed 7289 instead so I have them running side-by-side now.


----------



## moyekj

Download:
http://tivostream.googlecode.com/files/tivostream_v0p3.zip
(Documentation in HTML is included in zip file)

Release notes for this version:
v0p3 - August 24, 2008
----------------------
CHANGES
* Prevent idle timeout to Live TV during video playback
* Keep status bar up during pause (can be cleared with clear button)
* Added optional config.ini file where starting folder and desired video file
extensions can be specified.
* Added flexible n minute jump ahead/jump back during playback. For example:
1,-> jumps ahead 1 minute
1,1,-> jumps ahead 11 minutes
5,<- jumps back 5 minutes
etc.

NOTE: Because of timeout to live TV in previous versions this version is highly recommended.


----------



## StanSimmons

moyekj said:


> Note that for mpeg4 videos pyTivo transcodes to mpeg2 first before sending to Tivo so the Tivo is not getting same thing in that case. I don't think it's a firewall issue as with firewall blocking you wouldn't be able to get to the initial file browser window either. Give systm--0063--dolby--hd.h264.mp4 file a go as it works for me.


Well, that file works.

Any idea on what settings I need when converting my MPG files to MP4 files for this streaming app?


----------



## wmcbrine

StanSimmons said:


> Any idea on what settings I need when converting my MPG files to MP4 files for this streaming app?


There's no reason to do that. It can stream both MPEG-2 (and MPEG-1, for that matter) and MPEG-4.

The MPEG-4 files that work (so far) are h.264 video, AAC audio, in a Quicktime (MOV) wrapper. There's some indication from the specs of the chips in the TiVo that it should handle some other types, but this is all that have been successfully tested, AFAIK.


----------



## moyekj

For any developers out there right now there are 2 big hurdles I haven't figured out how to overcome:
1. How to serve up local files on different volumes/partitions? For example if server is running on volume c: then how can I serve up files on volume d:
2. How to override current behavior to allow one to skip ahead of the available buffer? A true stream allows one to jump anywhere in the stream. For this app in particular serving up from local drive it should be possible to do that, but I can't seem to find a way to override that behavior in hme_sdk_1.4 or hme_sdk_1.4.1.

The latest source corresponding to release v0p3 is posted in Source section of Google project:
http://code.google.com/p/tivostream/source/checkout
(If you need help with building full jar file from source send me an email)


----------



## StanSimmons

wmcbrine said:


> There's no reason to do that. It can stream both MPEG-2 (and MPEG-1, for that matter) and MPEG-4.
> 
> The MPEG-4 files that work (so far) are h.264 video, AAC audio, in a Quicktime (MOV) wrapper. There's some indication from the specs of the chips in the TiVo that it should handle some other types, but this is all that have been successfully tested, AFAIK.


The main reason I've been converting my MPG2 movies to MP4 is space... Dropping from 4 to 8GB down to 1 to 2GB saved me from having to get a bigger NAS (yet). I have in the neighborhood of 400 movies. 

pyTivo has been converting them back to MPG2 and playing them on my S2 and TiVoHD just fine, but I was hoping to be able to skip the reconvert (as it seems to be adding an occasional artifact/glitch.)

Any suggestions as to what Handbrake settings would be optimal would be appreciated.


----------



## fyodor

I'm curious what type of streaming speeds people are getting. My old HD recordings from my computer PVR are too large to stream in real time, even though I have a network that is fast enough (NIM-100s). Between Tivos, my HD recordings usually transfer about 1.5 times as fast as the watched times (i.e. after 10 minutes, 15 minutes of show have transferred).


----------



## lrhorer

fyodor said:


> I'm curious what type of streaming speeds people are getting. My old HD recordings from my computer PVR are too large to stream in real time, even though I have a network that is fast enough (NIM-100s). Between Tivos, my HD recordings usually transfer about 1.5 times as fast as the watched times (i.e. after 10 minutes, 15 minutes of show have transferred).


I've started some testing, and so far within the limit of uncertainty of the test, the transfer speeds with tivostream seem to be just about the same as TTCB using pyTivo from the same server. Transfer speeds can vary a lot depending on how busy the TiVo is with other things, particularly disk intensive operations. Setting the tuners to disabled channels helps a very significant amount, usually allowing real time or better transfers of moderately high bit rate MPEG-II HD material. The difference between doing a transfer just after a daily call when the tuners are sitting on two 1080i HD programs and waiting a couple of hours and tuning to disabled channels on both tuners is very significant. Last night I transferred a copy of Planet Earth: Great Plains at just over 20Mbps, which means it would have transferred fully in real time. Right after a daily call with both tuners active, that fell to 10.96 Mbps, meaning it would have taken over an hour and 45 minutes to transfer this 1 hour show. Activity on the server, and depending on the LAN topology the LAN as well can impact transfer speeds. The RAID array on my video server can transfer as much as 5600Mbps, but the link to the switch is limited to 1000Mbps. No other machine on the LAN can transfer at anything more than 300Mbps, and the most I have been able to transfer real world has been 500Mbps, but the point is the LAN and video server have no problems keeping up with a 17 - 18 Mbps video stream. Your situation may not be able to readily support such speeds on a regular basis.


----------



## moyekj

fyodor said:


> I'm curious what type of streaming speeds people are getting. My old HD recordings from my computer PVR are too large to stream in real time, even though I have a network that is fast enough (NIM-100s). Between Tivos, my HD recordings usually transfer about 1.5 times as fast as the watched times (i.e. after 10 minutes, 15 minutes of show have transferred).


 FYI, transfers from this app to your Tivo show up under Network Diagnostics->Transfer History->Videos copied from remote device
Under normal conditions (both tuners tuned to HD channels and perhaps recording) and my laptop using 802.11g I get around 10-11 Mbps which is same as I get with normal Tivo To Go transfers. If I switch laptop to a wired connection and tune both tuners on my S3 to channels I don't receive then I can get it up to around 15 Mbps which is sufficient to keep up with or exceed bit rate of most of my mpeg2 HD recordings. From what I've gathered THD units are still a little slower than S3 units. HD mpeg2 kind of pushes the limit of typical transfer speeds but HD mpeg4 seems very viable - the few I've tried so far need much less than 10 Mbps for real time but of course you can find mpeg4 HD videos with much higher bit rates as well.

NOTE: I would have expected transfer speeds more on the order of MRV which I can get quite easily over 30 Mbps. With TTG there is CPU overhead with encryption and TS->PS conversion which MRV doesn't need to do. I suppose there still is PS->TS conversion going on when streaming to a Tivo? I think it goes back to the fact that this is not real streaming - seems to be using the same TTG/TTCB mechanism. Ideally the Tivo should just decode and display the stream without buffering to hard drive and any conversions it may be doing.
(PS=Program Stream, TS=Transport Stream)


----------



## lrhorer

moyekj said:


> Release notes for this version:
> v0p3 - August 24, 2008
> ----------------------
> CHANGES
> * Prevent idle timeout to Live TV during video playback
> * Keep status bar up during pause (can be cleared with clear button)...
> 
> NOTE: Because of timeout to live TV in previous versions this version is highly recommended.


I'm going to give this build a try. As I mentioned, I was doing some testing. I had transferred an episode of Planet Earth using pyTiVo at just a bit above 20Mbps. The average bit rate of this program is 17.5 Mbps. I started up the transfer under tivostream, and it was almost, but not quite, keeping up. I paused the playback and allowed the system to buffer 45 seconds of video before pressing play. The stream kept up pretty well for a while, but then after several minutes it did exhaust the buffer and automatically pause. I left the program paused for several minutes while I munched on a snack, when suddenly the screen went black. Pressing Play brought up the progress bar, but the video would not start streaming again. It also did not apper to be buffering any more data. I tried FF, RR, Play, and while the transport icon changed, nothing happened to the video playback.


----------



## lrhorer

windracer said:


> I see the same thing as lrhorher (the http error and tivostreamer is unable to bind to port 7288). The lack of an icon next to the app name should have been a giveaway to that. I guess I'll try starting tivostreamer first, and then Galleon.
> 
> _edit:_ that worked. I started tivostream first, then Galleon grabbed 7289 instead so I have them running side-by-side now.


That worked for me, too. I have a single startup script which now runs pyTivo, tivostream, and Galleon running under Debian "Etch" Linux and a 2.6 kernel on a Dual Core AMD Athlon 64.


----------



## wmcbrine

moyekj said:


> Ideally the Tivo should just decode and display the stream without buffering to hard drive and any conversions it may be doing.


I don't really agree there... although a faster start would be nice, the buffering is what makes all the trick play functions keep working.



> _(PS=Program Stream, TS=Transport Stream)_


Unfortunately I have so far been unable to get the TiVo to accept a transport stream.


----------



## lrhorer

moyekj said:


> v0p3 - August 24, 2008


This build doesn't work for me. On the trivial side, you might fix your installation instructions. In both the syntax text and the sample config.ini file, you specify the target directory specifier to be <top>, but this does not work. In the discussion text, however, you list the specifier as <topdir>, which does work. When I put <topdir> in the config.ini file, tivostream finds the target directory.

It seems to work fine for programs in the <topdir> directory, but when I try to transfer a program in a subdirectory of <topdir> the TiVo gives me an error saying, "Error: stream rejected by Tivo".

For example, /RAID/Recordings/Used Cars (Recorded Mon, Mar 03, 2008, HDNETMV).mpg plays just fine, but /RAID/Recordings/IMAX/Aliens of the Deep (Recorded Sat Mar 01, 2008, HDNETMV).mpg does not. I've tried several files in the /RAID/Recordings/ directory and they all work, and several in various subdirectories and none of them do.

They all worked under build 02 when I had the .jar file in the /RAID/Recordings directory.


----------



## lrhorer

moyekj said:


> 4. Yes, you browse for video files on your computer in any folder structure you want.


Actually, that is only part of what I meant. In pyTiVo I can set up multiple shares. So for example, I have the main share, called "RAID Server" pointing to /RAID/Recordings, which is where all the hard links for the program's inodes reside with subdirectories for series like Star Wars and Harry Potter. I have another share, however, called "Videos Sorted by Genre" which is actually not even on the RAID server volume. Instead, it's top level directory only contains directories such as "Mystery", "Romance", "Comedy", "Western", "Sci-Fi", etc. In each of those subdirectories are symlinks to files in /RAID/Recordings. If I want to browse by Alpha with the series at the top, I select "RAID Server" If I want to browse by genre with no series subdirectories, I select "Videos Sorted by Genre". With your newest build, something like that should be possible.


----------



## moyekj

wmcbrine said:


> I don't really agree there... although a faster start would be nice, the buffering is what makes all the trick play functions keep working.


 I came from the ReplayTV world where streaming is true streaming. You can use all the normal trick play functions while streaming and you can jump all the way to the end of a recording instantly without waiting for buffer to build. That's the case when you are playing back a show from a different Replay (i.e MRV) or if you are streaming the stream to your computer (i.e. TTG) and when serving back to the Replay (i.e. TTCB).

That to me would be the ultimate functionality in this kind of app. The down side with ReplayTV is the little buffer they do use is not enough to deal with even small network glitches, so streaming over wireless is hit or miss. Of course that was SD streams only and with the much higher HD streams it's good to have a much bigger buffer to avoid any playback glitches, but there's no reason the buffering needs to happen on the Tivo side. Let the server handle buffering.


----------



## lrhorer

This may be premature, but I figured I would go ahead and put in my suggestions for a wishlist:

1. Subdirectories listed separately at the top, regardless of sort. Perhaps configurable via the config.ini file.

2. Sort by Alpha, as opposed to date. Really nice would be making this a switch available from the remote. Of course this presents a little problem as you are using the numeric keys for time jump codes, but the TiVo uses the numeric pad to change the sort order and turn on and off groups. OTOH, there is nothing absolutely requiring consistency between the TiVo UI and your application, but still...

3. Enable the jump key to jump to the end and then the top of whatever folder is being listed.

4. Configurable fonts (probably in config.ini), with commensurately more or less lines on screen. The smallest screen I have where I will be using this utility is 62". More lines on screen and more characters per line would be great.

Edit: strike through most of #2, which was posted because of my own obtuseness.


----------



## moyekj

lrhorer said:


> This build doesn't work for me. On the trivial side, you might fix your installation instructions. In both the syntax text and the sample config.ini file, you specify the target directory specifier to be <top>, but this does not work. In the discussion text, however, you list the specifier as <topdir>, which does work. When I put <topdir> in the config.ini file, tivostream finds the target directory.
> 
> It seems to work fine for programs in the <topdir> directory, but when I try to transfer a program in a subdirectory of <topdir> the TiVo gives me an error saying, "Error: stream rejected by Tivo".
> 
> For example, /RAID/Recordings/Used Cars (Recorded Mon, Mar 03, 2008, HDNETMV).mpg plays just fine, but /RAID/Recordings/IMAX/Aliens of the Deep (Recorded Sat Mar 01, 2008, HDNETMV).mpg does not. I've tried several files in the /RAID/Recordings/ directory and they all work, and several in various subdirectories and none of them do.
> 
> They all worked under build 02 when I had the .jar file in the /RAID/Recordings directory.


 Hmm yes I'm still not happy with the file browser structure. What I changed was to build paths relative to the starting directory. For example, if you start the app in /RAID/Recordings but want to play videos in /RAID then the URI would be:
URI=http://<ip>:7288/videostream/../RAID/file
For the case you describe your file is below the starting directory so the behavior is not supposed to be different. Can you check that the URI it spits out to the console looks right? It should be in this example:
URI=http://<ip>:7288/videostream/RAID/Recordings/IMAX/Aliens of the Deep (Recorded Sat Mar 01, 2008, HDNETMV).mpg

Regarding top vs topdir I realized the mistake soon after posting the version and I deleted and replaced the html document (with same name), but seems like Google must have cache that prevents the changes from being seen, since when I download from there it's still wrong (and missing a .gif file that is supposed to be part of the zip file I also replaced).


----------



## lrhorer

moyekj said:


> I came from the ReplayTV world where streaming is true streaming. You can use all the normal trick play functions while streaming and you can jump all the way to the end of a recording instantly without waiting for buffer to build.


I see both sides of the argument for this. There are indeed times I wish I could jump past something whether the buffer is exhausted by the request or not. 'Mostly, this happens at the beginning of a program, when I might want to skip over the leader and intro credits. It's definitely low priority for me, however, and given a choice between stability and the ability to jump past the end of the buffer, I'll take stability.



moyekj said:


> it's good to have a much bigger buffer to avoid any playback glitches, but there's no reason the buffering needs to happen on the Tivo side. Let the server handle buffering.


Well, yeah, there is a reason for at least somewhat of a buffer on the TiVo side. Due to the nature of networking, even wired networking, and the fact the TiVo may vbe fairly busy doing other things, even if the network connection is on average sufficient to stream the program without pauses, in real time both the program data and the network utilization are going to be somewhat "bursty". Without at least several seconds of buffer, one is liable to run out of data even though the average data rate is lower than the average network performance. Of course with many of the programs I transfer, the LAN can't keep up, even with a very large buffer. Only by relying on at least a 15 minutes (about 2 gigabtes) of buffer, can I reliably expect to not have to sit and wait multiple times during the program. Doing so is very distracting. Of course, as I mentioned before, I hope h.264 encoding will eliminate the problem altogether.


----------



## moyekj

lrhorer said:


> This may be premature, but I figured I would go ahead and put in my suggestions for a wishlist:
> 
> 1. Subdirectories listed separately at the top, regardless of sort. Perhaps configurable via the config.ini file.
> 
> 2. Sort by Alpha, as opposed to date. Really nice would be making this a switch available from the remote. Of course this presents a little problem as you are using the numeric keys for time jump codes, but the TiVo uses the numeric pad to change the sort order and turn on and off groups. OTOH, there is nothing absolutely requiring consistency between the TiVo UI and your application, but still...
> 
> 3. Enable the jump key to jump to the end and then the top of whatever folder is being listed.
> 
> 4. Configurable fonts (probably in config.ini), with commensurately more or less lines on screen. The smallest screen I have where I will be using this utility is 62". More lines on screen and more characters per line would be great.


1. Yes that is my goal, have a list of individual shares at the top level that you can delve into. I'd like to resolve the Windows multiple volumes problem though before attempting that.
2. The numeric codes I implemented are only in effect during video playback. In file browser mode they currently do nothing. i.e. the remote control functions in file browser mode and playback mode are completely independent so no reason that type of thing could not be implemented.
3. Should be easy enough - in fact I'm surprised the default class I'm using in the bananas SDK doesn't already do that. Channel up and down at least work currently to skip up and down by page.
4. I programmed with that thing in mind to allow configuration of such things in long term by using variables everywhere instead of hard coded numbers. One annoying thing however is currently there's no easy way to get font size information (specifically how many pixels are occupied horizontally & vertically) on the fly thus making dynamic calculations based on font size very difficult. Via trial and error I can make a few different font sizes work but that's not a very appealing thing to work on right now.


----------



## lrhorer

moyekj said:


> For the case you describe your file is below the starting directory so the behavior is not supposed to be different. Can you check that the URI it spits out to the console looks right? It should be in this example:
> URI=http://<ip>:7288/videostream/RAID/Recordings/IMAX/Aliens of the Deep (Recorded Sat Mar 01, 2008, HDNETMV).mpg


No, it isn't. Here is the output to nohup.out:



Code:


Using vStrings!
>> Reading config file: config.ini
>>config: topdir=/RAID/Recordings
URI=http://192.168.0.56:7288/videostream/Aliens of the Deep (Recorded Sat Mar 01, 2008, HDNETMV).mpg
192.168.0.102 Aliens of the Deep (Recorded Sat Mar 01, 2008, HDNETMV).mpg HTTP GET - to factory /videostream/

As you can see, the directory structure is missing. This is what it looks like when I select one in the top directory:



Code:


URI=http://192.168.0.56:7288/videostream/../../..//RAID/Recordings/systm--0063--dolby--hd.h264.mp4
192.168.0.102 ../../..//RAID/Recordings/systm--0063--dolby--hd.h264.mp4 HTTP GET - to factory /videostream/




moyekj said:


> Regarding top vs topdir I realized the mistake soon after posting the version and I deleted and replaced the html document (with same name)


OK.


----------



## lrhorer

moyekj said:


> 1. Yes that is my goal, have a list of individual shares at the top level that you can delve into. I'd like to resolve the Windows multiple volumes problem though before attempting that.


Well, OK. Since I avoid Windows like the plague whenever possible, I don't care whether multiple volumes work on Windows, or not. 



moyekj said:


> 2. The numeric codes I implemented are only in effect during video playback. In file browser mode they currently do nothing. i.e. the remote control functions in file browser mode and playback mode are completely independent so no reason that type of thing could not be implemented.


Oh, duh! I realized my error a few minutes ago, but you had already posted this.


----------



## moyekj

lrhorer said:


> No, it isn't. Here is the output to nohup.out:
> 
> 
> 
> Code:
> 
> 
> Using vStrings!
> >> Reading config file: config.ini
> >>config: topdir=/RAID/Recordings
> URI=http://192.168.0.56:7288/videostream/Aliens of the Deep (Recorded Sat Mar 01, 2008, HDNETMV).mpg
> 192.168.0.102 Aliens of the Deep (Recorded Sat Mar 01, 2008, HDNETMV).mpg HTTP GET - to factory /videostream/
> 
> As you can see, the directory structure is missing. This is what it looks like when I select one in the top directory:
> 
> 
> 
> Code:
> 
> 
> URI=http://192.168.0.56:7288/videostream/../../..//RAID/Recordings/systm--0063--dolby--hd.h264.mp4
> 192.168.0.102 ../../..//RAID/Recordings/systm--0063--dolby--hd.h264.mp4 HTTP GET - to factory /videostream/


 Which directory are you running the app from? I've got a feeling the app is not getting the right initial CWD. Enabling more debug messages may shed more light on the problem. To enable debugging information, set shell variable DEBUG=1 before starting the app. Easy way to do that is add following in the run_unix.sh script before the app launch:
DEBUG=1; export DEBUG
That just spits out information about function calls and their arguments which may give me more information.
Then post what you see. You can P.M. me if you want to take this offline.


----------



## lrhorer

moyekj said:


> Which directory are you running the app from?


/usr/share/TiVoStream. Here is a snippet of the script:


Code:


JAVA_HOME=/usr/lib/jvm/jre1.6.0_03
#JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/jre
PATH=$PATH:$JAVA_HOME:$JAVA_HOME/bin

# Start tivostream
ps -ef | grep tivostream | grep java > /dev/null
if [ $? -gt 0 ];
then
        cd /usr/share/TiVoStream
	nohup java -cp tivostream_v0p3.jar com.tivo.hme.host.sample.Main com.hme.tivo.videostream.videostream & >> /var/log/tivostream.log
	echo Starting tivostream;
fi




moyekj said:


> Then post what you see. You can P.M. me if you want to take this offline.


OK, I will.


----------



## moyekj

New version posted. Previous version had a bad bug reported by Irhorer. Also added some of the easy stuff on Irhorer's wish list.
http://tivostream.googlecode.com/files/tivostream_v0p4.zip

RELEASE NOTES:
v0p4 - August 25, 2008
----------------------
CHANGES
* Fixed bug with incorrect http stream URI construction for certain
configurations.
* Skip ahead button on the remote now jumps to end of a list in file
browser mode and back to start of list if at end (just like Tivo
functionality).
* Changed default list sort order to alphanumeric and with folders always at
the top
* Added sort by file date option.
* Similar to Tivo Now Playing List sorting pressing 1 toggles between
alphanumeric and file date list sorting in file browser mode.


----------



## lrhorer

moyekj said:


> New version posted. Previous version had a bad bug reported by Irhorer. Also added some of the easy stuff on Irhorer's wish list.


Thanks! Oh, just BTW, that's Lrhorer, not Irhorer.


----------



## moyekj

P.S. Next version I'll make it so when you pop back left in file browser mode it remembers and returns to the file/folder you traversed into. (Currently it returns to 1st item in the list).


----------



## SMWinnie

Has anyone tried tivostream with the output of a Hauppauge 1212 HD-PVR?


----------



## moyekj

SMWinnie said:


> Has anyone tried tivostream with the output of a Hauppauge 1212 HD-PVR?


 If it's like other PC tuners it probably defaults to mpeg2 transport stream as an output. Some tuners allow you to save in mpeg2 program stream format instead. Currently I don't think anyone has figured out how to successfully feed an mpeg2 transport stream to Series 3 Tivos - they must be in mpeg2 program stream format.
HDTVtoMPEG2 is an example of freeware that can convert from transport stream to program stream (and edit out commercials). There are plenty of non-free tools such as VideoRedo that can do that too.


----------



## fyodor

This is a new product that came out a few months ago. It captures HD component video and compresses it to a high definition h264 transport stream.

The transport streams are famously hard to play back correctly outside of applications that did not make a specific decision to support the HD-PVR so I'd be very surprised if this worked with Tivo.

F



moyekj said:


> If it's like other PC tuners it probably defaults to mpeg2 transport stream as an output. Some tuners allow you to save in mpeg2 program stream format instead. Currently I don't think anyone has figured out how to successfully feed an mpeg2 transport stream to Series 3 Tivos - they must be in mpeg2 program stream format.
> HDTVtoMPEG2 is an example of freeware that can convert from transport stream to program stream (and edit out commercials). There are plenty of non-free tools such as VideoRedo that can do that too.


----------



## moyekj

fyodor said:


> This is a new product that came out a few months ago. It captures HD component video and compresses it to a high definition h264 transport stream.
> 
> The transport streams are famously hard to play back correctly outside of applications that did not make a specific decision to support the HD-PVR so I'd be very surprised if this worked with Tivo.
> 
> F


 Interesting. Being a transport stream it would still at minimum require conversion to program stream before attempting to stream to Tivo.


----------



## moyekj

A note for those running other HME based applications such as Galleon. This already is described in documentation of latest release: you can tell this application to use a different port than default port 7288 if you like by adding --port # at the end of the java command used to launch the application.


----------



## cleverdevil

I have an older Mac Mini I'd like to run this on, and the newest version of the JRE available is Java 5 (1.5.x). Can you compile the jar with a 1.5 target, so that I can try it out?

I checked out the source, but it didn't seem to include any sort of build files or dependencies, so I gave up pretty quickly.

Thanks!


----------



## moyekj

cleverdevil said:


> I have an older Mac Mini I'd like to run this on, and the newest version of the JRE available is Java 5 (1.5.x). Can you compile the jar with a 1.5 target, so that I can try it out?
> 
> I checked out the source, but it didn't seem to include any sort of build files or dependencies, so I gave up pretty quickly.
> 
> Thanks!


 Sent you a P.M. with build from source instructions.


----------



## windracer

moyekj said:


> you can tell this application to use a different port than default port 7288 if you like by adding --port # at the end of the java command used to launch the application.


Nice. :up:


----------



## lrhorer

moyekj said:


> A note for those running other HME based applications such as Galleon. This already is described in documentation of latest release: you can tell this application to use a different port than default port 7288 if you like by adding --port # at the end of the java command used to launch the application.


Thanks. I may do that just because. By running tivostream first and then Galleon, it seems to avoid the issue.


----------



## lrhorer

OK, the next step is to convert my video library to MPEG-IV. I'm having some problems getting a playable mp4 stream, however. I can get a great looking conversion with about a 40% space savings using the following:



Code:


ffmpeg -i filename.mpg -b38810 -acodec copy filename.mp4

but ffmpeg warns about the file not being playable, and although Nero will play the file, it won't play audio. The TiVo rejects it entirely. I've tried various permutations of the -ac switch, but it usually just croaks saying the codec is unsupported. Most of the material is 5.1 Dolby, originally recorded on the Tivo. How do I get this to convert to a TiVo-friendly h.264 format with 5.1 audio?


----------



## djwilso

I was able to download an MP4 video file from iTunes that this would play, but for some reason all of the files I've tried to create myself using CloneDVD Mobile using the Apple TV option all get an error on the TiVo saying they are rejected for some reason. All of the files play fine on the computer, in iTunes, Windows Media Player, Media Player Classic, Nero Showtime, etc.

The files transfer over using pyTiVo just fine, of course.

Any ideas what might be wrong with my files? I've tried various forms of naming conventions and have tried both large and very small files, but I get the same result.

Are there constraints with which audio or video codecs are allowed?

Not sure how I can create a compatible MP4 file that the TiVo will play.

What applications can I try if I want to convert a DVD into an MP4 file that will stream properly using this application? I have Nero 8 installed.

Thanks,
Dennis


----------



## moyekj

Major breakthrough tonight - I finally figured out how to allow streaming from different file volumes/partitions in Windows. It's actually quite trivial - the trick was getting the right URI which I finally figured out in Java with File.toURL().toURI() functions. This will be very useful for anyone using Windows and storing video files on external drives (like me!).

Now I can focus on allowing multiple top directories to be specified in config.ini as a top screen starting point.


----------



## jtkohl

moyekj said:


> A note for those running other HME based applications such as Galleon. This already is described in documentation of latest release: you can tell this application to use a different port than default port 7288 if you like by adding --port # at the end of the java command used to launch the application.


For Galleon, you can change the port in the properties panel (menu item) from the configuration tool.


----------



## Chew

Would it be possible to include a sample "config.ini" file with the next release?


----------



## wmcbrine

lrhorer said:


> How do I get this to convert to a TiVo-friendly h.264 format with 5.1 audio?





wmcbrine said:


> The MPEG-4 files that work (so far) are h.264 video, AAC audio, in a Quicktime (MOV) wrapper.


But I can't comment specifically on the issue of 5.1.


----------



## moyekj

Too busy right now to play around with ffmpeg conversions to see what Tivo likes but I'm sure there are others familiar with ffmpeg here that can post what works for them (hopefully preserving 5.1 audio if present in original source).


----------



## moyekj

Chew said:


> Would it be possible to include a sample "config.ini" file with the next release?


 Will do. With the upcoming release there will be a little change in that under <topdir> now multiple top level directories can be specified (1 per line), but other than that no change to current syntax described in html doc.


----------



## windracer

How about the ability to customize the name of the app on the menu instead of just 'videostream'?


----------



## moyekj

Some good stuff in this release as well as a fix to FF/REW.
NOTE: Very simple sample config.ini is now included with the installation. You should edit the file to add paths to your video files under the <topdir> line before starting the application. You can add any paths you like now from any file volume and it doesn't matter if they don't all exist at the time you run (non-existent paths are ignored).

http://code.google.com/p/tivostream/downloads/list

v0p5 - August 27, 2008
----------------------
* Added capability to stream files from any file volume.
* Added option to configure multiple top directories as starting point
for file browser (see documentation).
* Made file suffix checking case insensitive.
* When returning from a directory you are no longer thrown to the
top of the list.
* Switched to use the more stable (non-experimental) HME version 1.4.
* Added Tivo sounds where previously they were missing.
* Clear number display & buffer immediately after n min jump forwards/back
* Change application showing under Music, Photos, Products & More
to "Video Streamer"
* Added error text id & message display when video playback fails.
* Documentation updated


----------



## windracer

I can get tivostream to run through Galleon, sharing port 7288, but there must be some conflicting functions in the jar because some of my Galleon apps will crash.

So for now I'm back to running it separately with the --port command-line parameter.


----------



## Sevenfeet

First of all, thanks to Moyekj for working on this. Unfortunately, I've yet to be successful in getting a movie to play.

I have a small collection of movies from my DVD collection that I have converted via Handbrake using default options. A few of the movies were converted using Roxio's Toast for the Mac.

Getting an environment to play a movie wasn't easy. Although I have lots of hardware in the house, most of it is Mac hardware. In order to run a Java 1.6 app, I need a 64-bit Mac and only my wife's Macbook Pro fits the bill. She usually is using that machine for school so I didn't want to try to configure it.

I do have an ancient Sun Ultra 60 running Solaris 10, but I don't think I have Java 1.6 on it. I'm about to rebuild this machine so I'll make sure it's included when that happens.

That leaves my Thinkpad laptop running Windows XP SP2 that I use for work. After loading Java 1.6 on it, monkeying around with the config.ini file syntax and doing the upgrade to p5, I at least got to the point where error messages on the console ended. The fact that p5 can play movies from a network share helped since all of my movies sit on a file server in the house. But every time I tried to play something, I got an error from the Tivo screen saying the movie couldn't be played with an "0xffff" error.

I've read in this thread about the fact that the Tivo might be sensitive to how movies are converted for playback. The Sony PS3 is extremely sensitive to this versus my Macs that will pretty much play anything thrown at them. So assuming the error I'm seeing is a playback error, what should I be doing (or not doing) to properly convert a movie that the Tivo would like?


----------



## windracer

windracer said:


> How about the ability to customize the name of the app on the menu instead of just 'videostream'?





moyekj said:


> * Change application showing under Music, Photos, Products & More to "Video Streamer"


Nice. :up:


----------



## PaulS

I've had my first successes streaming video with this latest version. I had no luck with the previous versions (v0p3 and v0p4), but this newest build is up and running without issue. 720p H.264 content stream just fine, at slightly faster than realtime on my semi-clunky Athlon 3000+ (2.0GHz) machine over a longish 802.11g wireless network.

Thanks moyekj!


----------



## moyekj

Sevenfeet said:


> I've read in this thread about the fact that the Tivo might be sensitive to how movies are converted for playback. The Sony PS3 is extremely sensitive to this versus my Macs that will pretty much play anything thrown at them. So assuming the error I'm seeing is a playback error, what should I be doing (or not doing) to properly convert a movie that the Tivo would like?


 First I would establish that you can indeed play back a known to work video such as systm--0063--dolby--hd.h264.mp4 posted earlier in this thread which is a HD h.264 encoding. If that one works it establishes that your problem is indeed an encoding the Tivo can't handle.
NOTE: That one is a pretty big download, so if you have a decrypted mpeg2 from a Tivo to try instead that would be a good option too.
I've never used handbrake but I'm sure there are configuration options for the encoding that can be tweaked to make it work. One of these nights I'm going to have to play around with ffmpeg/mencoder/handbrake and figure out an encoding recipe that works starting from a small mpeg2 clip. Currently most of my videos are in mpeg2 format as they came mostly from my Tivos and I don't like to lose any quality by re-encoding and I haven't tried re-encoding them to mpeg4/h.264. If anyone else here has movies they have converted to mpeg4/h.264 please share your recipe.


----------



## moyekj

windracer said:


> How about the ability to customize the name of the app on the menu instead of just 'videostream'?





moyekj said:


> * Change application showing under Music, Photos, Products & More to "Video Streamer"





windracer said:


> Nice. :up:


Original plan was to make the name configurable as well (in config.ini) but it's not possible as the name must be defined in the main class constructor which gets called before the parsing of the config.ini file happens.
For next release I've added some font customization capability (medium,large,small choices) to config.ini.


----------



## gonzotek

moyekj said:


> Original plan was to make the name configurable as well (in config.ini) but it's not possible as the name must be defined in the main class constructor which gets called before the parsing of the config.ini file happens.


Just a thought, but what about passing it as a commandline option, defaulting to "Video Streamer" if nothing is given?


----------



## Sevenfeet

moyekj said:


> First I would establish that you can indeed play back a known to work video such as systm--0063--dolby--hd.h264.mp4 posted earlier in this thread which is a HD h.264 encoding. If that one works it establishes that your problem is indeed an encoding the Tivo can't handle.
> NOTE: That one is a pretty big download, so if you have a decrypted mpeg2 from a Tivo to try instead that would be a good option too.
> I've never used handbrake but I'm sure there are configuration options for the encoding that can be tweaked to make it work. One of these nights I'm going to have to play around with ffmpeg/mencoder/handbrake and figure out an encoding recipe that works starting from a small mpeg2 clip. Currently most of my videos are in mpeg2 format as they came mostly from my Tivos and I don't like to lose any quality by re-encoding and I haven't tried re-encoding them to mpeg4/h.264. If anyone else here has movies they have converted to mpeg4/h.264 please share your recipe.


I'm downloading it now. Can you also PM me the instructions to build this under a Java 1.5 release instead of 1.6?

And I guess I can always try DVD Shrink for my DVDs instead of handbrake.


----------



## moyekj

gonzotek said:


> Just a thought, but what about passing it as a commandline option, defaulting to "Video Streamer" if nothing is given?


 Not really feasible. I'm using Tivo's com.tivo.hme.host.sample.Main as the entry point to the application so can't define my own command line arguments to parse. So short of writing my own Main that's currently not possible.


----------



## jmemmott

moyekj said:


> That is interesting. Out of curiosity can you get captions with any YouTube files? Does YouTube even support closed captioning?


I just thought I would update my response because You Tube has added supporting for captioning. I think that it still holds that the Tivo stream will not support this at this time. I plan to continue to follow events and do something when/if I can.

http://www.youtube.com/blog?entry=mi8D3ntPgFQ


----------



## moyekj

jmemmott said:


> I just thought I would update my response because You Tube has added supporting for captioning. I think that it still holds that the Tivo stream will not support this at this time. I plan to continue to follow events and do something when/if I can.
> 
> http://www.youtube.com/blog?entry=mi8D3ntPgFQ


 I would think if/when Tivo updates software to support closed captioning from YouTube streams that this application would automatically start working as well. i.e. If the CC data is part of the stream then Tivo should be able to display them. I don't think it's practical for the HME server (such as YouTube or this application) to generate the CC text because of the networking lags involved, the synchronization issues and the fact that the server would have to have it's own decoder doing CPU intensive work. It makes a lot more sense to pass the data to the Tivo and let it handle display just as it does for normal playback.


----------



## jmemmott

moyekj said:


> I would think if/when Tivo updates software to support closed captioning from YouTube streams that this application would automatically start working as well. i.e. If the CC data is part of the stream then Tivo should be able to display them. I don't think it's practical for the HME server (such as YouTube or this application) to generate the CC text because of the networking lags involved, the synchronization issues and the fact that the server would have to have it's own decoder doing CPU intensive work. It makes a lot more sense to pass the data to the Tivo and let it handle display just as it does for normal playback.


In principal, I agree but it is the "if/when" that I don't care for. I have a mixed reaction to the support Tivo gives to captioning. When it is internal to their box, they have shown themselves to be responsive and even innovative such as the CC over HDMI on the Series 3 and the reasonably prompt inclusion of an easier way to toggle the caption on/off in the software. On the other hand, if I had waited for Tivo to do something on with the Tivo Desktop, I would still be waiting for the support T2Sami provides.

Simply including the CC data in the stream is not enough. It is already there in any mpegs that derive from a .tivo source. Additionally, there is no reason to believe that You Tube will adopt a protocol that is compatible with the one Tivo uses although that would be nice.

The part that is exciting for me is that You Tube /Google is one of the first prominent web player to do something about providing a mechanism to deliver captioned video. From that point on a final delivery solution can be created, convenient or not. It took time to for me to fully support normal Tivo captioning in both directions and knowing my schedule, it will take time to support captions in a You Tube steam. But the point is that it is now possible whether Tivo implements it or not.


----------



## wmcbrine

moyekj said:


> It makes a lot more sense to pass the data to the Tivo and let it handle display just as it does for normal playback.


"just as it does for normal playback" means rendering it through an HME-like mechanism. There is zero chance that they're going to do it for you on streamed video.


----------



## moyekj

wmcbrine said:


> "just as it does for normal playback" means rendering it through an HME-like mechanism. There is zero chance that they're going to do it for you on streamed video.


 Help me understand why that's the case? They already have a CC rendering mechanism built into the Tivo when displaying recorded videos, so why could that not be put to use? If it can't be done on the Tivo then if they want to implement it say for YouTube then the load of rendering will fall squarely on the YouTube HME servers? That seems like it could be a lot of horsepower required if so to support many users at a time if done on the fly (unless they pre-process videos they serve ahead of time or something of that nature).

One feasible way I could envision implementing this via HME is pre-processing a video file and generating a helper file that could be accessed during playback. In simplest form it would have time position & text+formatting instructions that can be consulted to do the rendering. This would be a lot simpler than trying to do it dynamically.


----------



## jmemmott

moyekj said:


> One feasible way I could envision implementing this via HME is pre-processing a video file and generating a helper file that could be accessed during playback. In simplest form it would have time position & text+formatting instructions that can be consulted to do the rendering. This would be a lot simpler than trying to do it dynamically.


And early looks at the You Tube mechanism seem to lead to the implication that this is what they are doing. In part that is why they are supporting .sup and .srt formats which are basically your "helper file".

The issue on the Tivo is that the mechanism for ATSC captions is nothing like that. These captions have to be muxed into the video stream in a very specific format and the timing relies entirely on the timing of that stream including the timing anomalies created by B-frames. ATSC captions have been made to work with mpeg-2 and could be made to work mpeg-4 streams but to my knowledge aren't used that way for mpeg-4. Finally all this is handled in the Tivo by the hardware. There is little Tivo can do to alter it retroactively.

So the choice on that path is to get the stream to exactly mimic the formatting the Tivo expects which is what T2Sami does when it works to send close captioned video back through pyTivo. The other choice is to come up with an alternate mechanism geared to work well with the You Tube mpeg-4 streams. That in turn requires the ability to overlay text onto the video stream. So far it appears the suggested HME solution may be the only one available for that.

Could Tivo do this inside the box more effectively - certainly. Will they - As I noted, their track record in this area is not one I trust.


----------



## lrhorer

I'm going to submit another suggestion and a question.

The suggestion is to allow the user to configure a name for each share. It's purely cosmetic, of course, but having shares of "Main" and "Videos Sorted by Genre" make more sense on the TiVo than /RAID/Recordings and /usr/share/pyTivo/wgw/pyshares, or at least look much nicer.

The question is this: Assuming TiVo comes up with support for streaming and / or h.264 in HMO applications, how difficult will it be to convert your application to HMO? I've glanced briefly at some HMO programming, but I haven't dug deeply into it, and I haven't looked at HME at all. Your application is really great, but it would be really nice if it showed up inthe NPL, rather than under Downloads, etc.


----------



## lrhorer

lrhorer said:


> How do I get this to convert to a TiVo-friendly h.264 format with 5.1 audio?





wmcbrine said:


> The MPEG-4 files that work (so far) are h.264 video, AAC audio, in a Quicktime (MOV) wrapper.





wmcbrine said:


> But I can't comment specifically on the issue of 5.1.


So far I can't get it to work with any switch for -acodec at all. I even tried the sample in the ffmpeg man page, and still no matter what I get:



Code:


Unsupported codec for output stream #0.1


----------



## wmcbrine

lrhorer said:


> The question is this: Assuming TiVo comes up with support for streaming and / or h.264 in HMO applications, how difficult will it be to convert your application to HMO?


It would be impossible, since HMO and HME have nothing in common at all. However, it would (and will) be easy to support h.264 in pyTivo, if and when it can be done in HMO at all (and we can see how).

Streaming video will never be associated with HMO.



> Code:
> 
> 
> Unsupported codec for output stream #0.1


So, you need to get or build a version of ffmpeg that supports it.


----------



## moyekj

lrhorer said:


> The suggestion is to allow the user to configure a name for each share. It's purely cosmetic, of course, but having shares of "Main" and "Videos Sorted by Genre" make more sense on the TiVo than /RAID/Recordings and /usr/share/pyTivo/wgw/pyshares, or at least look much nicer.


 Next version I'm working on already has something like that where you can optionally provide a name for each share in the config.ini file and the names are what you see at top level (if no name given then the full dir name is displayed as normal).
I've added several new configuration items to config.ini including control over instant replay/skip forwards times, status bar & info text timeout values, font size and a couple of others. I think there are enough changes in my development version to warrant another release soon.


----------



## lrhorer

wmcbrine said:


> So, you need to get or build a version of ffmpeg that supports it.


I'm not sure how I woud go about that. More properly, I assumed it already would, and don't know why it doesn't. According to the notes in the Debian distro, I've got the most recent Deb package for ffmpeg on a 64 bit AMD processor, and I have the latest codec library. How would I go about compiling additional codecs into the application, and which ones?


----------



## moyekj

lrhorer said:


> I'm not sure how I woud go about that. More properly, I assumed it already would, and don't know why it doesn't. According to the notes in the Debian distro, I've got the most recent Deb package for ffmpeg on a 64 bit AMD processor, and I have the latest codec library. How would I go about compiling additional codecs into the application, and which ones?


 You can see list of codecs compiled into the binary you are using by executing "ffmpeg -formats". For missing codecs you have to obtain and build those and then when you build ffmpeg from source you have to include them.
For example if "libxvid" was missing you would obtain the codec from here and then compile it.
Then when building ffmpeg from source you would use the configure --enable-libxvid (along with --extra-cflags and --extra-ldflags to include the headers and libs of libxvid) option to add it.
The standard build of ffmpeg (and libxvid example above) from source is pretty easy and follows the GNU norms:
./configure
make
make install

As to which particular codecs you are missing first you should try and discover the codecs used in your source video that you are trying to convert. Which particular audio codecs the Tivo supports I don't know...


----------



## Rdian06

lrhorer said:


> I'm not sure how I woud go about that. More properly, I assumed it already would, and don't know why it doesn't. According to the notes in the Debian distro, I've got the most recent Deb package for ffmpeg on a 64 bit AMD processor, and I have the latest codec library. How would I go about compiling additional codecs into the application, and which ones?


If I'm reading this right, the only h264 video that works is in an MP4 container (MOV wrapper). From what I understand of the MP4 container, the only 5.1 audio it can contain according to spec is AAC 5.1. You can force AC3 5.1 (aka Dolby Digital) into the container (ala -acodec copy), but that violates spec.

So to remain within spec for MP4, you would need to convert the AC3 5.1 to AAC 5.1. To get ffmpeg to do that, your ffmpeg has to be compiled with libfaac support. ffmpeg itself doesn't have a native AAC encoder currently (it's in development, an initial AAC decoder was recently added to ffmpeg trunk), hence the need for the library.

However, even if you create an mp4 file with h264 video and AAC 5.1 audio and the Tivo will play it with tivostream, no one knows what will happen with the audio. If the Tivo just bitstreams the AAC 5.1 signal to your receiver, then chances are your receiver doesn't support AAC 5.1 and won't know what to do with the signal. If you happen to have an AAC 5.1 capable receiver, it just might work.

In my case, my receiver can't handle AAC 5.1 so I would have to hope that Tivo wrote a AAC 5.1 decoder and then set the Tivo unit to decode it to PCM and pass that out to my receiver. If they did that then maybe I could get 5.1 audio.

Has anyone tried playing an EVO or an Mpeg2 TS file with tivostream? Both those support h264 video and AC3 5.1 audio.


----------



## moyekj

Rdian06 said:


> Has anyone tried playing an EVO or an Mpeg2 TS file with tivostream? Both those support h264 video and AC3 5.1 audio.


 I tried throwing a couple of mpeg2 transport streams (recorded from a PC QAM tuner) at my Tivo S3 via tivostream and no go. All mpeg2 program streams I've tried thus far seem to work OK. NOTE: Currently in tivostream I don't send any "hints" to the Tivo about video format. When setting up a stream there is an option to specify what kind of stream it is, for example "video/mpeg2". It could be that explicitly specifying the format you are sending could help make it work. One thing I may try is "video/x-tivo-raw-tts" for transport streams (which works to pull videos off Tivos in transport stream format - though they are still encrypted that way).


----------



## Rdian06

moyekj said:


> One thing I may try is "video/x-tivo-raw-tts" for transport streams (which works to pull videos off Tivos in transport stream format - though they are still encrypted that way).


A little off topic, but do you mean encrypted as in .tivo file encrypted with the Tivo MAK, or encrypted some other way?

It would be nice to be able to pull video from non-copyprotected broadcasts off my Tivo S3 at something approaching MRV speed rather than the really slow TTG speed.


----------



## moyekj

Rdian06 said:


> A little off topic, but do you mean encrypted as in .tivo file encrypted with the Tivo MAK, or encrypted some other way?
> 
> It would be nice to be able to pull video from non-copyprotected broadcasts off my Tivo S3 at something approaching MRV speed rather than the really slow TTG speed.


 [WAY OFF TOPIC] Some network sniffing I did with a hub revealed that when you initiate MRV between 2 S3 Tivos the URL used is same as a normal TTG URL except with a different format specification: "&Format=video%2Fx-tivo-raw-tts". Trying that from a web browser worked and allowed me to download a video at MRV speeds which was great news. The bad news is that it is encrypted in some format I don't know how to deal with (tivodecode doesn't know what to do with it so it's not the normal .TiVo encrypted format), so it's pretty worthless. I can only hope someone a lot more gifted at dealing with encryption can crack it, but I'm at a loss what to do with it. [/WAY OFF TOPIC]


----------



## lrhorer

moyekj said:


> You can see list of codecs compiled into the binary you are using by executing "ffmpeg -formats".


Yeah, that I know. The ac3 codec is there, but not libfaac, assuming libfaac is the library I need. From suggestions elsewhere, it's possible I also may need libx264, although I'm not certain. The Debian build says it supports H.264 encoding without that codec. I surmise it might be needed for the Quicktime wrapper, however, if that is needed.



moyekj said:


> For missing codecs you have to obtain and build those and then when you build ffmpeg from source you have to include them.


I'm stumbling on this one. I can't seem to find a single tarball with the ffmpeg source code. The mplayer project has tons of individual source code files, but I'm a bit lost on which ones I need to compile ffmpeg manually.



moyekj said:


> For example if "libxvid" was missing you would obtain the codec from here and then compile it.
> Then when building ffmpeg from source you would use the configure --enable-libxvid (along with --extra-cflags and --extra-ldflags to include the headers and libs of libxvid) option to add it.


Yeah, that much I also understand, but first I have to have all the files I need to compile ffmpeg itself.



moyekj said:


> The standard build of ffmpeg (and libxvid example above) from source is pretty easy


I'm sure it is once I have all the source files and directory structure in place. It also will be simple once I know which codecs I actually need. At this point I am uncertain.



moyekj said:


> As to which particular codecs you are missing first you should try and discover the codecs used in your source video that you are trying to convert. Which particular audio codecs the Tivo supports I don't know...


I'm not seeming to have any troubles with the source codecs. It recognizes the input video and audio just fine. It's the output with which I am having trouble, first of all in knowing which codecs I actually need, and then figuring out how to gather everything I need to compile ffmpeg.


----------



## lrhorer

moyekj said:


> [WAY OFF TOPIC]Trying that from a web browser worked and allowed me to download a video at MRV speeds which was great news. The bad news is that it is encrypted in some format I don't know how to deal with (tivodecode doesn't know what to do with it so it's not the normal .TiVo encrypted format)


The .TiVo format is not really encrypted. I'm given to understand it's really just an MPEG-II transport stream file with some xml information embedded in it.



moyekj said:


> so it's pretty worthless. I can only hope someone a lot more gifted at dealing with encryption can crack it, but I'm at a loss what to do with it. [/WAY OFF TOPIC]


I don't believe anyone has broken TiVo's encryption scheme, and I doubt they ever will. Disabling encryption on the Tivo is fairly simple, though, and there are utilities to pull off the unencrypted ty streams and to convert from a ty stream to an ordinary MPEG-II transport stream. This all requires hacking the TiVo, however.


----------



## moyekj

lrhorer, ffmpeg source I usually grab from here (which corresponds to very latest source code):
http://ffmpeg.mplayerhq.hu/ffmpeg-export-snapshot.tar.bz2


----------



## lrhorer

moyekj said:


> lrhorer, ffmpeg source I usually grab from here (which corresponds to very latest source code):
> http://ffmpeg.mplayerhq.hu/ffmpeg-export-snapshot.tar.bz2


Thanks! I'll check it out.


----------



## wmcbrine

lrhorer said:


> More properly, I assumed it already would, and don't know why it doesn't. According to the notes in the Debian distro, I've got the most recent Deb package for ffmpeg on a 64 bit AMD processor, and I have the latest codec library.


The builds of ffmpeg included with Debian and Ubuntu are crap. Part of that might be patent issues; part of it is that they're just out of date.


----------



## lrhorer

Well, I'm getting closer. I really appreciate all the help. Assuming I needed libx264 and libfaac, I went into the libavcodec directory from the tarball and ran 'make libx264' and 'make libfaac', but both failed with a number of compile errors, the most obvious being both source files call for header files (x264.h and faac.h, respectively) that aren't there. I don't see them on the ffmpeg download page, either.


----------



## moyekj

lrhorer said:


> Well, I'm getting closer. I really appreciate all the help. Assuming I needed libx264 and libfaac, I went into the libavcodec directory from the tarball and ran 'make libx264' and 'make libfaac', but both failed with a number of compile errors, the most obvious being both source files call for header files (x264.h and faac.h, respectively) that aren't there. I don't see them on the ffmpeg download page, either.


 You should use the "configure script" to prepare for compile:
./configure --enable-libx264 --enable-libfaac
(look in the configure script itself for all available switches)
After a successful configure (where it can get all dependencies) then it's a simple make:
make
make install
(you may also want to use the --prefix=/custom/path with configure to install in non-standard location)


----------



## lrhorer

moyekj said:


> You should use the "configure script" to prepare for compile:
> ./configure --enable-libx264 --enable-libfaac


Yeah, I did that, and those switches are indeed listed, but the attempt yields errors saying libfaac and x264 are not found. (One needs GPL enabled as well for libx264, but I did that.) I presumed the failure was due to libfaac and libx264 not being compiled, so I went into the libavcodec directory and tried compiling libx264 and libfaac.



moyekj said:


> After a successful configure (where it can get all dependencies) then it's a simple make:
> make
> make install
> (you may also want to use the --prefix=/custom/path with configure to install in non-standard location)


I'm not using a custom path, and ./configure with no options works fine, but it fails for libx264 and libfaac.


----------



## moyekj

New tivostream version just released:
http://tivostream.googlecode.com/files/tivostream_v0p6.zip

v0p6 - August 29, 2008
----------------------
* Added capability to customize font size in config.ini:
large, medium (default), small
* Added capability to give friendly names to top level directories
in the config.ini file.
* Added capability to customize instant replay, skip forwards, info timeout,
status bar timeout and slow speed in config.ini.
* Comment lines are now allowed in config.ini (lines starting with #)
* Sample config.ini includes all new settings and comments with descriptions
* Updated documentation to document the new config.ini options.
* Added automatic parsing of pyTivo metadata files. i.e. If you have a
file with same name as video file but with .txt extension at the end in
pyTivo syntax then the file is parsed and information is shown on screen
when you press Info button.

NOTE: For the metadata information display it's very crude right now with plenty of room for improvement, but at least the infrastructure is in place for easy future updates.


----------



## lrhorer

Oh, way cool! Now if I can just get ffmpeg working to transcode to h.264...


----------



## moyekj

lrhorer said:


> Oh, way cool! Now if I can just get ffmpeg working to transcode to h.264...


 You have to build libx264 and libfaac separately before building ffmpeg. I haven't tried yet but the corresponding builds you can get here:
http://downloads.sourceforge.net/faac/faac-1.26.tar.gz
ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20080829-2245.tar.bz2


----------



## lrhorer

moyekj said:


> NOTE: For the metadata information display it's very crude right now with plenty of room for improvement, but at least the infrastructure is in place for easy future updates.


Yeah, the first thing on my list is the program names in the main list. For example, the file name might be "2 Harry Potter and the Chamber of Secrets (Recorded Sat Apr 12, 2008, KSATDT).mpg, but in the metafile the title is "Harry Potter and the Chamber of Secrets" and the episode title is "...and the Chamber of Secrets". Since I'm in the "Harry Potter" directory, the "Harry Potter" is not absolutely necessary, although now with the smaller fonts, it will all fit. So it would be nice if the main program display were either the title field (great now with the smaller fonts) or the episode title filed from the metafile, rather than the filename. Of course pyTivo utilizes the episode title, which is why I put the truncated name there, but with the smaller fonts the full title is actually preferable, since some of the shares don't separate by folder that way.

I've got to say, man, you're doing a fabulous job with this utility.


----------



## moyekj

lrhorer said:


> Yeah, the first thing on my list is the program names in the main list. For example, the file name might be "2 Harry Potter and the Chamber of Secrets (Recorded Sat Apr 12, 2008, KSATDT).mpg, but in the metafile the title is "Harry Potter and the Chamber of Secrets" and the episode title is "...and the Chamber of Secrets". Since I'm in the "Harry Potter" directory, the "Harry Potter" is not absolutely necessary, although now with the smaller fonts, it will all fit. So it would be nice if the main program display were either the title field (great now with the smaller fonts) or the episode title filed from the metafile, rather than the filename. Of course pyTivo utilizes the episode title, which is why I put the truncated name there, but with the smaller fonts the full title is actually preferable, since some of the shares don't separate by folder that way.
> 
> I've got to say, man, you're doing a fabulous job with this utility.


 Thanks, I think a lot of the low-hanging fruit type stuff is now out of the way. There are plenty of harder challenges to tackle yet, such as:
* bookmarking location where you last left off viewing a file so you can resume viewing from that point (I think this is possible with some more investigation/work. It sounds easy on the surface but though I have the time point where you stopped viewing I need the corresponding location in bytes of the file)
* ability to jump beyond available buffer (this may not be possible but a worthwhile endeavor)
* some kind of closed captioning support


----------



## moyekj

moyekj said:


> You have to build libx264 and libfaac separately before building ffmpeg. I haven't tried yet but the corresponding builds you can get here:
> http://downloads.sourceforge.net/faac/faac-1.26.tar.gz
> ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20080829-2245.tar.bz2


I got ffmpeg to build with libx264 & libfaac after building the libs given above. One spot of trouble I had is you need to pass -lpthread as an extra ldflag option for ffmpeg configure:


Code:


./ffmpeg -formats | grep lib
FFmpeg version SVN-r15018, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/home/moyekj/linux/src/ffmpeg --enable-gpl --enable-libx264 --enable-libfaac --extra-cflags=-I/home/moyekj/linux/src/ffmpeg/include --extra-ldflags=-L/home/moyekj/linux/src/ffmpeg/lib -lpthread
  libavutil     49.10. 0 / 49.10. 0
  libavcodec    51.70. 0 / 51.70. 0
  libavformat   52.21. 0 / 52.21. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  built on Aug 29 2008 19:15:09, gcc: 3.4.6 20060404 (Red Hat 3.4.6-3)
  EA    libfaac         libfaac AAC (Advanced Audio Codec)
  EV    libx264         libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
 DEV D  zlib            LCL (LossLess Codec Library) ZLIB


----------



## lrhorer

moyekj said:


> You have to build libx264 and libfaac separately before building ffmpeg.


I'm still not quite getting there, I'm afraid. I ran the configure utility for the x264 library which completes just fine, but the make spits out tons of errors if I include the --enable-mp4-output, which I think I need. If not, then I think I'm OK with that codec, as I can configure it into ffmpeg. Don't I need the mp4 output, though, or will ffmpeg take care of that?

The ffmpeg configure utility seems to work OK with both libx264 and libfaac enabled, but I can't get ffmpeg to make. Even with nothing enabled but the defaults for configure, make errors out. There are lots of undefined references, and the linker exits with various errors depending on what I specify in the configure command line.


----------



## Rdian06

lrhorer said:


> I'm still not quite getting there, I'm afraid. I ran the configure utility for the x264 library which completes just fine, but the make spits out tons of errors if I include the --enable-mp4-output, which I think I need. If not, then I think I'm OK with that codec, as I can configure it into ffmpeg. Don't I need the mp4 output, though, or will ffmpeg take care of that?
> 
> The ffmpeg configure utility seems to work OK with both libx264 and libfaac enabled, but I can't get ffmpeg to make. Even with nothing enabled but the defaults for configure, make errors out. There are lots of undefined references, and the linker exits with various errors depending on what I specify in the configure command line.


What version of the x264 library did you get? I just looked at the configure script in git and it doesn't have an --enable-mp4-output option:



Code:


echo "Usage: ./configure [options]"

   6 echo ""

   7 echo "available options:"

   8 echo ""

   9 echo "  --help                   print this message"

  10 echo "  --disable-avis-input     disables avisynth input (win32 only)"

  11 echo "  --disable-mp4-output     disables mp4 output (using gpac)"

  12 echo "  --disable-pthread        disables multithreaded encoding"

  13 echo "  --disable-asm            disables assembly optimizations on x86"

  14 echo "  --enable-gtk             build GTK+ interface"

  15 echo "  --enable-debug           adds -g, doesn't strip"

  16 echo "  --enable-gprof           adds -pg, doesn't strip"

  17 echo "  --enable-visualize       enables visualization (X11 only)"

  18 echo "  --enable-pic             build position-independent code"

  19 echo "  --enable-shared          build libx264.so"

  20 echo "  --extra-asflags=EASFLAGS add EASFLAGS to ASFLAGS"

  21 echo "  --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS"

  22 echo "  --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS"

  23 echo "  --host=HOST              build programs to run on HOST"

  24 echo ""

Maybe you got confused with the --disable-mp4-output option?

After you compiled the libx264 and libfaac, did you do a make install to actually put them into your systems lib and include paths?

Also, here is the configure information for my Windows ffmpeg build. Not exactly the same, but might help a little:



Code:


FFmpeg version SVN-r14196-rdian06-0.93, Copyright (c) 2000-2008 Fabrice Bellard,
 et al.
  configuration: --enable-memalign-hack --enable-postproc --enable-swscale --enable-gpl --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libxvid --disable-ffserver --disable-vhook --enable-avisynth --enable-pthreads


----------



## lrhorer

moyekj said:


> I got ffmpeg to build with libx264 & libfaac after building the libs given above. One spot of trouble I had is you need to pass -lpthread as an extra ldflag option for ffmpeg configure:


I tried it and it didn't fix the problem. There are still a lot of unresolved references, and the linker exits with an error.


----------



## lrhorer

Rdian06 said:


> What version of the x264 library did you get?


x264-snapshot-20050824-2219 I looked a little cross-eyed at the tar file monkeyj specified, and thought it was a bit older, so I'll update the version.



Rdian06 said:


> Maybe you got confused with the --disable-mp4-output option?


No, it was definiitely enable. I'll get the newer codec, though.



Rdian06 said:


> After you compiled the libx264 and libfaac, did you do a make install to actually put them into your systems lib and include paths?


Yes, and the ffmpeg configure command finds them just fine, but the make command croaks even with no configure options.


----------



## Rdian06

lrhorer said:


> Yes, and the ffmpeg configure command finds them just fine, but the make command croaks even with no configure options.


Did you do a make distclean before re-running configure with no options and doing the subsequent make?

If so, what is the compile error it's reporting?


----------



## lrhorer

Rdian06 said:


> Did you do a make distclean before re-running configure with no options and doing the subsequent make?


No, I hadn't thought of that. I'm downloading the new version of the h.264 codec right now. I'll give it a shot after I compile the new codec.


----------



## lrhorer

Hoboy. Well, another stumble. When I try to compile the new x264, it trips over yasm. I have yasm installed, but the assembler check looks like this:



Code:


$AS conftest.asm $ASFLAGS $2 -o conftest.o 2>$DEVNULL

In this environment, this translates to:



Code:


yasm conftest.asm -o conftest.o 2>DEVNULL

The contents of conftest.asm are



Code:


pabsw xmm0, xmm0

When I run this externally, yasm complains:



Code:


conftest.asm:1: label or instruction expected at start of line

by which I take it yasm doesn't like the instruction "pabsw".

If I disable assembly compilation via the --disable-asm switch, it compiles, but I would much rather have optimized code. Any ideas, anyone?

I can compile ffmpeg with the result of disabling assembly in the x264 ibrary, but I get a segmentation fault when I try to use the -vcodec libx264 option of ffmpeg. The libfaac audio seems to work, however. I tried transcoding using the mp4 codec, and it plays fine in Nero Showtime, but the Tivo rejects it, both with the -ac 2 option and with -acodec libfaac.


----------



## moyekj

Somehow it seems ffmpeg screws things up for Tivo. I tried lots of things that didn't work. Finally, I decided to take a small test.mp4 file that works and just run it through in copy mode via ffmpeg:
ffmpeg test.mp4 -vcodec copy -acodec copy copy.mp4
You guessed it, copy.mp4 does not play back!


----------



## djwilso

moyekj said:


> Somehow it seems ffmpeg screws things up for Tivo. I tried lots of things that didn't work. Finally, I decided to take a small test.mp4 file that works and just run it through in copy mode via ffmpeg:
> ffmpeg test.mp4 -vcodec copy -acodec copy copy.mp4
> You guessed it, copy.mp4 does not play back!


I am also still having trouble creating my own mp4 files that will play back. CloneDVD Mobile, HandBrake, and Nero 8 Recode all create files that give the 0xffff error. I tried multiple settings with each of the programs.

However, sample mp4 files I can get from iTunes and even the HD H.264 mp4 files from Diggnation work fine.

Does anyone know what tool Revision3 uses to create the Diggnation mp4 files? They play perfectly.

Does anyone have Quicktime Pro that could try to see if that will create a compatible mp4 file? I don't want to waste the $30 if it won't work.

Thanks!
Dennis


----------



## Sevenfeet

djwilso said:


> I am also still having trouble creating my own mp4 files that will play back. CloneDVD Mobile, HandBrake, and Nero 8 Recode all create files that give the 0xffff error. I tried multiple settings with each of the programs.
> 
> However, sample mp4 files I can get from iTunes and even the HD H.264 mp4 files from Diggnation work fine.
> 
> Does anyone know what tool Revision3 uses to create the Diggnation mp4 files? They play perfectly.


An update from me.

First, the updates to this program keep coming fast and furious. It's really taking shape. I also have been successful with the sample Revision 3 clip that was mentioned earlier. So at least I know I can play some clips using this software.

That being said, I'm seeing the same problems with MP4s that I had previously encoded via Handbrake or Toast using default settings. Clearly this is an encoding issue. I'm assuming that this program can't change what MP4s that a Tivo can play successfully, so it's up to us to figure out what encoding options work, and what don't.


----------



## wmcbrine

When I built my own ffmpeg on Ubuntu, I found it sufficient to use the x264, etc., libraries from the repositories. It was only ffmpeg itself that I had to build. Of course you also need the "-dev" packages that correspond to the libraries (they contain the header files).

I haven't yet tried to make an MP4 file for the TiVo...


----------



## moyekj

moyekj said:


> Somehow it seems ffmpeg screws things up for Tivo. I tried lots of things that didn't work. Finally, I decided to take a small test.mp4 file that works and just run it through in copy mode via ffmpeg:
> ffmpeg test.mp4 -vcodec copy -acodec copy copy.mp4
> You guessed it, copy.mp4 does not play back!


 Using GSpot I see that the copy is missing headers and timestamp and perhaps that is sufficient to mess up the Tivo decoder...


----------



## moyekj

Eureka! Took a lot of trial and error and many different tools but perseverance finally paid off. I ran into this tool I'd never heard of called SUPER which is really just a GUI around x264/ffmpeg/mencoder and after a lot of playing around got some encodings that worked:

http://www.erightsoft.com/SUPER.html

SUPER SETTINGS FOR TIVO-COMPATIBLE H.264 ENCODING
=================================================
Output Container = mp4
Output Video Codec = H.264/AVC
Output Audio Codec = AAC LC

*H264 Profile*:
BaseLine (CABAC off)
H.264 levels: 2.1 or 3.1 (maybe others I didn't try yet)

*Other Opts*: (VERY IMPORTANT! THIS WAS THE BREAKTHROUGH SETTING)
Enable "Streamable H.264"

For Video
Pretty flexible, I tried several bit rates and both 29.97 or 24 fps work fine.

For Audio
Also seems flexible, settings I tried:
Sampling Freq = 44100 or 48000, 2 channel, various bit rates
Sampling Freq = 48000, 6 channel, various bit rates

Would be nice to figure out what the above settings translate into for x264 batch encoder.
Not sure exactly what enabling "streamable h.264" does, but the encodings don't work on Tivos without that setting.


----------



## Rdian06

Haven't done it myself, but check this out to try to fix the ffmpeg mp4.

ffmpeg MP4 does not stream qt-faststart
http://www.saiweb.co.uk/linux/ffmpeg-mp4-does-not-stream-qt-faststart


----------



## moyekj

For example, something like the following seems to work (mostly):
ffmpeg -y -i test.mpg -vcodec libx264 -coder 0 -level 31 -r 29.97 -b 1008k -g 300 -bug +autodetect+ms -me epzs -trellis 2 -mbd 1 -maxrate 1008k -bufsize 450k -vol 150 -acodec libfaac -profile aac_low -ac 2 -ar 48000 -ab 64k -f mp4 temp.mp4

qt-faststart temp.mp4 test.mp4

EDIT: After more experimentation the ffmpeg generated .mp4 files while they do play normally on the Tivo some of the trick functions such as REW/FF don't work very well, so looks like some further tweaks are needed in the recipe. I have noticed also that playing back some YouTube videos Tivo doesn't handle trick play functions very well either so this may be more a Tivo problem than anything else.


----------



## Sevenfeet

One thing that I have noticed is that both Handbrake (Mac version) and Roxio Toast both have settings for streamable videos. For Handbrake, its a HTTP checkmark setting. The strange thing is that Handbrake doesn't end up saving a file when this setting is used...it's written to but it disappears when the final information is written. This is probably a bug since it occurred on two different Macs in the house.

For Roxio Toast, there is a streaming setting which has a lot of tweaks. So far, I have gotten it to write files, but not something the Tivo + Videostreamer will play (same xFFFF error). One strange bit...the streamable MP4 file I created with Toast will not play via a Quicktime movie player. It's possible it only works from a web browser.

Still trying to find something that works.


----------



## lrhorer

Well, the fact Super is a Windows program doesn't thrill me, especially since all the fast machines are running Linux, but there seems to be some bigger issues. First of all, while I've been playing with some of the settings, none of the results play reliably on the TiVo. What's more, even when I select 6 channel audio, I only get stereo on my receivers. The real killer, though, is that all the resultant files are at least six times larger than the original. The whole point of this exercise is to reduce the file size, not increase it.


----------



## moyekj

lrhorer said:


> Well, the fact Super is a Windows program doesn't thrill me, especially since all the fast machines are running Linux, but there seems to be some bigger issues. First of all, while I've been playing with some of the settings, none of the results play reliably on the TiVo. What's more, even when I select 6 channel audio, I only get stereo on my receivers. The real killer, though, is that all the resultant files are at least six times larger than the original. The whole point of this exercise is to reduce the file size, not increase it.


 The ffmeg line above I got from running Super and then finding out what jobs it spawned off. There is an extra re-mux step Super does at the end I'm not sure about yet but the above is a good starting point and probably just needs a little tweaking and no need for Super anymore. Either way (through Super or ffmeg) most of the files produced do not work very reliably with REW/FF and jumps back and forwards but work OK at normal play speed, but as I mentioned that's also the case with YouTube.
Personally most of my recordings are mpeg2 and they work great so I'm not too bothered about it for now, though HD mpeg2 streaming I sometimes catch up to buffer so a good mpeg4 HD encoding would certainly be a benefit for streaming and space reasons.

Another development today is I think I've uncovered a way to make bookmarking possible (play starting from where you last left off streaming). That should be a handy addition for next release if I can get it fully working and integrated - need to figure out a good, easy way to choose between play from start or play from last saved position.


----------



## Sevenfeet

I'm pleased to report that I've had my first success in encoding a MPEG-2 video to MPEG-4 and playing it on my Tivo through Tivostream. I managed to get Roxio's Toast 9 Titanium for Mac to do the job through a customer setting. I'm currently encoding another video now so I can't list every thing I did but here's the basics.

The first thing I did was looked a little closer at the sample Revision 3 video that we all use for testing. According to the Apple Quicktime player, this is a 720p video that is encoded for H.264. The data rate is 2164 kbits and uses a standard 2 channel AAC soundtrack. Outside of that, nothing about it seems that remarkable.

Test video was the Pixar short "Jack Jack Attacks" from "The Incredibles" Bonus DVD. It was originally ripped with Mac The Ripper to my central Leopard Server in my home.

Custom setting:
1. Use the generic H.264 player instead of the pre-made settings for Apple products, like Apple TV.

2. I used a 2000 kbits data rate

3. I just had it optimized for download, not streaming.

4. Single pass encoding (I'm testing a multipass encode right now and will report if it works or not)

5. Optimized for server (there's a special "video" button that reveals this feature"

6. Audio. Two channel AAC, 48kbits.

7. Resolution. At first I tried to match the native resolution of the DVD, which is a 720 x 580 setting (anamorphic widescreen). But for reasons I don't understand, that setting, while it played on the Tivo, had a weird jutter problem in playback that made watching the video difficult. So I tried upscaling to 1080p. This looked and played far better, both on my 1080i RPTV and my 480i standard def bedroom television.

Today, I'll experiment with my more settings (whether encoding for streaming makes a difference or not, other encoding tweaks). One thing that would be nice to do is 5.1 sound (required for me to be happy with doing it for my home theater) but even though it's possible to encode AC3 audio in a H.264 video, whether the Tivo willl play it back properly is a big mystery. Handbrake has a setting for this but I'm not sure that Toast does. Also, I'm not sure the data rate is going to be optimal for a 1080p encode...I have some 1080p movie trailers which I will look at again to check what their data rate is. And I'm sure that 480p trailers of the same movie trailers have a lesser rate.


----------



## Sevenfeet

One minor update... 2 mbits/sec for 1080p is a pretty lousy bit rate, even for upscaled standard def. It looks ok on a standard def TV (32") but it's pretty lousy to my eyes on the 1080i RPTV I have. Compare that to 10 mbits/sec for a Wall-E trailer I have from Pixar (also 1080p). Broadcast HDTV (which is Mpeg-2) is anywhere from 12-19 mbits/sec or 1080i.

I'll try some better rates and see what looks good to the eye.


----------



## moyekj

Sevenfeet, how do trick play functions like FF/REW work with your encodings?
With ffmeg there's an option for 6 channel AAC that I've used and it worked (with TV speakers), but I don't have surround sound system to test it.


----------



## Sevenfeet

moyekj said:


> Sevenfeet, how do trick play functions like FF/REW work with your encodings?
> With ffmeg there's an option for 6 channel AAC that I've used and it worked (with TV speakers), but I don't have surround sound system to test it.


Fast forward and Rewind work pretty well with the Toast encodings.

Toast doesn't seem to have a setting to do 6 channel soundtracks with H.264 encodings (at least the generic ones...still haven't looked at the Apple ones). I know Handbrake can do this in the form of attaching AC3 5.1 soundtracks (Apple starting doing this with their own encodings for Apple TV rentals). Even if you could do 6 channel AAC, I don't know many home theater receivers that could decode that and it would only work over HDMI. My Denon 3805 receiver is too old and doesn't do HDMI.


----------



## RaGINaR

So, is there a nice wrapper that makes this work on my mac?


----------



## Rdian06

Sevenfeet said:


> I know Handbrake can do this in the form of attaching AC3 5.1 soundtracks (Apple starting doing this with their own encodings for Apple TV rentals). Even if you could do 6 channel AAC, I don't know many home theater receivers that could decode that and it would only work over HDMI. My Denon 3805 receiver is too old and doesn't do HDMI.


Apple is putting AC3 5.1 in their rental files? Are they using mp4 container for this or something else?


----------



## moyekj

RaGINaR said:


> So, is there a nice wrapper that makes this work on my mac?


 I would think the run_unix.sh wrapper probably works no?


----------



## cleverdevil

moyekj said:


> I would think the run_unix.sh wrapper probably works no?


Well, sort of...

Currently, Apple only provides the Java 1.6 runtime as a beta, in a fairly hard to find developer-only area of their website, and only for 64-bit intel Macs.

If the released version were compiled with the "-target 1.5" command line option, then it would work out of the box on Macs, and prevent people like me (with older, 32-bit Mac Minis) from having to compile this by hand every time a new release is out. Alternatively, a script to download dependancies, and build the project from scratch would also do the trick.

I've been playing with this since its release, and really like the idea, but have gotten bored of having to go through the compile process each time, and will likely not bother until there is a way for me to download and install new released *quickly* and *easily* on my Mac Mini. Note, I am not complaining, and I appreciate the work thats been done on this project thus far, I am just saying that my time is very limited, and the current setup is a huge barrier for me personally


----------



## moyekj

cleverdevil said:


> Well, sort of...
> 
> Currently, Apple only provides the Java 1.6 runtime as a beta, in a fairly hard to find developer-only area of their website, and only for 64-bit intel Macs.
> 
> If the released version were compiled with the "-target 1.5" command line option, then it would work out of the box on Macs, and prevent people like me (with older, 32-bit Mac Minis) from having to compile this by hand every time a new release is out. Alternatively, a script to download dependancies, and build the project from scratch would also do the trick.
> 
> I've been playing with this since its release, and really like the idea, but have gotten bored of having to go through the compile process each time, and will likely not bother until there is a way for me to download and install new released *quickly* and *easily* on my Mac Mini. Note, I am not complaining, and I appreciate the work thats been done on this project thus far, I am just saying that my time is very limited, and the current setup is a huge barrier for me personally


 Point taken. There's no real reason that Java 1.6 is needed instead of 1.5 but at the time I started development I had an ancient JDK installed and needed to update and 1.6 was what was available easily at the time. For next update I'll see if I can revert back to JDK 1.5 when compiling and preparing the jar file.


----------



## Sevenfeet

moyekj said:


> Point taken. There's no real reason that Java 1.6 is needed instead of 1.5 but at the time I started development I had an ancient JDK installed and needed to update and 1.6 was what was available easily at the time. For next update I'll see if I can revert back to JDK 1.5 when compiling and preparing the jar file.


Excellent. That means I can run this off of my Leopard Server (PowerPC) where this program belongs.


----------



## Sevenfeet

Rdian06 said:


> Apple is putting AC3 5.1 in their rental files? Are they using mp4 container for this or something else?


It's an MP4 container of some kind. Handbrake will actually create a file that will do this.


----------



## lrhorer

Well, I'm perfectly willing to run down where the failure is in the compile for libx264, but I don't want to take the time if it's not going to gain me anything - specifically if it won't then produce mp4 files smaller than the original mp3 with little or no noticeable loss in PQ. So far everything I have tried under Super has resulted in a much larger output file, not a smaller one. I'm starting t think perhaps ffmpeg isn't capable of the level of compression available to commercial codecs, or at least not when transcoding. I wonder if one of you who have the H.264 conversion working would try to convert the test clip I've put on my website here, and see if you can get a file no larger than about 85M or so without objectionable artifacts? I would really appreciate it.


----------



## Allanon

moyekj said:


> Yes. There are some down sides too. This brings up a limitation I am trying to overcome that currently you cannot jump ahead of the buffer. For a true file stream of course you can jump arbitrarily anywhere into the stream regardless of the buffer. For this case, especially since this app is designed to stream a local file there should be a way to get the byte offset into the file associated with the specified time offset and then start the stream from that offset. It's on my to do list to look at but on the surface doesn't sound impossible.
> Once/if I can fix the above limitation, then at least if you stop watching and later want to continue then you can jump back to where you were (and I could implement some bookmarking to remember last position of recent files).
> 
> Extending the above thought further, one could potentially also skip commercials automatically during playback by pre-processing the file and building a boomark list of the commercial segments which could be referenced during playback to skip over the commercial blocks. So short of editing out commercials yourself before streaming this could be an interesting option.
> 
> I haven't put too much thought into this yet but the more you think about this the more possibilities open up.


I've been thinking about this problem and realized you can use VLC much like what wmcbrine did with his HME/VLC video streamer but instead of sending streams your program would just stream video files through VLC. The benefits would be transcoding almost any video file and you can use the VLC JavaScript API, Mozilla plugin, or maybe write your own plugin to control VLC's playback of the file. You can then control the video's position and other attributes by sending commands to VLC instead of having the Tivo do the work. The one draw back might be the buffering that Tivo does, this will make all commands be delayed but if you jump to the end of Tivos buffer then it should be almost real time. You can also adjust the stream so it plays in real time by adjusting the transcoding in VLC.


----------



## moyekj

Allanon said:


> I've been thinking about this problem and realized you can use VLC much like what wmcbrine did with his HME/VLC video streamer but instead of sending streams your program would just stream video files through VLC. The benefits would be transcoding almost any video file and you can use the VLC JavaScript API, Mozilla plugin, or maybe write your own plugin to control VLC's playback of the file. You can then control the video's position and other attributes by sending commands to VLC instead of having the Tivo do the work. The one draw back might be the buffering that Tivo does, this will make all commands be delayed but if you jump to the end of Tivos buffer then it should be almost real time. You can also adjust the stream so it plays in real time by adjusting the transcoding in VLC.


 One problem with using VLC though (or ffmpeg) to transcode on the fly is for HD streams typically they won't be fast enough for real time transcoding. It's possible perhaps by tweaking things to get a sub-standard transcode that is real time or faster, but then that kind of defeats the purpose. Certainly things like 2-pass encoding are not feasible either. Ideally I don't like any transcoding, but if I do have to transcode I want very high quality.


----------



## lrhorer

moyekj said:


> One problem with using VLC though (or ffmpeg) to transcode on the fly is for HD streams typically they won't be fast enough for real time transcoding.


I wouldn't say it is one problem, I would say it is *THE* problem.



moyekj said:


> Ideally I don't like any transcoding, but if I do have to transcode I want very high quality.


Absolutely. Assumng I can get the H.264 transcoding working, I'm expecting it will take the better part of a day or more to transcode a 2 hour movie.


----------



## Allanon

moyekj said:


> One problem with using VLC though (or ffmpeg) to transcode on the fly is for HD streams typically they won't be fast enough for real time transcoding. It's possible perhaps by tweaking things to get a sub-standard transcode that is real time or faster, but then that kind of defeats the purpose. Certainly things like 2-pass encoding are not feasible either. Ideally I don't like any transcoding, but if I do have to transcode I want very high quality.


I understand that, those files can be converted like you normally would and then played through VLC without transcoding to allow for video position changing without waiting for the entire movie to be buffered. But transcoding is useful for videos that you get off the web that are not super high quality and are not in the a format Tivo can use.


----------



## PaulS

Allanon said:


> I understand that, those files can be converted like you normally would and then played through VLC without transcoding to allow for video position changing without waiting for the entire movie to be buffered. But transcoding is useful for videos that you get off the web that are not super high quality and are not in the a format Tivo can use.


It should be possible to transcode low quality videos to MPEG-2 on the fly in better than real-time, no ? There's no need to take the H.264 encoding performance hit if it isn't warranted.


----------



## beady

Anyone figure out how to create an mp4 using Pinnacle Studio Plus? I have version 11 and I can create an Mpeg-2 file that plays just fine but cannot make an mp4 work. I did not see a "streamable" option in Pinnacle Studio. I have an SR11 camera and want to be able to take the HD video from the camera and watch it on the Tivo.


----------



## Allanon

PaulS said:


> It should be possible to transcode low quality videos to MPEG-2 on the fly in better than real-time, no ? There's no need to take the H.264 encoding performance hit if it isn't warranted.


Yes, VLC can easily transcode video to low quality MPEG-2 in real time. It can even transcode to normal to high quality MPEG-2 pretty fast.

Also, correct me if I'm wrong but doesn't transcoding to h.264 take a lot more time and CPU than transcoding to MPEG-2 due to more compression? Plus is there a visual reason to use H.264 over MPEG-2? If not then I would suggest transcoding to MPEG-2 because it would take less time to transcode and there should be enough bandwidth to support the transfers of high quality MPEG-2 from your computer to the Tivo in real time.

But again, if you want the best looking HD video do format conversion before sending.


----------



## moyekj

Allanon said:


> I understand that, those files can be converted like you normally would and then played through VLC without transcoding to allow for video position changing without waiting for the entire movie to be buffered. But transcoding is useful for videos that you get off the web that are not super high quality and are not in the a format Tivo can use.


 There's definitely some merit to using VLC if nothing else as you mentioned useful for web streaming of incompatible formats. I haven't looked into it but I'm not sure if it's possible to fork off VLC from Java and then have full control over playback, trick functions, etc controlled from Tivo/HME side? How would one send messages to VLC to do those things? If that is possible then it certainly opens up interesting opportunities.


----------



## Allanon

> I haven't looked into it but I'm not sure if it's possible to fork off VLC from Java and then have full control over playback, trick functions, etc controlled from Tivo/HME side? How would one send messages to VLC to do those things? If that is possible then it certainly opens up interesting opportunities.


VLC has a Java API that will allow this, Look at this link:

http://trac.videolan.org/jvlc/

And if you look at this diagram, which is outdated, you can see it has all the functions needed to operate VLC. You can also look at the link in my previous post to see how to operate VLC using Javascript. I also noticed they have a Python API for VLC so I might try this using wmcbrine HME/VLC video streamer program. I don't know Java but I did learn some Python.


----------



## moyekj

lrhorer said:


> Well, I'm perfectly willing to run down where the failure is in the compile for libx264, but I don't want to take the time if it's not going to gain me anything - specifically if it won't then produce mp4 files smaller than the original mp3 with little or no noticeable loss in PQ. So far everything I have tried under Super has resulted in a much larger output file, not a smaller one. I'm starting t think perhaps ffmpeg isn't capable of the level of compression available to commercial codecs, or at least not when transcoding. I wonder if one of you who have the H.264 conversion working would try to convert the test clip I've put on my website here, and see if you can get a file no larger than about 85M or so without objectionable artifacts? I would really appreciate it.


Just tried your test clip. Resulting encoding wasn't too bad (but of course never as good as original) considering it's about half the size:
TestClip1.mpg 121,821,184 bytes
TestClip1.mp4 70,210,768 bytes
Here's the script I used for that encoding (with all relevant settings):


Code:


#!/bin/csh -f
set ffmpeg = /home/moyekj/linux/src/ffmpeg/ffmpeg
set input = /tmp/TestClip1.mpg
set output = /tmp/TestClip1.mp4

set bitrate = "7700k"
set bufsize = "14745k"
set maxrate = "16000k"
set achannels = 2
set arate = 48000
set abitrate = "192k"

set level = 31
set framerate = 29.97
set gop_size = 300
set volume = 150

$ffmpeg -y -i $input -vcodec libx264 -coder 0 -level $level \
-r $framerate -sameq -g $gop_size -bufsize $bufsize \
-maxrate $maxrate -b $bitrate -bug +autodetect+ms \
-me epzs -trellis 2 -mbd 1 -vol $volume -acodec libfaac \
-profile aac_low -ac $achannels -ar $arate \
-ab $abitrate -f mp4 $output


----------



## lrhorer

moyekj said:


> Just tried your test clip. Resulting encoding wasn't too bad (but of course never as good as original) considering it's about half the size:
> TestClip1.mpg 121,821,184 bytes
> TestClip1.mp4 70,210,768 bytes


Thanks. 'Sounds like there's some real possibilities. I'll have to get libx264 working.


----------



## moyekj

Update
I've got bookmarking capability (so one can resume where you left off watching) working pretty well for mpeg2 recordings. However, for mpeg4 recordings it looks like Tivo needs to see the start of the recording and the header information or it doesn't work, so for mpeg4 if I try and start playback anywhere other than the start of the file it errors out.

So at this point I'm not sure what to do with mpeg4 and bookmarking. There are probably other tricks to try such as start playing a recording and then skipping to bookmarked point but certainly not elegant or easy. For 1st release of this capability I may just release it with mpeg2 support only for now...


----------



## moyekj

v0p7 - September 10, 2008
-------------------------
* Now compatible with Java Runtime Environment 1.5 or later.
* Added bookmarking capability (currently only for mpeg2 files) such that
you can resume from where you left off viewing. There are a few caveats:
- You must use Play button to resume viewing from bookmarked location.
Right arrow or Select will start playback from beginning. This gives
you the choice of starting from where you left off or beginning.
- Only implemented for mpeg2 files currently
- Cannot bookmark close to initial playback - video that is buffered
by Tivo before playback begins cannot be bookmarked. Thus, for example
if buffer is at 30 secs when playback begins bookmarking will not work
until after 30 secs.
- You must exit playback using the Left arrow in order to save/bookmark
your position. If you use the Tivo button or some other means of
exiting playback the position will not be saved.
* When resuming to file browser mode from video playback the directory you
return to is now fully refreshed (in case any changes happened during
playback).


----------



## Sevenfeet

Thanks! Let's see if we can get this running on our Macs now...

Working...


----------



## Sevenfeet

OK, I'm pleased to report that I've gotten Tivostream v0p7 up and running properly on a Mac. The Mac in this case is an old machine...an 8 year old Powermac G4 hacked to run Leopard Server. It's this server that is the primary server in my house and houses all my video and audio files, among others. Since this is while the video sits, it's an ideal computer to run this program.

Setting up the config file was pretty easy. One thing to remember for Mac users and this program is that since I launched it as a Unix process via the Terminal window, you have to setup the <topdir> variable in something that makes sense for a Unix machine and not necessarily a Mac. So in this case, use Unix-style "/" delimiters instead of ":" delimiters that you would use for most Mac programs. Example:

/Users/sevenfeet/movies/tivostream/

If you have your movie directory on a separate drive like I do, make sure you use "/Volumes" ahead of the name of your hard drive. Example:

/Volumes/myexternaldrive/movies/tivostream/

I just ran the "run_unix.sh" shell script to get it started. I haven't tried to create a double clickable application icon which you can do with the Java VM on the Mac. That will be my next task later this evening.


----------



## beady

Moyekj,

Just wanted to say thanks for the program. I've been converting all my VHS-C tapes to digital and now I can just stick the mpeg files on the server and watch them from my Tivo. Tivostream makes it easy to organize them and my family is getting a kick out of watching old tapes.


----------



## Sevenfeet

BTW, this is probably an obvious question but is there any reason why you couldn't stream .tivo files that have been transferred with either Tivo Desktop (Windows) or Tivo Transfer (Mac)?


----------



## moyekj

Sevenfeet said:


> BTW, this is probably an obvious question but is there any reason why you couldn't stream .tivo files that have been transferred with either Tivo Desktop (Windows) or Tivo Transfer (Mac)?


 I don't think I've tried but I think Tivo will reject them as it's expecting unencrypted mpeg2 or mpeg4 files. The .TiVo files have the metadata information up front + encryption that probably messes things up. You can give it a shot by adding .TiVo as a file extension in tivostream config but I doubt it will work.
Personally I don't find .TiVo format too convenient to keep that way. Decoding to a regular mpeg2 program stream is quick enough and allows you to then use the file with any mpeg2 editor/player. With pyTivo metadata you can always keep the metadata information around if you want to send it back to Tivo (via pyTivo or tivostream) and still have the program information.


----------



## moyekj

beady said:


> Moyekj,
> 
> Just wanted to say thanks for the program. I've been converting all my VHS-C tapes to digital and now I can just stick the mpeg files on the server and watch them from my Tivo. Tivostream makes it easy to organize them and my family is getting a kick out of watching old tapes.


 Thanks. Yes a big advantage of not having the files on the Tivos themselves is that you can organize them however you want and across multiple file volumes instead of dealing with Tivo's limited organization capabilities.


----------



## wmcbrine

Yes, .TiVo files don't stream.


----------



## Sevenfeet

I've run into a a problem with tivostream v0p7. I can get it up on my Mac Leopard Server. I can get it to stream a movie just like my PC laptop running WinXP. But I can't get the program to stay running. Eventually, it crashes with the same error.

Exception in thread "JmDNS.SocketListener" java.lang.ArrayIndexOutOfBoundsException: 7 >= 7
at java.util.Vector.elementAt(Vector.java:432)
at javax.jmdns.DNSRecord.suppressedBy(Unknown Source)
at javax.jmdns.DNSOutgoing.addAnswer(Unknown Source)
at javax.jmdns.JmDNS.handleQuery(Unknown Source)
at javax.jmdns.JmDNS$SocketListener.run(Unknown Source)
at java.lang.Thread.run(Thread.java:613)

I'm not sure just what is going on here. I'm not sure why the program is throwing what seems to be a problem with the DNS routines. Sometimes the OutofBoundsException is "6 >= 6", other times it's 7. You don't have to do anything to generate this error...eventually it will come on its own whether you have streamed a movie or not. When this error throws, "Videostream" disappears from the Tivo menus.

Any idea what might be happening here? And for the record, the server in question does function as the DNS server for my network.


----------



## Sevenfeet

moyekj said:


> I don't think I've tried but I think Tivo will reject them as it's expecting unencrypted mpeg2 or mpeg4 files. The .TiVo files have the metadata information up front + encryption that probably messes things up. You can give it a shot by adding .TiVo as a file extension in tivostream config but I doubt it will work.
> Personally I don't find .TiVo format too convenient to keep that way. Decoding to a regular mpeg2 program stream is quick enough and allows you to then use the file with any mpeg2 editor/player. With pyTivo metadata you can always keep the metadata information around if you want to send it back to Tivo (via pyTivo or tivostream) and still have the program information.


OK, what's the best way to turn a .tivo file into a regular mp2 file? Sorry if this is a stupid question but a google search isn't as obvious as I would like on this subject.


----------



## Rdian06

Tivodecode is the original tool to convert .tivo to an mpeg file.

http://tivodecode.sourceforge.net/


----------



## moyekj

Sevenfeet said:


> I've run into a a problem with tivostream v0p7. I can get it up on my Mac Leopard Server. I can get it to stream a movie just like my PC laptop running WinXP. But I can't get the program to stay running. Eventually, it crashes with the same error.
> 
> Exception in thread "JmDNS.SocketListener" java.lang.ArrayIndexOutOfBoundsException: 7 >= 7
> at java.util.Vector.elementAt(Vector.java:432)
> at javax.jmdns.DNSRecord.suppressedBy(Unknown Source)
> at javax.jmdns.DNSOutgoing.addAnswer(Unknown Source)
> at javax.jmdns.JmDNS.handleQuery(Unknown Source)
> at javax.jmdns.JmDNS$SocketListener.run(Unknown Source)
> at java.lang.Thread.run(Thread.java:613)
> 
> I'm not sure just what is going on here. I'm not sure why the program is throwing what seems to be a problem with the DNS routines. Sometimes the OutofBoundsException is "6 >= 6", other times it's 7. You don't have to do anything to generate this error...eventually it will come on its own whether you have streamed a movie or not. When this error throws, "Videostream" disappears from the Tivo menus.
> 
> Any idea what might be happening here? And for the record, the server in question does function as the DNS server for my network.


Not sure, but maybe with more information logged the problem may become clearer, though you said just sitting there it will eventually crash which seems to imply nothing to do with tivostream itself but more with the HME server side. You can generate a lot more information from console by running HME server in debug mode (-d switch) and from my program by setting DEBUG variable. Easy way to do this is change run_unix.sh script to the following (which will capture all information in debug.log file):


Code:


DEBUG=1; export DEBUG
java -cp tivostream_v0p7.jar com.tivo.hme.host.sample.Main -d com.hme.tivo.videostream.videostream >debug.log 2>&1


----------



## Sevenfeet

OK, I've added the debug line. A debug.log file hasn't shown up in the same directory. It might be somewhere else...


----------



## moyekj

Sevenfeet said:


> OK, I've added the debug line. A debug.log file hasn't shown up in the same directory. It might be somewhere else...


 Make sure you copy the code I posted above, including the stdout/stderr re-direct portion (> debug.log 2>&1). Then the directory where you execute this run_unix.sh script is where debug.log will go (assuming the Mac behaves like normal unix).


----------



## Sevenfeet

moyekj said:


> Make sure you copy the code I posted above, including the stdout/stderr re-direct portion (> debug.log 2>&1). Then the directory where you execute this run_unix.sh script is where debug.log will go (assuming the Mac behaves like normal unix).


D'oh! And I call myself a former Unix sysadmin. Shoulda known...


----------



## windracer

I'm trying to run tivostream through Galleon again (I know, what is it with me and running apps through Galleon, right?) via the launcher.txt file. The app starts, and I can see it on the TiVo menu, but it crashes when I select it and the log shows it can't find config.ini.

I've put the tivostream jar file in Galleon's hme directory (which is in the classpath) and the config.ini is there as well. I've also tried putting it in a few other places. I'm not sure if it's crashing because it can't find the file or due to a conflict with Galleon's jars. It runs just fine standalone.

I'll keep poking at it, just wondering what piece I was missing.

_edit:_ hmm, maybe I'll try that debug thing.


----------



## moyekj

windracer, yes with these most recent versions tivostream will crash when config.ini file is not present in startup dir - something I will have to fix in next release. While doing so I will also have tivostream print out the current directory when starting to make it easier to identify.


----------



## windracer

Ok, cool. So I just need to figure out what is considered the startup directory when it's running through Galleon. Strange that it wouldn't be the location of the jar file in this case.


----------



## menos

Has anybody had this crash your HD yet? I have a directory with about 25 .mp4 vids. After watching about 15 of them, I got an application error. It said something to the effect of 'out of memory'. The background of the Tivo was then set to the last frame of the last video that was successfully streamed. A few seconds later the Tivo stopped responding to remote commands and I had to pull the power to reset it.

I didn't see anything specifically in the tivostream console regarding this error but here's the console output anyway.



Code:


C:\Program Files\tivostream>java -cp tivostream_v0p7.jar com.tivo.hme.host.sampl
e.Main com.hme.tivo.videostream.videostream
null null (null)
LOG: added factory
MDNS: http://192.168.1.75:4263/videostream/
LOG: 192.168.1.50 icon.png HTTP GET - to factory /videostream/
>> Reading config file: config.ini
>>config: topdir=Baby Videos == C:\docs\My Videos\Girls MP4
>>config: topdir=Movies == r:\tivo_movies
>>config: extensions=.mpg .mpeg2 .mp2 .mp4 .mpeg4 .vob
>>config: font=medium
>>config: timeout_status_bar=5
>>config: timeout_info=10
>>config: skip_back=8
>>config: skip_forwards=30
>>config: slow_speed=0.125
>> Reading bookmarks file: bookmarks
LOG: HME receiver connected
LOG: unknown event opcode : 8
LOG: 192.168.1.50 MVI_2007.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My&#37;20Videos/Girls%20MP4/MVI_2007.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1849.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1849.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1848.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1848.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1848.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1848.mp4
LOG: 192.168.1.50 MVI_1848.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1848.mp4
LOG: 192.168.1.50 MVI_1848.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1848.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1787.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1787.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1787.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1787.mp4
LOG: 192.168.1.50 MVI_1787.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1787.mp4
LOG: 192.168.1.50 MVI_1682.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1682.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1682.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1682.mp4
LOG: 192.168.1.50 MVI_1682.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1682.mp4
LOG: 192.168.1.50 MVI_1666.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1666.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1665.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1665.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1665.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1665.mp4
LOG: 192.168.1.50 MVI_1665.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1665.mp4
LOG: 192.168.1.50 MVI_1633.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1633.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1630.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1630.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1627.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1627.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1415.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1415.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1415.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1415.mp4
LOG: 192.168.1.50 MVI_1415.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1415.mp4
LOG: 192.168.1.50 MVI_1336.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1336.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1336.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1336.mp4
LOG: 192.168.1.50 MVI_1336.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1336.mp4
LOG: 192.168.1.50 systm--0063--dolby--hd.h264.mp4 HTTP GET - to factory /videost
ream/
url=file:/r:/tivo_movies/systm--0063--dolby--hd.h264.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 I/O Exception handling  HTTP GET systm--0063--dolby--hd.h264.m
p4: Connection reset by peer: socket write error
LOG: 192.168.1.50 MVI_1232.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1232.mp4
ERROR code=4 Message: view -1 not found
ERROR code=4 Message: view -1 not found
LOG: 192.168.1.50 MVI_1232.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1232.mp4
LOG: 192.168.1.50 MVI_1232.mp4 HTTP GET - to factory /videostream/
url=file:/C:/docs/My%20Videos/Girls%20MP4/MVI_1232.mp4
LOG: connection to receiver closed
LOG: HME receiver disconnected
LOG: 192.168.1.50 icon.png HTTP GET - to factory /videostream/
>> Reading config file: config.ini
>>config: topdir=Baby Videos == C:\docs\My Videos\Girls MP4
>>config: topdir=Movies == r:\tivo_movies
>>config: extensions=.mpg .mpeg2 .mp2 .mp4 .mpeg4 .vob
>>config: font=medium
>>config: timeout_status_bar=5
>>config: timeout_info=10
>>config: skip_back=8
>>config: skip_forwards=30
>>config: slow_speed=0.125
>> Reading bookmarks file: bookmarks
LOG: HME receiver connected
LOG: unknown event opcode : 8
LOG: connection to receiver closed
LOG: HME receiver disconnected
LOG: 192.168.1.50 icon.png HTTP GET - to factory /videostream/

So far I've been pretty impressed with this, and if all the bugs get ironed out, it may replace my pytivo usage.


----------



## wmcbrine

menos said:


> Has anybody had this crash your HD yet?


The other day my TiVo spontaneously rebooted -- not while streaming, but when entering WordGrid, of all things. But for a while before that, I'd been using, not tivostream, but my own HME/VLC, and I figured that might be the problem. It motivated me to eliminate all the resource leaks. I haven't had a crash since then, but it hasn't been that long, and the crash was as likely to be due to the video streaming itself as due to leaking resources.

Still, I noticed in the simulator that tivostream is leaking a lot of resources, too.


----------



## moyekj

wmcbrine said:


> Still, I noticed in the simulator that tivostream is leaking a lot of resources, too.


 Yes I should look into that sometime soon...


----------



## Rdian06

I've been following the thread but it wasn't clear whether anyone ever got h264 video and AC3 5.1 audio in an mp4 container working with tivostream.

Has anyone done it with Handbrake or something similar?


----------



## moyekj

I don't think AC3 audio is part of official mpeg4 container spec (at least ffmpeg doesn't allow it). I did try encoding a video using 6-channel AAC and that did play on the Tivo but I just use TV speakers (stereo) for sound so not sure what happens with surround sound systems. Would be an interesting experiment though if someone can find an encoder that does allow AC3 in mpeg4 container to see what happens on a Tivo.


----------



## moyekj

Rdian06 said:


> I've been following the thread but it wasn't clear whether anyone ever got h264 video and AC3 5.1 audio in an mp4 container working with tivostream.
> 
> Has anyone done it with Handbrake or something similar?


 Well color me shocked.  I did get *mpeg4 container with H.264 video & AC3 audio* working on a Tivo. Here's what I did:
Handbrake
XBOX 360 profile
Encoder=H.264, Audio Encoder = AC3
Start

(NOTE: You can't check "HTTP Optimized MP4" option since that doesn't work)

The resulting encoding doesn't play as is on Tivo. However, if you run the handbrake encoded file through the qt-faststart executable then it works!

NOTE: I used 2 30 sec clips as sources for this testing (both originated from a Tivo S3):
1. 480i mpeg2 video with 2-channel AC3 audio
2. 720p mepg2 video with 6-channel AC3 audio
In both cases handbrake just used passthrough for AC3 encoding.

I've already done some code cleanup to fix crashing problem with no config.ini file present and to fix the resource leakages that wmcbrine pointed out. That combined with some documentation on H.264 encoding options that work with Tivo will make a good next release.


----------



## Dan203

moyekj said:


> I don't think AC3 audio is part of official mpeg4 container spec


It's not, but the people in charge of the AC3 standard just released a new specification on Aug 22nd which outlines a standardized way to store AC3/EAC3 audio in an MP4 container. Based on what I've read the newest versions of Handbrake and FFMPEG can encode files using the standard, and both the AppleTV and v0.9.2 of VLC can play them. However with an official standard available I suspect a lot more companies will start to support this combination in the near future.

Dan


----------



## moyekj

New version just released:

v0p8 - September 16, 2008
-------------------------
* Added documentation sections on supported video types, the use
of qt-faststart and encoding of H.264 with AC3 audio.
* Added qt-faststart.exe and qt-faststart.c to distribution
* Fixed crashing issue if starting tivostream with no config.ini file
* Resource leaking issues cleaned up


----------



## Rdian06

moyekj said:


> Well color me shocked.  I did get *mpeg4 container with H.264 video & AC3 audio* working on a Tivo. Here's what I did:
> Handbrake
> XBOX 360 profile
> Encoder=H.264, Audio Encoder = AC3


Are you running on Windows? If so can you try using my custom ffmpeg for Windows build to see if it can handle putting AC3 audio into an mp4 container? The build (rdian06-0.95) is based on SVN 15216 with some minor tweaks to fix 5.1 channel mapping issues when transcoding DTS or AAC to AC3. It also is recent enough to have EAC3 (Dolby Digital Plus) and MLP (TrueHD) decoder support (useful for transcoding to AC3.)

The builds are housed on the pyTivo forum here:

http://pytivo.krkeegan.com/rdian06-s-ffmpeg-builds-t468.html

Also, is qt-faststart something that is pipeable? Or does it need to sort the full file?

I'm just trying to envision how we would integrate this into pyTivo if/when Tivo activates h264 for HMO.


----------



## Rdian06

Ah, ffmpeg as of SVN 15184 is supposed to have "ac3 muxing support in mov/mp4/m4v". So my Windows build should be able to do it.

If you happen to have an mkv with h264 and AC3 (384kbps or less), you might be able to do:



Code:


ffmpeg -i my.mkv -vcodec copy -acodec copy new.mp4

Probably still need to run it through qt-faststart to sort the atoms for streaming.


----------



## moyekj

Rdian06 said:


> Also, is qt-faststart something that is pipeable? Or does it need to sort the full file?
> 
> I'm just trying to envision how we would integrate this into pyTivo if/when Tivo activates h264 for HMO.


 You can look at the qt-faststart.c code now part of tivostream distribution. It's main function is to scan through the whole stream & look for an moov atom (which can be at the end of the stream) and then re-arrange it's location, so it won't help to pipe it to anything but the entire stream before presenting it to Tivo. i.e. you can't really use it during real time transcoding. However, if you already have a completed encoding and just want to pipe a stream with re-arranged atoms then this could work OK (just need to update the code to allow use of stdout & stdin). However it would probably mean a long delay doing that way (since it scans whole file before writing anything), especially for big streams, so not really practical.


----------



## Rdian06

moyekj said:


> It's main function is to scan through the whole stream & look for an moov atom (which can be at the end of the stream) and then re-arrange it's location, so it won't help to pipe it to anything but the entire stream before presenting it to Tivo. i.e. you can't really use it during real time transcoding. However, if you already have a completed encoding and just want to pipe a stream with re-arranged atoms then this could work OK (just need to update the code to allow use of stdout & stdin).


That's unfortunate. I guess the only other alternative to combine h264 and AC3 would be an EVO or MPEG2 TS.


----------



## moyekj

Rdian06 said:


> That's unfortunate. I guess the only other alternative to combine h264 and AC3 would be an EVO or MPEG2 TS.


 Haven't explored it too much but it sure would be nice if Tivo could handle MPEG2 TS container playback via HMO/HME (for both mpeg2 & mpeg4 encodings). Obviously we know it can handle MPEG2 TS with native MPEG2 QAM/ATSC recordings.


----------



## gilbreen

I am transitioning from ReplayTVs to TivoHDs (I think I recognize moyekj from the RTV avs forum). Can tivostream work with ReplayTV mpeg files? I would love to be able to still use my DVArchive library that I have accumulated over the years.

Look forward to installing tivostream once I get a Windows box up and running.

Thanks.


----------



## moyekj

gilbreen said:


> I am transitioning from ReplayTVs to TivoHDs (I think I recognize moyekj from the RTV avs forum). Can tivostream work with ReplayTV mpeg files? I would love to be able to still use my DVArchive library that I have accumulated over the years.
> 
> Look forward to installing tivostream once I get a Windows box up and running.
> 
> Thanks.


 Yup that's me from the RTV forums (the good 'ole days of auto commercial skip). Last time I tried medium quality ReplayTV 55xx files they did play and pause OK on my Tivo S3, however other trick functions (FF/REW/SKIP) didn't work at all if I recall correctly. That was the behavior using TiVo To Come Back, but I would expect streaming to have same behavior.
P.S. You don't need a Windows box to run tivostream - pretty much any computer that is networked and can run Java 1.5 or later will work.


----------



## wmcbrine

moyekj said:


> Last time I tried medium quality ReplayTV 55xx files they did play and pause OK on my Tivo S3, however other trick functions (FF/REW/SKIP) didn't work at all if I recall correctly.


I see this on MPEG1 muxed streams -- VCD files, or streams with mux=mpeg1 in VLC. It's the muxing rather than the video encoding that's key, which is why I use mux=ps in HME/VLC even with vcodec=mp1v (and even though mux=mpeg1 is recommended in the VLC manual). I'm guessing the Replay files could be remuxed without reencoding, and would become trick-playable.


----------



## Rdian06

minckster said:


> Mac users may be able to use Lostify to move the moov atom to the front of their mpeg4 videos. I asked Lostify's developer and here's his reply, Does anyone want to test Lostify on a file with the moov atom in the wrong place? All of my MP4s have the moov atom first already.
> 
> Here's the source for Atomic Parsley (Linux/Mac/Windows). I can't find sufficiently-complete man pages to determine the flags to move the moov atom. I suppose installing AP would install complete man pages.


There is also a qt-faststart.py python implementation. It was submitted to the ffmpeg developers for inclusion in ffmpeg's utils alongside the C code version of qt-faststart.

You can grab it from this mailing list post:

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-September/052952.html


----------



## moyekj

minckster said:


> Perhaps I should have mentioned that Lostify and Atomic Parsley (and MetaX) are metataggers, not extensions to ffmeg. There's no encoding going on.
> 
> Lostify and MetaX are GUI applications built on top of the CLI Atomic Parsley. Just drag your MP4 to the app, and it will re-embed the metatags (i.e., the moov atom) -- reportedly to the front of the MP4, as tivostream requires. That sounds far easier to me than compiling my own ffmeg with qt-faststart*.c*.
> 
> There are similar Windows programs built on top of Atomic Parsley.


 Note that qt-faststart.c is a self-contained c program that doesn't need anything from ffmpeg, so you only need to compile qt-faststart.c by itself to generate an executable. It is also not an encoder but simply re-arranges contents of the input mp4 file if it deems necessary. For convenience I included the binary for windows with tivostream and the qt-faststart.c file for others running on different platforms.


----------



## Rdian06

And since qt-faststart.py is a python script, it doesn't need to be compiled. It will run anywhere that has python installed. Mac OS X has python preinstalled. Though there isn't a nice GUI, just bring up Terminal and type: python qt-faststart.py <filename>


----------



## moyekj

wmcbrine said:


> I see this on MPEG1 muxed streams -- VCD files, or streams with mux=mpeg1 in VLC. It's the muxing rather than the video encoding that's key, which is why I use mux=ps in HME/VLC even with vcodec=mp1v (and even though mux=mpeg1 is recommended in the VLC manual). I'm guessing the Replay files could be remuxed without reencoding, and would become trick-playable.


 I think that's right. At the time I believe I de-muxed and re-muxed with Womble and that fixed the trick play problem but I think it introduced audio/video sync problem. Since I wasn't that bothered about it and don't watch anything recorded from RTVs anymore I left it at that.


----------



## moyekj

For those that may need to build qt-faststart there are a couple of defines needed for gcc in order for it to work properly:
gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o qt-faststart qt-faststart.c

(I will add this as a comment in qt-faststart.c file included with tivostream).


----------



## windracer

windracer said:


> Ok, cool. So I just need to figure out what is considered the startup directory when it's running through Galleon. Strange that it wouldn't be the location of the jar file in this case.


I'm able to run v0p8 through Galleon now. The config.ini needs to be in Galleon's bin directory (where Galleon is started from) so I just created a symlink to the file located elsewhere.

So the steps are:

- drop tivostream*.jar into galleon/hme/
- put config.ini into galleon/bin (or galleon/hme and then create a symlink on Linux)
- add the following line to galleon/hme/launcher.txt: com.hme.tivo.videostream.videostream
- restart galleon
- tivostream's log will be written into galleon/logs/wrapper.log

YMMV of course.


----------



## Sevenfeet

Wow, I take a week off due to my workload and it looks like a lot has moved on the tivostream front. I was still having issues with tivostream having the strange DNS crash on a Mac. I tried it both on my PPC based server and an Intel based desktop with the same result. I'll try v8 today but since the latest versions also work on Java 1.5, I might also try it on my Solaris 10 server which doesn't have Java 1.6 installed yet. 

I mean, if a Java app doesn't work on Solaris... ;-)


----------



## Sevenfeet

OK, I downloaded v8 and have tried it both on Solaris 10 and on Mac OS X Leopard Server. The good news is that it works on both. And so far I haven't seen the strange DNS error from earlier. The bad news is that I'm seeing a large amount of macroblocking with the picture. At first I thought it was just some of the previous rips that I had done, but it also does it with the Revision3 720p clip we all use as a control. So I'm not sure what's going on.

And I haven't had a chance to do any of the mp4 + 5.1 sound hacking that's been discussed since I'll have to add an extra step of the Python script. I'll work on that later.


----------



## moyekj

Sevenfeet said:


> OK, I downloaded v8 and have tried it both on Solaris 10 and on Mac OS X Leopard Server. The good news is that it works on both. And so far I haven't seen the strange DNS error from earlier. The bad news is that I'm seeing a large amount of macroblocking with the picture. At first I thought it was just some of the previous rips that I had done, but it also does it with the Revision3 720p clip we all use as a control. So I'm not sure what's going on.


 That is odd. I don't have that problem with any of my clips including the Revision3 one (and I'm using streaming across a wireless network). A few things I might suspect:
1. A network issue of some sort
2. Your server(s) being overloaded (check CPU & I/O resources on your server)
3. A Tivo issue. Perhaps rebooting your Tivo may help.


----------



## Sevenfeet

moyekj said:


> That is odd. I don't have that problem with any of my clips including the Revision3 one (and I'm using streaming across a wireless network). A few things I might suspect:
> 1. A network issue of some sort
> 2. Your server(s) being overloaded (check CPU & I/O resources on your server)
> 3. A Tivo issue. Perhaps rebooting your Tivo may help.


1. Network: My Tivos, the Leopard Server and the Solaris server are all on the household wired gigabit network. I have bandwidth for days.

2. Server overloaded. That is a possibility. Both the Leopard Server and the Solaris box are not modern boxes (8+ years old for both). The Leopard Server specifically does a lot of things on my network and the Solaris server gets all its movie files from the Leopard Server via NFS. Still, it doesn't take much horsepower to through a video file around.

3. A Tivo issue. Also a possibility. Well, for some reason, I'm not having this problem anymore. Go figure.

Well, I did get a chance to try out the Handbrake using the Xbox setting plus AC3 passthru sound. For a test video, I chose another Pixar short "For The Birds" found on the Monster's Inc. bonus DVD. It's less than 4 minutes and which makes it an easy Handbrake rip, and it has AC3 5.1 sound.

The video ripped nicely to a 58 MB file and then I washed it through the qt-faststart.python script on one of my Macs. Then I attempted to play it through either tivostream server I have going (Leopard Server and Solaris server).

The video DID PLAY, so thanks to Moyekj for figuring out which major Handbrake setting would finally work. So that should be it, huh? Rip all my movies this way, wash them through qt-faststart.py and everything should be wonderful, right?

Well, not so fast. There is one major problem. The video and audio aren't synced when played this way. The delay is enormous...about 2-3 second with the audio being behind the video. I tried this on both Tivo S3s which each feed a AC-3 capable receiver. Same result and the same resule with both servers I'm running.

Now I'm not sure just why I'm seeing this. I suppose I could try a faster machine but I have to openly wonder why a faster server would make a difference. I will try my PC laptop later this morning and see if it makes a difference. I'm so close to getting a final solution I can taste it. But I gotta wonder what's happening here.

One last bug report...I am still seeing the DNS issue on both the Leopard Server and the Solaris server, but it happens far less frequently. I'm wondering if the issue might be the DNS server I run on the Leopard Server. I used to have the Solaris machine be the primary DNS box in the house, but I changed that a month ago. This could also be a by-product of Java 1.5 since I haven't run tivostream on a Java 1.6 machine in a while (the Win XP SP2 PC laptop has 1.6).


----------



## Rdian06

Sevenfeet said:


> Well, not so fast. There is one major problem. The video and audio aren't synced when played this way. The delay is enormous...about 2-3 second with the audio being behind the video. I tried this on both Tivo S3s which each feed a AC-3 capable receiver. Same result and the same resule with both servers I'm running.


It's probably the Handbrake profile you're using. The darn thing has so many knobs you can fiddle with. Maybe start with one of the Apple TV profiles and manually override the audio selection to passthrough the AC3. There are Handbrake forums threads dedicated to fine tuning the encodes for different types of devices.

Alternately, you could try demuxing and remuxing the file with ffmpeg (as referenced in my previous posts) and then passing it through qt-faststart again. When remuxing you can introduce a fixed delay between the audio and video to get them back into sync IF you have a constant delay throughout the whole clip (though it does suck to have to do this empirically.)


----------



## kas25

I would love to try this but how user friendly is it to get this up and running? Should a novice try to download and install? Thanks.


----------



## moyekj

kas25 said:


> I would love to try this but how user friendly is it to get this up and running? Should a novice try to download and install? Thanks.


 Really is not much to it:
1. Make sure you have Java Runtime Environment 1.5 or later installed
2. Download and unpack the zip file
3. Edit the config.ini to add paths where to find your video files
4. In windows double click on the run_win.bat file to start the server (for Linux/Mac/Solaris or all other unix flavors you run run_unix.sh from command line)
5. On your Tivo(s) now go find "Video Streamer" under Music, Photos & More and start it and you are off and running.
(The included html documentation has more details on all the above steps)


----------



## moyekj

Sevenfeet said:


> There is one major problem. The video and audio aren't synced when played this way. The delay is enormous...about 2-3 second with the audio being behind the video. I tried this on both Tivo S3s which each feed a AC-3 capable receiver. Same result and the same resule with both servers I'm running.
> 
> Now I'm not sure just why I'm seeing this. I suppose I could try a faster machine but I have to openly wonder why a faster server would make a difference. I will try my PC laptop later this morning and see if it makes a difference. I'm so close to getting a final solution I can taste it. But I gotta wonder what's happening here.


 I've tried several re-encodes from DVD sources so far this weekend and while I didn't have the audio/video sync problems I found the Handbrake encodes (with Xbox 360 profile) resulted in "jumpy" video - not smooth at all from frame to frame. I tried a few other profiles that mostly either did not work or were no better.

Finally I gave up on Handbrake and switched to ffmpeg and the result was a HUGE improvement. I've now settled on a ffmpeg profile where just by varying the bitrate I get good SD and HD H.264+AC3 encodes that play well on Tivos and look almost as good as the original DVD. I have a Perl script that handles the encode and the qt-faststart run all in 1 shot. I post it here mostly for the benefit of others to see the kind of ffmpeg recipe that seems to work pretty well (being in Perl makes this easily portable to different architectures):


Code:


# perl tivo_mp4_encode.pl [-h] inputFile.mpg
# NOTE: Audio is not re-encoded (expect AC3)

use     Getopt::Std;

$ffmpeg		= "c:\\home\\ffmpeg\\ffmpeg.exe";
$qt_faststart	= "c:\\home\\ffmpeg\\qt-faststart.exe";

$bitrate 		= "2000k";
$bufsize		= "14745k";
$maxrate		= "16000k";
$level			= 31;
$framerate		= 29.97;
$gop_size		= 300;
$extension		= ".mp4";

# Command line options: Use -h for hd encodes (increases video bitrate)
getopts('h', \ my &#37;opts );
if ( $opts{h} ) {
   # Set higher bitrate for HD encodes
   $bitrate = "8000k";
}

# Get input file from command line argument
$input = $ARGV[0];
die "File not found: $input" if ! -f $input;

# Define output file
$output = $input;
$output =~ s/^(.+)\..+$/$1/;
$output = $output . $extension;
$output_tmp = $output . ".tmp";

# ffmpeg run
$command = qq#$ffmpeg -y -i $input -vcodec libx264 -coder 0 -level $level -r $framerate -sameq -g $gop_size -bufsize $bufsize -b $bitrate -maxrate $maxrate -bug "+autodetect+ms" -me epzs -trellis 2 -mbd 1 -acodec copy -f mp4 $output#;
&run($command);

# qt-faststart run
$command = qq#$qt_faststart $output $output_tmp#;
&run($command);

# Replace original encoding with qt-faststart version
print "Renaming $output_tmp to $output\n";
unlink($output);
rename($output_tmp, $output);

sub run {
 my $command = shift;
   print "$command\n";
   my $result = system($command);
   if ($result != 0) {
      die "*ERROR* command failed: $command\n";
   }
}


----------



## Tico

What am I missing? I cannot get it to start, I get errors attached below

I am running Vista 64 bit latest Java reinstalled today
Tried latest 2 builds


----------



## moyekj

Tico said:


> What am I missing? I cannot get it to start, I get errors attached below
> 
> I am running Vista 64 bit latest Java reinstalled today
> Tried latest 2 builds


 Looks like you don't have java in your windows path. Either add Java to your path or edit the run_win.bat script to give the full path to java.exe. For example, on my Vista system Java Runtime Environment is installed at:
c:\Program Files (x86)\Java\jre1.6.0_05
Thus the full path to the java.exe binary is:
c:\Program Files (x86)\Java\jre1.6.0_05\bin\java.exe

(On my system c:\Program Files (x86)\Java\jre1.6.0_05\bin is part of my windows path)


----------



## Tico

moyekj said:


> Looks like you don't have java in your windows path. Either add Java to your path or edit the run_win.bat script to give the full path to java.exe. For example, on my Vista system Java Runtime Environment is installed at:
> c:\Program Files (x86)\Java\jre1.6.0_05
> Thus the full path to the java.exe binary is:
> c:\Program Files (x86)\Java\jre1.6.0_05\bin\java.exe
> 
> (On my system c:\Program Files (x86)\Java\jre1.6.0_05\bin is part of my windows path)


Thanks for the reply, I edited the run_win,bat with exactly that and that is the TS2.jpg attachment above. Still no go.... Does the path need quotes or anything around it?

And what do you mean by "Either add Java to your path " Is that different than editing the run_win.bat?


----------



## moyekj

Tico said:


> Thanks for the reply, I edited the run_win,bat with exactly that and that is the TS2.jpg attachment above. Still no go.... Does the path need quotes or anything around it?
> 
> And what do you mean by "Either add Java to your path " Is that different than editing the run_win.bat?


 Yes, if the path has any spaces in it you should surround the whole thing in quotes. So in my example above in the run_win.bat file substitute java for:
"c:\Program Files (x86)\Java\jre1.6.0_05\bin\java.exe"

Alternately Y\you can edit your windows path as follows:
Control Panel->System->Advanced System Settings...
On System Properties select Advanced tab and click on Environment Variables...
In System Variables section find Path click on Edit... and at end of list add another semi-colon followed by full path to Java bin folder.

By adding java to your windows path then you can just leave the run_win.bat script alone as "java" would be found by the batch script.

P.S. If I recall correctly as part of Java installation it asks you if you want to add java to your windows path somewhere in installation process.


----------



## Tico

moyekj said:


> Yes, if the path has any spaces in it you should surround the whole thing in quotes. So in my example above in the run_win.bat file substitute java for:
> "c:\Program Files (x86)\Java\jre1.6.0_05\bin\java.exe"
> 
> Alternately Y\you can edit your windows path as follows:
> Control Panel->System->Advanced System Settings...
> On System Properties select Advanced tab and click on Environment Variables...
> In System Variables section find Path click on Edit... and at end of list add another semi-colon followed by full path to Java bin folder.
> 
> By adding java to your windows path then you can just leave the run_win.bat script alone as "java" would be found by the batch script.
> 
> P.S. If I recall correctly as part of Java installation it asks you if you want to add java to your windows path somewhere in installation process.


Bingo, adding the path worked... Thanks....


----------



## beady

I used Pinnacal Studio 11 to create a 1 minute MPEG2 video of some HD footage I took with my Sony HDR-SR11. It seems like the server can't stream fast enough to keep up with the video. Could the file be too big or is something else wrong? I'm running Windows Vista. Is there a program I can run to give me information about the file? I'm running Tivo Stream Vp06.


----------



## moyekj

beady said:


> I used Pinnacal Studio 11 to create a 1 minute MPEG2 video of some HD footage I took with my Sony HDR-SR11. It seems like the server can't stream fast enough to keep up with the video. Could the file be too big or is something else wrong? I'm running Windows Vista. Is there a program I can run to give me information about the file? I'm running Tivo Stream Vp06.


 GSpot is an application to look at program information. You could also install VideoLAN VLC which can display information about the stream it's playing.
What kind of speeds do you get for Tivo To Come Back? (NOTE, you can check speeds you are getting under network diagnostics on your Tivos). The streaming speeds seem to be comparable to that. THD units are a little slower than S3 units for some reason and I think max out around 10 Mbits/sec or so which doesn't cut it for the higher bitrate HD mpeg2 streams which for 1080i high quality streams can go as high as 19 Mbits/sec or so.
Of course the other alternative is to encode to H.264 instead of mpeg2. Being a more efficient encoding you can get about same quality with about half the bitrate of mpeg2.

For my case I've streamed lots of episodes of Lost (720p mpeg2) to my S3s and the stream just about keeps up slightly faster than real time. I get around 11-12 Mbits/sec rate during streaming (wireless connection on laptop side). I can get a little faster than that with a wired connection.

NOTE: It also can help to tune both tuners of the Tivo you are streaming to to channels you don't receive - that takes a lot of load off the Tivo to allow it to devote more resources to the video stream.


----------



## SamD

All my files come from single source, my Tivo HD. I download them with T2Sami and convert to mpeg with either T2Sami or Tivo Decoder. SD material plays with no problems. However, two HD shows that I tried (Ratatouille and Earth Biography) freeze after 15-20 seconds, green strip at the bottom of screen comes up (buffer image?), shortens for about two minutes and finally freezes as well. I'm running Windows XP Home and Tivostream Vp08. What could be wrong?


----------



## beady

moyekj said:


> THD units are a little slower than S3 units for some reason and I think max out around 10 Mbits/sec or so which doesn't cut it for the higher bitrate HD mpeg2 streams which for 1080i high quality streams can go as high as 19 Mbits/sec or so.
> 
> Of course the other alternative is to encode to H.264 instead of mpeg2. Being a more efficient encoding you can get about same quality with about half the bitrate of mpeg2.


That makes sense. I have an S3 but I encoded the video at a High Quality 1080i format. I'm using Pinnacle Studio 11 and have not had any luck encoding the video using H.264 and then using Tivo Stream.

I'll play around with some of the other formats to see what works.


----------



## moyekj

SamD said:


> All my files come from single source, my Tivo HD. I download them with T2Sami and convert to mpeg with either T2Sami or Tivo Decoder. SD material plays with no problems. However, two HD shows that I tried (Ratatouille and Earth Biography) freeze after 15-20 seconds, green strip at the bottom of screen comes up (buffer image?), shortens for about two minutes and finally freezes as well. I'm running Windows XP Home and Tivostream Vp08. What could be wrong?


 If you catch up to the stream buffer while playing (which can easily happen with HD mpeg2 streaming) then tivostream automatically pauses which allows for the stream buffer to build up again. However if you stay paused you should see the buffer continue to build up (and hence the green position indicator continue to shrink). It sounds like after a couple of minutes something happens and the stream is stopping completely.

It would help to see the console messages that are printed when you stream the HD shows.


----------



## SamD

Reporting my "research" results. First, when playback freezes no new messages come up in console window. Found that pressing Play key unfreezes streaming. First run of Ratatouille ran uninterrupted about 10 minutes, then I left the room for about half an hour. When I came back Tivo switched to Live TV. Second run demanded Play pressing almost every minute. Still no new console messages. Then playback went smoothly for about fifteen minutes and suddenly freezed (no buffer indicator) due to console message "LOG: 192.168.1.6 I/O Exception handling HTTP GET Ratatouille.mpg: Connection reset by peer: socket write error."
In three minutes connection self restored (!), buffer indicator came up, I pressed Play and playback went on. In five minutes new socket write error and I killed connection.


----------



## moyekj

SamD said:


> Reporting my "research" results. First, when playback freezes no new messages come up in console window. Found that pressing Play key unfreezes streaming. First run of Ratatouille ran uninterrupted about 10 minutes, then I left the room for about half an hour. When I came back Tivo switched to Live TV. Second run demanded Play pressing almost every minute. Still no new console messages. Then playback went smoothly for about fifteen minutes and suddenly freezed (no buffer indicator) due to console message "LOG: 192.168.1.6 I/O Exception handling HTTP GET Ratatouille.mpg: Connection reset by peer: socket write error."
> In three minutes connection self restored (!), buffer indicator came up, I pressed Play and playback went on. In five minutes new socket write error and I killed connection.


 What kind of network do you have? Wired ethernet, wireless, homeplug, other? As I mentioned if you catch up to the buffer (green bar all the way to the end) then this program intentionally freezes because your network stream is not fast enough to keep up with real time playback and needs to be paused to let buffer build up. However, for cases where you are seeing the I/O Exception errors in the console that means something happened to your network connection and the stream was dropped, or Tivo is rejecting the stream. You should try moving that show to your Tivo using Tivo Desktop (or one of the many programs supporting Tivo To Come Back) to see how that goes.

I've watched several SD shows and HD episodes of Lost via streaming method without any issues. On occasion on the HD feeds I have caught up to buffer and needed to sit at pause a couple of minutes to let buffer build up, but I have not seen the I/O errors you are seeing.


----------



## SamD

My network is wired and Tivo is connected via Linksys SD205 switch to Verizon FIOS Actiontec router. This morning I connected Tivo directly to router and the streaming worked about thirty minutes but after this I again got this socket write error.
Looks as I need to upgrade my network to gigabit speed...

By the way, may I again return to subtitles question, because I badly need subtitles in playback (at least for SD material that works for me). T2Sami easily allows to extract subtitles in srt text file. Is it possible to use this file in tivostreamer?


----------



## wmcbrine

SamD said:


> Looks as I need to upgrade my network to gigabit speed...


That won't help -- the TiVo's port is only 100 Mbps, and is underutilized as it is.


----------



## moyekj

SamD said:


> My network is wired and Tivo is connected via Linksys SD205 switch to Verizon FIOS Actiontec router. This morning I connected Tivo directly to router and the streaming worked about thirty minutes but after this I again got this socket write error.
> Looks as I need to upgrade my network to gigabit speed...
> 
> By the way, may I again return to subtitles question, because I badly need subtitles in playback (at least for SD material that works for me). T2Sami easily allows to extract subtitles in srt text file. Is it possible to use this file in tivostreamer?


 As already mentioned above, Gigabit network won't help. THD units for TTG/streaming purposes max out around 10 Mb/sec anyway. You could try wmcbrine's video streamer application instead to see if that works any better for you.
As far as captions: Tivo doesn't support reading captions from video streams at the moment, so it would have to be up to the HME application to implement them. Currently I don't believe any HME application that I know of supports captions, including Tivo's own YouTube application. It's been discussed a little in this thread but I haven't looked into it at all yet as I don't foresee it being an easy thing to implement.
One final thought on captions: If Videolan VLC supports captions in any form then it's possible that wmcbrine's application may be an easy way to get captions working for video streaming.


----------



## Sevenfeet

Well I'm still working on getting ffmpegX up and working on one of my Macs. I should have all the components installed hopefully by tomorrow.

In the meantime, Apple has just released updates for Java 1.4, 1.5 and 1.6. In the case of 1.4 and 1.5, it has finally been updated to the last stable release from Sun respectively for each version. For 1.6, I believe it is release 07 (also latest release from Sun). This puts Apple in a rare position to having Java completely up to date on the Mac for the first time in who-knows-when.

That being said, the DNS crash i have with tivostream still happens with this release. I haven't had time to swap our DNS servers on my network to see if this problem goes away with my Solaris version (versus the Leopard version of BIND). I'll see if I can do it over the weekend.


----------



## moyekj

FYI. With latest release of kmttg (just released) I've now included encoding profiles to generate Tivo streamable mpeg4 files. The encoding profiles handle both the encoding with ffmpeg and the qt-faststart post-processing automatically.


----------



## jebbbz

Does anyone if the output from a Hauppauge 1212 HD-PVR component capture box would stream to an HD TiVo? (I don't have one but have read that its hardware encoder generates H.264 in a .TS container but includes software to convert to an .MP4.)


----------



## moyekj

jebbbz said:


> Does anyone if the output from a Hauppauge 1212 HD-PVR component capture box would stream to an HD TiVo? (I don't have one but have read that its hardware encoder generates H.264 in a .TS container but includes software to convert to an .MP4.)


TS container won't work but MP4 container should, but probably only after running through qt-faststart.


----------



## beady

I ran qt_faststart.exe against one of my pinnacle generated mp4 files. I originally created the file to emai so it was pretty small. When I tried to stream it, the Tivo rebooted! Gpot tells me the following about the file:

mp42: MP4 v2
isom MP4 Base Media v1
Recommended Display size 512 x 288
Codec mp4a: MPEG-4 AAC LC
Info 48000Hz 128kb/s tot,sterso (2/0)
kbps 450
Pic/s 29.940 Frame/s 29.940

Any suggestions on what I should change so that the Tivo doesn't crash?


----------



## moyekj

beady said:


> I ran qt_faststart.exe against one of my pinnacle generated mp4 files. I originally created the file to emai so it was pretty small. When I tried to stream it, the Tivo rebooted! Gpot tells me the following about the file:
> 
> mp42: MP4 v2
> isom MP4 Base Media v1
> Recommended Display size 512 x 288
> Codec mp4a: MPEG-4 AAC LC
> Info 48000Hz 128kb/s tot,sterso (2/0)
> kbps 450
> Pic/s 29.940 Frame/s 29.940
> 
> Any suggestions on what I should change so that the Tivo doesn't crash?


 Tivo currently only seems to accept H.264 (and of course mpeg2) for video. MP4 V2 is not supported. The AAC audio portion should be fine.


----------



## halfsheep

Thank you for the app and all the work! 

I have an issue with files not playing until the end. They happen to be .mpg files (created as vobs with dvdshrink and renamed to .mpg) I had a movie that DVD shrink split into 5 vobs. I then combined them back into 1 vob about 4 gigs in size. When I played it, only the first 28 minutes of the 1.5 hour file played. 

When I played each of the individual 5 mpg files, the first 4 played fine, in their entirety, but the last one stops after 20 seconds (it's only about 4 minutes long in total but won't play past 20 seconds via streamer.) 

Both the files that cut off in streamer - play fine in total on my PC. I.e. the files are complete. 

Any ideas/suggestions?


----------



## moyekj

halfsheep said:


> Thank you for the app and all the work!
> 
> I have an issue with files not playing until the end. They happen to be .mpg files (created as vobs with dvdshrink and renamed to .mpg) I had a movie that DVD shrink split into 5 vobs. I then combined them back into 1 vob about 4 gigs in size. When I played it, only the first 28 minutes of the 1.5 hour file played.
> 
> When I played each of the individual 5 mpg files, the first 4 played fine, in their entirety, but the last one stops after 20 seconds (it's only about 4 minutes long in total but won't play past 20 seconds via streamer.)
> 
> Both the files that cut off in streamer - play fine in total on my PC. I.e. the files are complete.
> 
> Any ideas/suggestions?


 You are not the first to report streams that just stop for no apparent reason in this thread and I actually saw the same thing happen just last night (during playback of 1 of my HD mpeg2 files). Haven't figured out why yet but I don't have a reproducible case to experiment with.
Is the problem with your last 4 min clip reproducible? If so that would be a great clip for me to get hold of for debugging purposes. Please PM or email me ([email protected]) and I can arrange an upload location for your clip so I can get hold of it. (Or if you already can upload to somewhere I can get access to that would be great).


----------



## moyekj

halfsheep said:


> Thank you for the app and all the work!
> 
> I have an issue with files not playing until the end. They happen to be .mpg files (created as vobs with dvdshrink and renamed to .mpg) I had a movie that DVD shrink split into 5 vobs. I then combined them back into 1 vob about 4 gigs in size. When I played it, only the first 28 minutes of the 1.5 hour file played.
> 
> When I played each of the individual 5 mpg files, the first 4 played fine, in their entirety, but the last one stops after 20 seconds (it's only about 4 minutes long in total but won't play past 20 seconds via streamer.)
> 
> Both the files that cut off in streamer - play fine in total on my PC. I.e. the files are complete.
> 
> Any ideas/suggestions?


 Update on this. I obtained the clip from halfsheep and was able to reproduce the problem while streaming to my Tivos. However I tried to transfer the clip to my Tivos using pyTivo and it chokes at exactly the same point. So clearly there are some mpeg2 files that Tivo simply can't handle and this problem is not related to tivostream itself.

What's interesting is it's not the decoder itself as with pyTivo I was transferring without viewing and it fails. Similarly while streaming the stream buffer ends at the 20 sec point since that is where it is cut off by the Tivo. So it seems the demuxing phase is what is failing.


----------



## moyekj

moyekj said:


> Update on this. I obtained the clip from halfsheep and was able to reproduce the problem while streaming to my Tivos. However I tried to transfer the clip to my Tivos using pyTivo and it chokes at exactly the same point. So clearly there are some mpeg2 files that Tivo simply can't handle and this problem is not related to tivostream itself.
> 
> What's interesting is it's not the decoder itself as with pyTivo I was transferring without viewing and it fails. Similarly while streaming the stream buffer ends at the 20 sec point since that is where it is cut off by the Tivo. So it seems the demuxing phase is what is failing.


 Another update with a quick solution. I ran the offending clip through VideoRedo Quickstream fix and the problem went away: both via pyTivo and tivostream I played back the stream without issue. So obviously some glitch in the mpeg2 stream that Tivo can't handle that can be fixed with VRD.


----------



## rfryar

How did you combine the 5 clips into one? If you did not use a MPG tool to piece them together it will have some invalid data that causes many programs to think it is over. 

Video Redo will correct this as previously stated.

Rick


----------



## beady

Is it possible to use ffmpeg to convert AVCHD to H.264? As far as I can tell Pinnacle Studio 11 doesn't output to H.264. I found a program called Badaboom that is in beta but it requires an Nvidia G84 or higher chipset to work wiht AVCHD.


----------



## bohbot16

Sevenfeet said:


> the DNS crash i have with tivostream still happens with this release. I haven't had time to swap our DNS servers on my network to see if this problem goes away with my Solaris version (versus the Leopard version of BIND). I'll see if I can do it over the weekend.


It appears to be an issue with the JmDNS used in tivostream. I noticed this in the Galleon changelog:

"Update JmDNS package to 1.0 (not using JmDNS from hme-host-sample-1.4.jar anymore); seems to help on Mac OS X 10.5"

I followed windracer's instructions for launching tivostream through Galleon, and the mDNS issue went away on my OS X 10.5 (Leopard) machine.


----------



## cahoon

I just wanted to say that tivostream is one of the coolest apps that I've seen in a while. It was very easy to use. It's great to just stream my mp4 files to my Tivo rather than copy. Great job.

Also, since I'm a Java guy, I like that it's written in Java 

-- Brendon


----------



## Ely105

With tivostream mp4's does the audio have to be AAC or can it be AC3? I thought i read somewhere that the mp4 spec doesn't allow for AC3 but that you could use handbrake to get around.

If AC3 is ok then, does anyone know of a good remuxer for combining x264 and AC3 streams? I used TsMuxer to split out the .264 and AC3 streams from a MKV file but I need a tool (windows) to recombine them in an .mp4 container. I am trying to avoid reencoding the audio and video, although if I have to I can reencode AC3 to AAC, but i think it would save me a bunch of time to not have to reencode the video portion.

On another streaming topic, i'd like to get tivostream, or similar to run on my ReadyNAS NV+ box. pytivo would be ok for just transferring .tivo files and no encoding but if I could stream directly that would be great for the the .mp4 files. But I have read that the little ReadyNas doesn't have the HP to run Java, so i'm wondering if wmcbrines Python based HME project would do that? It seems that it might be doable with python on that platform, but then again i'm only smart enough to be dangerous.


----------



## moyekj

Ely105 said:


> With tivostream mp4's does the audio have to be AAC or can it be AC3? I thought i read somewhere that the mp4 spec doesn't allow for AC3 but that you could use handbrake to get around.
> 
> If AC3 is ok then, does anyone know of a good remuxer for combining x264 and AC3 streams? I used TsMuxer to split out the .264 and AC3 streams from a MKV file but I need a tool (windows) to recombine them in an .mp4 container. I am trying to avoid reencoding the audio and video, although if I have to I can reencode AC3 to AAC, but i think it would save me a bunch of time to not have to reencode the video portion.
> 
> On another streaming topic, i'd like to get tivostream, or similar to run on my ReadyNAS NV+ box. pytivo would be ok for just transferring .tivo files and no encoding but if I could stream directly that would be great for the the .mp4 files. But I have read that the little ReadyNas doesn't have the HP to run Java, so i'm wondering if wmcbrines Python based HME project would do that? It seems that it might be doable with python on that platform, but then again i'm only smart enough to be dangerous.


As shown in table in tivostream documentation the Tivo accepts both AC3 & AAC for audio along with H.264 in an mpeg4 container.
You may be able to use ffmpeg to change containers while not re-encoding audio or video. Something like:
ffmpeg -i inputFile.mkv -vcodec copy -acodec copy -f mp4 outputFile.mp4
(i.e. copy video and audio stream but output in mp4 container)
NOTE: You will probably also have to run the resulting mp4 file through qt-faststart before you can stream it to Tivo.


----------



## Ely105

Thanks Moyekj!

Sorry for maybe a noob question, i've been reading too many posts that the bits fall out as quick as they go in!

I will try ffmpeg to combine the streams tonight and see how that goes.

I tried running your example ffmpeg command line on your tivostream web site (code.google) and i kept getting errors, but there were so many options on that one who knows what was going on...


----------



## Ely105

moyekj said:


> As shown in table in tivostream documentation the Tivo accepts both AC3 & AAC for audio along with H.264 in an mpeg4 container.
> You may be able to use ffmpeg to change containers while not re-encoding audio or video. Something like:
> ffmpeg -i inputFile.mkv -vcodec copy -acodec copy -f mp4 outputFile.mp4
> (i.e. copy video and audio stream but output in mp4 container)
> NOTE: You will probably also have to run the resulting mp4 file through qt-faststart before you can stream it to Tivo.


bummer, unfortunately that command doesn't work. It says "codec frame size not set" and then " could not write header for output file "

maybe i can reencode the audio to aac and see if that helps....


----------



## cmontyburns

I hope you all will forgive a VERY newbie question, but I am just starting to look at HME stuff for the first time tonight. Do I need to install TiVo Desktop to make this and other HME apps work? I see there is a set of HME classes required and I don't know where to get them.


----------



## moyekj

cmontyburns said:


> I hope you all will forgive a VERY newbie question, but I am just starting to look at HME stuff for the first time tonight. Do I need to install TiVo Desktop to make this and other HME apps work? I see there is a set of HME classes required and I don't know where to get them.


 No, everything needed as far as HME classes is in the jar file that is part of the zip package and you don't need anything from Tivo Desktop (I personally don't like or use Tivo Desktop software at all as I find 3rd party apps are much better). As stated in the documentation just run (double click) on run_win.bat script to run (on Windows, for other operating systems you can use run_unix.sh script). You do need to have Java Runtime Environment 1.5 or later installed.


----------



## cmontyburns

Thanks, moyekj. I ran the shell script and got a NoClassDefFound (looking for com/tivo/hme/host/sample/Main) so I wondered if I needed something else that provided the HME classes. I suppose I need to set my classpath somewhere. It has been a loooooooong time since I did any programming, but I'll get it worked out.


----------



## Ely105

Hi moyekj,

On one of the streams I created using handbrake I am experiencing the stream dropping after around 17 minutes of playback. not in the same place.

here is the output from server screen:

>> Reading metadata file: V:\\Seinfeld - The Calzone.mp4.txt
LOG: 192.168.0.90 Seinfeld - The Calzone.mp4 HTTP GET - to factory /videostream/

url=file:/V:/Seinfeld%20-%20The%20Calzone.mp4
LOG: 192.168.0.90 I/O Exception handling HTTP GET Seinfeld - The Calzone.mp4: Connection reset by peer: socket write error

Any ideas?

Thanks


----------



## moyekj

Ely105 said:


> Hi moyekj,
> 
> On one of the streams I created using handbrake I am experiencing the stream dropping after around 17 minutes of playback. not in the same place.
> 
> here is the output from server screen:
> 
> >> Reading metadata file: V:\\Seinfeld - The Calzone.mp4.txt
> LOG: 192.168.0.90 Seinfeld - The Calzone.mp4 HTTP GET - to factory /videostream/
> 
> url=file:/V:/Seinfeld%20-%20The%20Calzone.mp4
> LOG: 192.168.0.90 I/O Exception handling HTTP GET Seinfeld - The Calzone.mp4: Connection reset by peer: socket write error
> 
> Any ideas?
> 
> Thanks


 There are glitches in some video files that Tivo just plain rejects and hence the stream halts. A few posts up a user with an mpeg2 file was having the same problem and it turned out it failed in both tivostream and pyTivo, so obviously something the Tivo didn't like. The fix for that problem was to run it through VideoRedo Quickstream fix. For mpeg4 files I don't know of a Quickstream fix like tool however. If the source of that mp4 file is an mpeg2 file then I would suggest running Quickstream fix on it before encoding it to mp4.
Also, personally I found encodings came out better with ffmpeg than with Handbrake, so you may want to try that.
If you like P.M. me and perhaps I can get hold of the offending (and perhaps the source) video file to investigate further.


----------



## Ely105

moyekj said:


> There are glitches in some video files that Tivo just plain rejects and hence the stream halts. A few posts up a user with an mpeg2 file was having the same problem and it turned out it failed in both tivostream and pyTivo, so obviously something the Tivo didn't like. The fix for that problem was to run it through VideoRedo Quickstream fix. For mpeg4 files I don't know of a Quickstream fix like tool however. If the source of that mp4 file is an mpeg2 file then I would suggest running Quickstream fix on it before encoding it to mp4.
> Also, personally I found encodings came out better with ffmpeg than with Handbrake, so you may want to try that.
> If you like P.M. me and perhaps I can get hold of the offending (and perhaps the source) video file to investigate further.


thanks for the help. The file is one that I edited (removed commercials) in Redo and used it to output to an .MPG before I encoded in handbrake. Let me give ffmpeg a try and see if it does a better job. Should I use the encode string that you have in kmttg? It's actually encoding a full length version of the same clip.

One more question - when you encode using ffmpeg do you prefer to keep source resolution (ie 1080 in my case) or do you downres to 720p? I did the clip in handbrake in 720p and it looked good quality-wise at about 8mbps streaming. I know some folks prefer to use the bits on a smaller file and let the device scale...


----------



## moyekj

Ely105 said:


> thanks for the help. The file is one that I edited (removed commercials) in Redo and used it to output to an .MPG before I encoded in handbrake. Let me give ffmpeg a try and see if it does a better job. Should I use the encode string that you have in kmttg? It's actually encoding a full length version of the same clip.
> 
> One more question - when you encode using ffmpeg do you prefer to keep source resolution (ie 1080 in my case) or do you downres to 720p? I did the clip in handbrake in 720p and it looked good quality-wise at about 8mbps streaming. I know some folks prefer to use the bits on a smaller file and let the device scale...


 Try using the kmttg tivostream_hd profile (but maybe lower the bitrate a little). I always try and keep the source resolution figuring the more scaling you do the worse you are going to affect quality.


----------



## cmontyburns

Everything's working nicely on the Mac now. I wrote an AppleScript launcher for tivostream and made an application bundle out of the whole thing, so one click and she's off and running.

My only remaining issue is that the <topdir> setting starts at the root of my Home directory no matter what I put there.

/Users/(username)
/Applications/TiVoStream
or no entry at all...

tivostream always starts me at /Users/(username).

Not a big deal though.

ETA: Ah. That's because it completely ignores the config.ini file for some reason.


----------



## moyekj

cmontyburns said:


> Everything's working nicely on the Mac now. I wrote an AppleScript launcher for tivostream and made an application bundle out of the whole thing, so one click and she's off and running.
> 
> My only remaining issue is that the <topdir> setting starts at the root of my Home directory no matter what I put there.
> 
> /Users/(username)
> /Applications/TiVoStream
> or no entry at all...
> 
> tivostream always starts me at /Users/(username).
> 
> Not a big deal though.
> 
> ETA: Ah. That's because it completely ignores the config.ini file for some reason.


If it is still ignoring your config.ini then it's because it can't find config.ini in the directory where the application is starting. If it's starting in /Users/(username) then you should put the config.ini file under /Users/(username)/config.ini


----------



## cmontyburns

moyekj said:


> If it is still ignoring your config.ini then it's because it can't find config.ini in the directory where the application is starting. If it's starting in /Users/(username) then you should put the config.ini file under /Users/(username)/config.ini


Thanks -- yep, I realized that later after I had posted the above. It does work fine with the config.ini in the root of my Home directory. Odd that it doesn't find it in the directory local to the app itself.


----------



## Ely105

moyekj said:


> Try using the kmttg tivostream_hd profile (but maybe lower the bitrate a little). I always try and keep the source resolution figuring the more scaling you do the worse you are going to affect quality.


Ok a little more progress here. I did reencode the clip using ffmpeg and it does do a better job on audio/video than handbrake. I used your tivostream profile and it worked great at 8k bitrate and was able to keep ahead of realtime playback. But I am still seeing a stream error and it stops playing after about 14-17 minutes. I encoded a different file using same profile and the same happened. Not sure what is causing that stream error to occur every time like that. I will do a little more investigating.

fyi - if a file is named ".MP4" (all caps) tivostream ignores it. That had me going for a few minutes. 

I also discovered that FFMPEG doesn't like the AC3 file on my .mkv files. It gives an error if I try to do a streamcopy. So I need to reencode. The problem I am seeing is that if I reencode to AC3 then my PC doesn't seem to see the AC3 audio track. But the Tivo plays it fine. Not sure if my Haali media splitter doesn't like AC3. If I encode to AAC it seems to work fine. I was thinking that if I have to reencode audio maybe I should just encode to AAC since it's a little more bitrate efficient. The question I have there is the "-ab" option -- is that a "per channel" setting. And then for AAC, what should it be? I think AC3 is 384-CBR, but with AAC it should suffice to use 192 or thereabouts?


----------



## Rdian06

Ely105 said:


> I also discovered that FFMPEG doesn't like the AC3 file on my .mkv files. It gives an error if I try to do a streamcopy. So I need to reencode. The problem I am seeing is that if I reencode to AC3 then my PC doesn't seem to see the AC3 audio track. But the Tivo plays it fine. Not sure if my Haali media splitter doesn't like AC3. If I encode to AAC it seems to work fine. I was thinking that if I have to reencode audio maybe I should just encode to AAC since it's a little more bitrate efficient. The question I have there is the "-ab" option -- is that a "per channel" setting. And then for AAC, what should it be? I think AC3 is 384-CBR, but with AAC it should suffice to use 192 or thereabouts?


AC3 inside of MP4 is a relatively new development. It's going to take a while for the various playback programs to catch up.

I wouldn't re-encode the AC3 to AAC if I were you. The savings in space isn't a bit deal, but you will lose 5.1 surround sound when transferred to the Tivo. Then again if you just care about stereo or your sources are all stereo, the point it moot.


----------



## Ely105

Rdian06 said:


> AC3 inside of MP4 is a relatively new development. It's going to take a while for the various playback programs to catch up.
> 
> I wouldn't re-encode the AC3 to AAC if I were you. The savings in space isn't a bit deal, but you will lose 5.1 surround sound when transferred to the Tivo. Then again if you just care about stereo or your sources are all stereo, the point it moot.


ah, ok. I wasn't sure if Tivo supported 6 channel AAC but i guess not. Then AC-3 it is. I will just have to figure out how to get my PCs to realize that it's ok to have AC3 with mp4.

Still having an issue with tivostream (or the tivo) dropping while streaming. it goes along fine for about 18-19 minutes now and then gives a "connection reset by peer: socket write error". This is from a downloaded tivo mpg stream, edited in videoredo and then converted to mp4 with this:

FFMPEG -y -i INFILE.mpg -vcodec libx264 -coder 0 -level 41 -sameq -g 300 -bufsize 14745k -b 8000k -maxrate 10000k -bug "+autodetect+ms" -me_method epzs -threads 4 -trellis 2 -mbd 1 -copyts -acodec copy -f mp4 OUTFILE.mp4

I've tried a couple different videos in the same fashion - starts as a tivo downloaded (HD 1080) program. streams for more than 15min and then chokes. 

I have been using svn15216 of ffmpeg. Which leads me to another question. On Tripps website he calls that version "buggy x264". Does that mean anything? Also he has a version 15394 posted -- Is that something worth using?

thx.


----------



## moyekj

Ely105 said:


> ah, ok. I wasn't sure if Tivo supported 6 channel AAC but i guess not. Then AC-3 it is. I will just have to figure out how to get my PCs to realize that it's ok to have AC3 with mp4.
> 
> Still having an issue with tivostream (or the tivo) dropping while streaming. it goes along fine for about 18-19 minutes now and then gives a "connection reset by peer: socket write error". This is from a downloaded tivo mpg stream, edited in videoredo and then converted to mp4 with this:
> 
> FFMPEG -y -i INFILE.mpg -vcodec libx264 -coder 0 -level 41 -sameq -g 300 -bufsize 14745k -b 8000k -maxrate 10000k -bug "+autodetect+ms" -me_method epzs -threads 4 -trellis 2 -mbd 1 -copyts -acodec copy -f mp4 OUTFILE.mp4
> 
> I've tried a couple different videos in the same fashion - starts as a tivo downloaded (HD 1080) program. streams for more than 15min and then chokes.
> 
> I have been using svn15216 of ffmpeg. Which leads me to another question. On Tripps website he calls that version "buggy x264". Does that mean anything? Also he has a version 15394 posted -- Is that something worth using?
> 
> thx.


While encoding do you see any unusual messages from ffmpeg around the 15 min mark or so? Are you able to transfer the decoded 1080i mpeg2 back to your Tivo (using pyTivo or Tivo Desktop) without issue? Did you run the mpeg2 stream through VRD QS Fix before editing & encoding?


----------



## Ely105

moyekj said:


> While encoding do you see any unusual messages from ffmpeg around the 15 min mark or so? Are you able to transfer the decoded 1080i mpeg2 back to your Tivo (using pyTivo or Tivo Desktop) without issue? Did you run the mpeg2 stream through VRD QS Fix before editing & encoding?


I did see some "underflow" messages from ffmpeg, although i wasn't able to notice where in the stream they showed up.

I did run it back through VRD quick fix after editing, and i got the stream to play to within 15 seconds of the end. Is it better to do a quickfix before editing?

I haven't tried the mpg file back to the tivo yet - My wife is getting sick of this episode of Seinfeld.

I did the same workflow for another program and it worked fine for the whole stream.


----------



## Sevenfeet

bohbot16 said:


> It appears to be an issue with the JmDNS used in tivostream. I noticed this in the Galleon changelog:
> 
> "Update JmDNS package to 1.0 (not using JmDNS from hme-host-sample-1.4.jar anymore); seems to help on Mac OS X 10.5"
> 
> I followed windracer's instructions for launching tivostream through Galleon, and the mDNS issue went away on my OS X 10.5 (Leopard) machine.


Thanks for the tip (and sorry it's taken so long to reply). This is not just a Mac issue but it also happens if you run tivostream on Solaris (SPARC). If it's happening on a Sun box (the mother of all Java servers), then it's a problem.


----------



## dlfl

Ely105 said:


> ....... Is it better to do a quickfix before editing?
> .........


I believe the answer to that is "yes".


----------



## moyekj

Sevenfeet said:


> Thanks for the tip (and sorry it's taken so long to reply). This is not just a Mac issue but it also happens if you run tivostream on Solaris (SPARC). If it's happening on a Sun box (the mother of all Java servers), then it's a problem.


 Can you give the details of the problem? I am using Tivo's hme-host-sample.jar from HME distribution so currently don't have control over that portion of the code, but since source is available fixes should be possible. I do have access to a Solaris server (though not on my LAN) so if I can reproduce the issue there I may be able to look into this some more.


----------



## Sevenfeet

moyekj said:


> Can you give the details of the problem? I am using Tivo's hme-host-sample.jar from HME distribution so currently don't have control over that portion of the code, but since source is available fixes should be possible. I do have access to a Solaris server (though not on my LAN) so if I can reproduce the issue there I may be able to look into this some more.


This is the same issue I gave earlier. That is, after tivostream has been running for anywhere from several minutes to a few hours, you get the following error:

Exception in thread "JmDNS.SocketListener" java.lang.ArrayIndexOutOfBoundsException: 7 >= 7
at java.util.Vector.elementAt(Vector.java:432)
at javax.jmdns.DNSRecord.suppressedBy(Unknown Source)
at javax.jmdns.DNSOutgoing.addAnswer(Unknown Source)
at javax.jmdns.JmDNS.handleQuery(Unknown Source)
at javax.jmdns.JmDNS$SocketListener.run(Unknown Source)
at java.lang.Thread.run(Thread.java:613)

The "java.lang.ArrayIndexOutOfBoundsException: 7 >= 7" number varies...I've seen 6, 5 and 7 as output error numbers. But the error itself is always the same. You earlier asked me to set the debug flag and rerun tivostream. This had no effect...I got the same output. This problem happened with either Mac OS X Leopard (PPC) or Solaris 10 SPARC, both running Java 1.5.

Since it looks like the folks maintaining Galleon have recently run into the same issue and offered a fix in the latest version (2.5.3). I downloaded Galleon (not sure why I haven't run Galleon before) and got it working and got tivostream working inside of it. So far, it's been running for about 16 hours without a crash, which is longer than I've ever seen it run.

You may want to check the Galleon project to see what they did with their code.


----------



## moyekj

Sevenfeet said:


> This is the same issue I gave earlier. That is, after tivostream has been running for anywhere from several minutes to a few hours, you get the following error:
> 
> Exception in thread "JmDNS.SocketListener" java.lang.ArrayIndexOutOfBoundsException: 7 >= 7
> at java.util.Vector.elementAt(Vector.java:432)
> at javax.jmdns.DNSRecord.suppressedBy(Unknown Source)
> at javax.jmdns.DNSOutgoing.addAnswer(Unknown Source)
> at javax.jmdns.JmDNS.handleQuery(Unknown Source)
> at javax.jmdns.JmDNS$SocketListener.run(Unknown Source)
> at java.lang.Thread.run(Thread.java:613)
> 
> The "java.lang.ArrayIndexOutOfBoundsException: 7 >= 7" number varies...I've seen 6, 5 and 7 as output error numbers. But the error itself is always the same. You earlier asked me to set the debug flag and rerun tivostream. This had no effect...I got the same output. This problem happened with either Mac OS X Leopard (PPC) or Solaris 10 SPARC, both running Java 1.5.
> 
> Since it looks like the folks maintaining Galleon have recently run into the same issue and offered a fix in the latest version (2.5.3). I downloaded Galleon (not sure why I haven't run Galleon before) and got it working and got tivostream working inside of it. So far, it's been running for about 16 hours without a crash, which is longer than I've ever seen it run.
> 
> You may want to check the Galleon project to see what they did with their code.


I've had tivostream running for the past 4 hours or so on a Solaris 5.10 host (with java 1.5). I don't have a Tivo available on the LAN (this is at work) to use as a client, but I fired off the HME simulator to use as a client and it's just sitting there connected to tivostream Solaris server sitting in file browser mode - occasionally I change directories just to keep some activity going. So far no issues, so I may not be able to reproduce this. Without reproducing the problem it makes it a lot harder to identify and fix the issue. At least it's good to see that you have a workaround by running via Galleon.

EDIT: 8+ hours now without issue. I'll let it run over the weekend but I'm not expecting any problems so looks like I cannot reproduce this. It may be that having Tivos broadcasting on the LAN is necessary to provoke the issue...


----------



## elsteve

I have a bunch of .mkv files which contain h.264/ac3 video/audio.
I'd like to convert them to .mp4 so I can stream them to my Tivo HD via tivostream.

I am using FFmpeg version SVN-r15216-rdian06-0.95-win32-x86_32 as follows to get the.mkv to .mp4 format:
ffmpeg -y -i inputfile.mkv -vcodec copy -acodec ac3 -ab 384k -f mp4 outputfile.mp4

(I am using the -acodec ac3 -ab384k parm because for whatever reason, -acodec copy doesn't want to work - codec frame size not set - ??)

At this point the resultant .mp4 file is >playable< on the PC with VLC but is quite choppy. 

First question: Why is the playback so poor? the .mkv file plays without a hitch and (to my limited understanding), all I've done is change the container. Any thoughts?

*** I've also tried with the -an option to eliminate audio, just in case, but no luck...

If I continue and run qt-faststart on the resultant .mp4 and then try to access it via tivostream from the Tivo, I get no playback at all and all the tivostream console shows is "unknown event opcode : 8"

Second question: What's going on here? I suspect that if I resolve the first issue, the second will be fixed as well, but wanted to give the complete picture.

Thanks for reading - and thanks for any help!!

Steve


----------



## moyekj

elsteve if you have a small sample .mkv H.264+AC3 file somewhere I can get hold of I can try out some things.


----------



## elsteve

moyekj said:


> elsteve if you have a small sample .mkv H.264+AC3 file somewhere I can get hold of I can try out some things.


cool...I sent you a PM with a link...

thanks


----------



## muerte33

OK,
I had some firewall issues, but I got this working, and I like it!
Is it possible to play Divx or Xvid files yet?
It failed on an AVI file I created with AVI.net, so I guess not.


----------



## moyekj

muerte33 said:


> OK,
> I had some firewall issues, but I got this working, and I like it!
> Is it possible to play Divx or Xvid files yet?
> It failed on an AVI file I created with AVI.net, so I guess not.


This application is streaming only - so will simply send streams to Tivo as is. As documented currently Tivo only supports mpeg4 container decoding of H.264 with AC3 or AAC audio (in addition to mpeg2 of course). So no, Divx/Xvid is not supported. HME/VLC video streamer might be able to have VLC transcode to mpeg2 on the fly, and there's always pyTivo TTCB server that also can transcode.


----------



## acslater

Just downloaded this tonight. It sounds really promising but I can't get it started. After clicking the bat the DOS window comes up but the application freezes after this line:

MDNS: http://192.168.202.1:7288/videostream/

What am I doing wrong?


----------



## moyekj

acslater said:


> Just downloaded this tonight. It sounds really promising but I can't get it started. After clicking the bat the DOS window comes up but the application freezes after this line:
> 
> MDNS: http://192.168.202.1:7288/videostream/
> 
> What am I doing wrong?


 Sounds like it's working fine. Leave that console window running and now you have to go over to your Tivo(s) and go to Music Photos & More and look for "Video Streamer" as shown in this picture:


----------



## moyekj

With the latest announced upcoming Tivo support for Netflix streaming it would seem that VC-1 will now also be supported for streaming since that's the format used by Netflix. I don't believe the current software allows for VC-1 streaming so looks like it will be potentially in the next software update.

By extension, if VC-1 will be supported then perhaps WMV3 (Windows Media Video 9) will also work.


----------



## wmcbrine

Yeah, we've known that capability was in the chip, but it didn't seem to be activated in 9.4. Or else I just didn't find the right incantation...


----------



## moyekj

v0p9 - November 01, 2008
-------------------------
* Status bar times are now updated even when status bar is hidden so that
there is no delay in seeing the correct times when first making it
visible.
* Fixed issue with upper vs. lower case file extension filtering
Now the file extensions are case insensitive.
* tivostream now has it's own Main function instead of using Tivo HME
sample one. The implementation now used is a simplified version with a
lot of overhead removed.
NOTE: The run_win.bat and run_unix.sh scripts have been updated to
use com.hme.tivo.videostream.Main


----------



## Sevenfeet

Excellent. I'll be upgrading in the next day or so.


----------



## moyekj

For those of you having trouble getting tivostream to work on Linux, it looks like ipv6 needs to be disabled for HME apps to work. See the following for reference:
http://www.tivocommunity.com/tivo-vb/showthread.php?p=5640333#post5640333


----------



## Agro

I keep watching threads like this and i'm all for you guys making the TiVo a better product. However...

The Apple TV hacked and using XBox Media Center (XBMC) is so kickass over the top of TiVo (for streaming your content) that I just cant justify using the TiVo for this.

Anyhow, just some 411 to anyone who wants the best of the best, this is the way to go.


----------



## Sevenfeet

Agro said:


> I keep watching threads like this and i'm all for you guys making the TiVo a better product. However...
> 
> The Apple TV hacked and using XBox Media Center (XBMC) is so kickass over the top of TiVo (for streaming your content) that I just cant justify using the TiVo for this.
> 
> Anyhow, just some 411 to anyone who wants the best of the best, this is the way to go.


Do you have a link? The previous times I've looked at XBMC (running on a Mac), the setup process was so awful that it completely undid the pizazz of the interface.

Update...nevermind...found the link to Boxee.


----------



## jay0k

I'm running OS X Leopard.

I start and get the following output:

STARTING tivostream...
LOG: added factory
MDNS: http://192.168.158.1:7288/videostream/

What I'm confused about is the MDNS entry? The IP of my machine running this is 10.0.1.193. The Tivo HD is on the same subnet as well.

Video Stream doesn't show up in the "Music Photos & More" section in Tivo Central.


----------



## moyekj

jay0k said:


> I'm running OS X Leopard.
> 
> I start and get the following output:
> 
> STARTING tivostream...
> LOG: added factory
> MDNS: http://192.168.158.1:7288/videostream/
> 
> What I'm confused about is the MDNS entry? The IP of my machine running this is 10.0.1.193. The Tivo HD is on the same subnet as well.
> 
> Video Stream doesn't show up in the "Music Photos & More" section in Tivo Central.


 I made some changes in last release that may have messed this up. Can you try previous version tivostream_v0p8.zip to see if that's any better?


----------



## windracer

Hmmm ... upgraded to Galleon 2.5.4 last night and now I can't get tivostream to run via the launcher.txt file. Here's the error from the log:



Code:


13:16:47,990 ERROR [WrapperListener_start_runner] AppFactory - java.lang.NoSuchMethodException: com.hme.tivo.videostream.Main.getAppFactory(java.lang.String, java.lang.ClassLoader, com.tivo.hme.interfaces.IArgumentList): make sure the class is public and has a public default constructor
13:16:47,991 DEBUG [WrapperListener_start_runner] AppFactory - java.lang.NoSuchMethodException: com.hme.tivo.videostream.Main.getAppFactory(java.lang.String, java.lang.ClassLoader, com.tivo.hme.interfaces.IArgumentList)
        at java.lang.Class.getMethod(Class.java:1605)
        at org.lnicholls.galleon.app.AppHost.createFactory(AppHost.java:367)
        at org.lnicholls.galleon.app.AppHost.loadLaunchFile(AppHost.java:349)
        at org.lnicholls.galleon.app.AppManager.loadApps(AppManager.java:80)
        at org.lnicholls.galleon.server.Server.start(Server.java:331)
        at org.lnicholls.galleon.server.ServiceWrapper.start(ServiceWrapper.java:47)
        at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)

Am I missing something obvious? I'm using the v0p9 jar.

_update:_ whoops, nevermind ... I had a problem in my launcher.txt file.


----------



## jay0k

moyekj said:


> I made some changes in last release that may have messed this up. Can you try previous version tivostream_v0p8.zip to see if that's any better?


Here is my output with v0p8:

null null (null)
LOG: added factory
MDNS: http://192.168.158.1:7288/videostream/

Am I missing something obvious here? Nothing else is required to make this work?


----------



## windracer

Do you maybe have two network adapters in your Mac, a wired and a wireless? Maybe tivostream is latching onto the wrong one?


----------



## lynncosbm

Here is another question from a newbie to Macs and no experience in Java programming - I would love to be able to get this application to work, it looks like it's just what I'm looking for but when I try to run the run_unix.sh command in Terminal, I just get output "Exception in thread "main" java.lang.NoClassDefFoundError: com/hme/tivo/videostream/Main". Does this mean there is a problem with my Java? It looks like I have Java 1.5.0 on my Mac, can someone please help me figure out what I'm doing wrong?


----------



## moyekj

jay0k said:


> Here is my output with v0p8:
> 
> null null (null)
> LOG: added factory
> MDNS: http://192.168.158.1:7288/videostream/
> 
> Am I missing something obvious here? Nothing else is required to make this work?


 There must be multiple interfaces available and tivostream is not picking up the one you are expecting. Not sure about OS X but in unix you can run following command to check all available interfaces:
ifconfig -a
It's likely that 192.168.158.1 is one of them. Do you have 2 different domains running on your network?


----------



## moyekj

lynncosbm said:


> Here is another question from a newbie to Macs and no experience in Java programming - I would love to be able to get this application to work, it looks like it's just what I'm looking for but when I try to run the run_unix.sh command in Terminal, I just get output "Exception in thread "main" java.lang.NoClassDefFoundError: com/hme/tivo/videostream/Main". Does this mean there is a problem with my Java? It looks like I have Java 1.5.0 on my Mac, can someone please help me figure out what I'm doing wrong?


 Make sure you have tivostream_v0p9.jar file in same directory as the run_unix.sh script (previous versions of tivostream have a different Main so won't work). Also, check your version of java as follows:
java -version
It needs to be 1.5.x or later to work. If you have multiple Java installations on your machine then you may need to replace java with the full path to the appropriate version.


----------



## lynncosbm

moyekj said:


> Make sure you have tivostream_v0p9.jar file in same directory as the run_unix.sh script (previous versions of tivostream have a different Main so won't work). Also, check your version of java as follows:
> java -version
> It needs to be 1.5.x or later to work. If you have multiple Java installations on your machine then you may need to replace java with the full path to the appropriate version.


Thanks for your suggestions. I still have all the files in the same folder which was created when I unzipped the zip file and have just put that in the Applications folder and then just tried to run it from there. Is that incorrect?

When I ran the java -version command, it came up java version "1.5.0_16"
so that seems to be fine, when I replaced java with the full path, I still got the same message.


----------



## jay0k

moyekj said:


> There must be multiple interfaces available and tivostream is not picking up the one you are expecting. Not sure about OS X but in unix you can run following command to check all available interfaces:
> ifconfig -a
> It's likely that 192.168.158.1 is one of them. Do you have 2 different domains running on your network?


I do see that particular IP under the "vmnet1" network interface. The actual interface it should use would be either "en0" (wired) or "en1" (wireless).


----------



## Rdian06

jay0k said:


> I do see that particular IP under the "vmnet1" network interface. The actual interface it should use would be either "en0" (wired) or "en1" (wireless).


vmnet1 probably exists because you have VMware Fusion installed.

For the sake of testing, go into your Network preferences and disable all the vmnet# interfaces temporarily and then try tivostream.


----------



## moyekj

jay0k said:


> I do see that particular IP under the "vmnet1" network interface. The actual interface it should use would be either "en0" (wired) or "en1" (wireless).


 With tivostream_v0p8 you can specify which IP address to use using "--intf IP" option. Using the tivostream_v0p8.jar version edit the "run_unix.sh" script to look like:


Code:


java -cp tivostream_v0p8.jar com.tivo.hme.host.sample.Main --intf 10.0.1.193 com.hme.tivo.videostream.videostream

I got over-zealous in v0p9 and removed a lot of overhead including the above option, so probably will need to add it back in next release.


----------



## westside_guy

jay0k said:


> I do see that particular IP under the "vmnet1" network interface. The actual interface it should use would be either "en0" (wired) or "en1" (wireless).


It's sub-optimal as solutions go, but for the moment you can get it to work properly on the Mac by modifying run_unix.sh as shown below - adding the first and third line, bracketing the single pre-existing line:



Code:


sudo /Library/Application\ Support/VMware\ Fusion/boot.sh --stop
java -cp tivostream_v0p9.jar com.hme.tivo.videostream.Main com.hme.tivo.videostream.videostream
sudo /Library/Application\ Support/VMware\ Fusion/boot.sh --start

This assumes your account is in the /etc/sudoers file, but most people by default are running as an admin and so will be in there already without having to manually add themself. If you're not Unix-savvy, don't try to edit /etc/sudoers yourself!!

To edit the run_unix.sh file, just use TextWrangler or BBEdit.


----------



## Laserfan

moyekj said:


> ...go to Music Photos & More and look for "Video Streamer" as shown in this picture:


Wow, this is a VERY COOL program moyekj, thanks very much for it! :up:

I wonder if you (or anyone here) knows how to tell the Tivo not to bother with all the other servers off the Internet as some are shown in your screenshot. It seems though like you either switch Home Networking On and get all that other junk, or you switch it Off and then can't use tivostream?

I have a limited (satellite) 'net connection and don't care about YouTube & the rest... :down:


----------



## moyekj

Laserfan said:


> Wow, this is a VERY COOL program moyekj, thanks very much for it! :up:
> 
> I wonder if you (or anyone here) knows how to tell the Tivo not to bother with all the other servers off the Internet as some are shown in your screenshot. It seems though like you either switch Home Networking On and get all that other junk, or you switch it Off and then can't use tivostream?
> 
> I have a limited (satellite) 'net connection and don't care about YouTube & the rest... :down:


 Short of perhaps blocking certain domains with a router I don't think it's possible to filter out the other HME applications.


----------



## cmontyburns

lynncosbm said:


> Here is another question from a newbie to Macs and no experience in Java programming - I would love to be able to get this application to work, it looks like it's just what I'm looking for but when I try to run the run_unix.sh command in Terminal, I just get output "Exception in thread "main" java.lang.NoClassDefFoundError: com/hme/tivo/videostream/Main". Does this mean there is a problem with my Java? It looks like I have Java 1.5.0 on my Mac, can someone please help me figure out what I'm doing wrong?


Put the full path to the tivostream jar (Java) file in the run_unix.sh script (you can open it with TextEdit).

So right now it probably says:

java -cp tivostream_v0p9.jar com.hme.tivo.videostream.Main com.hme.tivo.videostream.Main

Instead make it say:

java -cp /Applications/TiVoStream/tivostream_v0p9.jar com.hme.tivo.videostream.Main com.hme.tivo.videostream.videostream

Except instead of "/Applications/TiVoStream/" put the path to where you have the TiVoStream folder stored.


----------



## menos

I'm having problems. I can't seem to get any video over a few minutes to completely stream. The videos are all .mp4s encoded with the kmttg program. This is the corresponding entry in the log.



Code:


21:46:50,796  INFO [Acceptor] AppHost - 192.168.1.50 Life-(Nov-05-2008)-Jackpot.mp4 HTTP GET - to factory /videostream/
21:52:51,515  INFO [MediaRefreshThread] MediaRefreshThread - Refreshing media took 374 seconds
22:01:36,218  INFO [Acceptor] AppHost - 192.168.1.50 I/O Exception handling  HTTP GET Life-(Nov-05-2008)-Jackpot.mp4: Connection reset by peer: socket write error
22:05:25,953  INFO [Acceptor] AppHost - connection to receiver closed
22:05:25,953  INFO [Acceptor] AppHost - HME receiver disconnected

I'm running it through Galleon 2.5.4 but I noticed the problem with previous versions of Galleon.


----------



## moyekj

menos said:


> I'm having problems. I can't seem to get any video over a few minutes to completely stream. The videos are all .mp4s encoded with the kmttg program. This is the corresponding entry in the log.
> 
> 
> 
> Code:
> 
> 
> 21:46:50,796  INFO [Acceptor] AppHost - 192.168.1.50 Life-(Nov-05-2008)-Jackpot.mp4 HTTP GET - to factory /videostream/
> 21:52:51,515  INFO [MediaRefreshThread] MediaRefreshThread - Refreshing media took 374 seconds
> 22:01:36,218  INFO [Acceptor] AppHost - 192.168.1.50 I/O Exception handling  HTTP GET Life-(Nov-05-2008)-Jackpot.mp4: Connection reset by peer: socket write error
> 22:05:25,953  INFO [Acceptor] AppHost - connection to receiver closed
> 22:05:25,953  INFO [Acceptor] AppHost - HME receiver disconnected
> 
> I'm running it through Galleon 2.5.4 but I noticed the problem with previous versions of Galleon.


 It looks like your Tivo(s) are rejecting the streams after several minutes. Do the original mpeg2 files from which these were encoded stream and/or transfer OK to the Tivos? It helps to run them through VRD QuickStream fix if you didn't before encoding to mpeg4. If one of the samples is not too huge PM me if you like so I can give you a location to deposit a sample so I can try it out.

Are you able to get this sample to stream OK all the way through?
systm--0063--dolby--hd.h264.mp4
If that one works OK then that means your setup is OK.


----------



## lynncosbm

cmontyburns said:


> Put the full path to the tivostream jar (Java) file in the run_unix.sh script (you can open it with TextEdit).
> 
> So right now it probably says:
> 
> java -cp tivostream_v0p9.jar com.hme.tivo.videostream.Main com.hme.tivo.videostream.Main
> 
> Instead make it say:
> 
> java -cp /Applications/TiVoStream/tivostream_v0p9.jar com.hme.tivo.videostream.Main com.hme.tivo.videostream.videostream
> 
> Except instead of "/Applications/TiVoStream/" put the path to where you have the TiVoStream folder stored.


Thank you so much! It looks like that did it! I'm excited I got this to work! (in case you can't tell from all the exclamation marks!)


----------



## ninjaFred

moyekj, the streamer rules. very cool.

one request...how hard would it be to install this as a windows service? my kids often close the cmd window and kill the streamer.


----------



## menos

If you have Galleon installed you can set it up to run inside of Galleon. Galleon runs as a service, plus it has a few other cool features. There is a post in this thread showing how to set it up in Galleon.


----------



## ninjaFred

i'm using pyTivo, but not galleon. i'll check into it. thanks for the response.


----------



## jay0k

moyekj said:


> There must be multiple interfaces available and tivostream is not picking up the one you are expecting. Not sure about OS X but in unix you can run following command to check all available interfaces:
> ifconfig -a
> It's likely that 192.168.158.1 is one of them. Do you have 2 different domains running on your network?


I uninstalled VMWare Fusion as I use Parallels now and all is well. It properly detected the correct network interface and all is well. it works like a champ, good work!

Thanks!


----------



## jay0k

ninjaFred said:


> moyekj, the streamer rules. very cool.
> 
> one request...how hard would it be to install this as a windows service? my kids often close the cmd window and kill the streamer.


Hehe, and as a service for OSX that would show up in the Preference pane


----------



## menos

moyekj said:


> It looks like your Tivo(s) are rejecting the streams after several minutes. Do the original mpeg2 files from which these were encoded stream and/or transfer OK to the Tivos? It helps to run them through VRD QuickStream fix if you didn't before encoding to mpeg4. If one of the samples is not too huge PM me if you like so I can give you a location to deposit a sample so I can try it out.
> 
> Are you able to get this sample to stream OK all the way through?
> systm--0063--dolby--hd.h264.mp4
> If that one works OK then that means your setup is OK.


The test file you provided streams just fine. I'll try one of the .mpg files here in a little while but I'll have to download it again from the tivo. All of the files I'm reencoding have been run through VRD quickstream fix, as part of the kmtgg job.
Is there anyway to check the integrity of a .mp4? Tivostream seems to be dieing on the files, but pytivo doesn't seem to have a problem.

If you've got somewhere I can upload 3gig I'll send you one of the files thats crapping out on me.


----------



## moyekj

menos said:


> The test file you provided streams just fine. I'll try one of the .mpg files here in a little while but I'll have to download it again from the tivo. All of the files I'm reencoding have been run through VRD quickstream fix, as part of the kmtgg job.
> Is there anyway to check the integrity of a .mp4? Tivostream seems to be dieing on the files, but pytivo doesn't seem to have a problem.
> 
> If you've got somewhere I can upload 3gig I'll send you one of the files thats crapping out on me.


 3 GB is a little too big to deal with. Since you know about where it is crapping out perhaps you can use VRD to edit out everything but shortly before and after the point it craps out and then send me the resulting mpeg2 clip? If resulting mpeg2 is below 1GB then I can work with that so please PM me and I can give you an upload location (ftp).
EDIT: Of course it's possible that after editing the file as such and re-encoding to mpeg4 that it will work fine, but it's worth a shot.


----------



## Laserfan

I installed & ran v0p9 over the weekend and my test mpg streamed & looked great from both my S3 Tivos. Then yesterday I tried it again and it doesn't work anymore:
1. Tivostream appears as usual on the menu
2. My mpg appears there as well
3. When I select the mpg, I get the black screen & "Playing..." displayed
4. But it never goes further, it's just hung

To this point, the tivostream window has shown this:



Code:


C:\tivostream>java -cp tivostream_v0p9.jar com.hme.tivo.videostream.Main com.hme
.tivo.videostream.videostream
STARTING tivostream...
LOG: added factory
MDNS: http://192.168.1.108:7288/videostream/
LOG: 192.168.1.109 icon.png HTTP GET - to factory /videostream/
>> Reading config file: config.ini
>>config: topdir=.
>>config: extensions=.mpg .mpeg2 .mp2 .mp4 .mpeg4
>>config: font=medium
>>config: timeout_status_bar=5
>>config: timeout_info=10
>>config: skip_back=8
>>config: skip_forwards=30
>>config: slow_speed=0.125
>> NOTE: No bookmark file found
LOG: HME receiver connected
LOG: unknown event opcode : 8

Now, if I let the Tivo sit on this "Playing..." screen it eventually times-out (5mins feels right) and returns to LiveTV. If I'm stuck on the "Playing..." screen and I left-arrow then the Tivo displays "Can't Run -- An error occurred while running the application. The application closed during a read (0x50006)."

Under both scenarios (timeout and user impatience) the tivostream window adds the following:



Code:


LOG: HME receiver disconnected
LOG: Unexpected error: java.lang.NullPointerException
LOG: 192.168.1.109 icon.png HTTP GET - to factory /videostream/

My sense is that these latter msgs are not telling me anything i.e. they don't happen until the hung "Playing..." is aborted. Is there an extended logging mode I can invoke to try to learn more?

I reinstalled tivostream and even reinstalled Java to no help. Can't imagine what might have happened as I say that very mpg played fine the other day--heck I watched most of it tho I was only really testing tivostream! 

p.s. Both my Tivos played this mpg before via tivostream (from the same computer). Both have the problem now.


----------



## moyekj

Laserfan, the console window should show something like the following when starting a stream:


Code:


LOG: 192.168.1.107 lost.mpg HTTP GET - to factory /videostream/
url=file:/c:/home/dvd/testing/lost.mpg

To get a lot of debugging information edit the run_win.bat script and add the following as 1st line:


Code:


set DEBUG=1

How are you starting mpg playback? Select, right arrow, or play button? The play button will try and start from where you left off while select/right arrow will start from beginning, so they are different which is why I ask.


----------



## Laserfan

moyekj said:


> How are you starting mpg playback? Select, right arrow, or play button?


I tried it both ways. Not getting the "URL" msg, must have some glitch in my network?



Code:


C:\tivostream_v0p9>set DEBUG=1

C:\tivostream_v0p9>java -cp tivostream_v0p9.jar com.hme.tivo.videostream.Main co
m.hme.tivo.videostream.videostream
STARTING tivostream...
LOG: added factory
MDNS: http://192.168.1.108:7288/videostream/
LOG: 192.168.1.109 icon.png HTTP GET - to factory /videostream/
>> Reading config file: config.ini
>>config: topdir=.
>>config: extensions=.mpg .mpeg2 .mp2 .mp4 .mpeg4
>>config: font=medium
>>config: timeout_status_bar=5
>>config: timeout_info=10
>>config: skip_back=8
>>config: skip_forwards=30
>>config: slow_speed=0.125
>> Reading bookmarks file: bookmarks
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=C:\t
ivostream_v0p9
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2089,
focusable,bounds=0,0,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=C:\tivost
ream_v0p9
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2089,focusable,bounds=0,0,512x30] v2=null
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Top Level

>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: HME receiver connected
>>>Listener.java: com.hme.tivo.videostream.Listener.readEvents(line 315): app=vi
deostream[#1,uri=null] [email protected]
15fea60
>>>HostContext.java: com.hme.tivo.videostream.HostContext.getLogger(line 91):
LOG: unknown event opcode : 8
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=6 rawcode=16778246
>>>videostream.java: com.hme.tivo.videostream.videostream.handleAction(line 92):
 action=push
>>>videostream.java: com.hme.tivo.videostream.videostream.makeFileName(line 87):
 name=C:\tivostream_v0p9
>>>videostream.java: com.hme.tivo.videostream.videostream.lastEntryPush(line 197
): name=C:\tivostream_v0p9
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.updateFileList(lin
e 71): DIR=C:\tivostream_v0p9
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=DIR: C:\t
ivostream_v0p9
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.clear(line 39):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=null v2=BView[#-1,focusable,bounds=0,0,512x30]
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.getSortedByName(li
ne 144): DIR=C:\tivostream_v0p9 files=[Ljava.lang.String;@911f71
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream_v0p9 name=Gattaca.mp4
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream_v0p9 name=India Arie - Purify Me.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream_v0p9 name=The Fugitive -- This'll Kill You.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream_v0p9 name=video1.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2118,focusable,bounds=0,0,512x30] index=0
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Gatt
aca.mp4
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2118,
focusable,bounds=0,0,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Gattaca.m
p4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2124,focusable,bounds=0,30,512x30] index=1
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Indi
a Arie - Purify Me.mpg
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2124,
focusable,bounds=0,30,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=India Ari
e - Purify Me.mpg
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2130,focusable,bounds=0,60,512x30] index=2
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=The
Fugitive -- This'll Kill You.mpg
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2130,
focusable,bounds=0,60,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=The Fugit
ive -- This'll Kill You.mpg
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2136,focusable,bounds=0,90,512x30] index=3
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=vide
o1.mp4
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2136,
focusable,bounds=0,90,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=video1.mp
4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2118,focusable,bounds=0,0,512x30] v2=null
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=3 rawcode=16777475
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=BView[#2124,focusable,bounds=0,30,512x30] v2=BView[#2118,focusable,
bounds=0,0,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2124,focusable,bounds=0,30,512x30] v2=BView[#2118,focusable,b
ounds=0,0,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=3 rawcode=16777475
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=BView[#2130,focusable,bounds=0,60,512x30] v2=BView[#2124,focusable,
bounds=0,30,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2130,focusable,bounds=0,60,512x30] v2=BView[#2124,focusable,b
ounds=0,30,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=6 rawcode=16778246
>>>videostream.java: com.hme.tivo.videostream.videostream.handleAction(line 92):
 action=push
>>>videostream.java: com.hme.tivo.videostream.videostream.makeFileName(line 87):
 name=The Fugitive -- This'll Kill You.mpg
>>>videostream.java: com.hme.tivo.videostream.videostream.lastEntryPush(line 197
): name=The Fugitive -- This'll Kill You.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=The
Fugitive -- This'll Kill You.mpg
>>>HostContext.java: com.hme.tivo.videostream.HostContext.getBaseURI(line 153):

>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.startStream(line 52): UR
I=http://192.168.1.108:7288/videostream/The Fugitive -- This'll Kill You.mpg fil
eName=The Fugitive -- This'll Kill You.mpg
>>>MetaData.java: com.hme.tivo.videostream.MetaData.<init>(line 17): fileName=C:
\tivostream_v0p9\The Fugitive -- This'll Kill You.mpg
>>>MetaData.java: com.hme.tivo.videostream.MetaData.parseMetaData(line 25): file
=C:\tivostream_v0p9\The Fugitive -- This'll Kill You.mpg.txt
>>>MetaData.java: com.hme.tivo.videostream.MetaData.exists(line 106):
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2112,
bounds=0,0,640x480] x=32 y=24 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=The Fugit
ive -- This'll Kill You.mpg
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2112,
bounds=0,0,640x480] x=32 y=420 h_multiplier=1 type=
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2112,
bounds=0,0,640x480] x=32 y=320 h_multiplier=6 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=258
>>>VText.java: com.hme.tivo.videostream.VText.setColor(line 61): object=java.awt
.Color[r=255,g=0,b=0]
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2111,
bounds=0,0,640x480] x=32 y=240 h_multiplier=2 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=258
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Starting
The Fugitive -- This'll Kill You.mpg ...

No firewalls anywhere in it. Will keep looking unless you have another idea!?


----------



## chlorox

Rdian06 said:


> If I'm reading this right, the only h264 video that works is in an MP4 container (MOV wrapper). From what I understand of the MP4 container, the only 5.1 audio it can contain according to spec is AAC 5.1. You can force AC3 5.1 (aka Dolby Digital) into the container (ala -acodec copy), but that violates spec.
> 
> So to remain within spec for MP4, you would need to convert the AC3 5.1 to AAC 5.1. To get ffmpeg to do that, your ffmpeg has to be compiled with libfaac support. ffmpeg itself doesn't have a native AAC encoder currently (it's in development, an initial AAC decoder was recently added to ffmpeg trunk), hence the need for the library.
> 
> However, even if you create an mp4 file with h264 video and AAC 5.1 audio and the Tivo will play it with tivostream, no one knows what will happen with the audio. If the Tivo just bitstreams the AAC 5.1 signal to your receiver, then chances are your receiver doesn't support AAC 5.1 and won't know what to do with the signal. If you happen to have an AAC 5.1 capable receiver, it just might work.
> 
> In my case, my receiver can't handle AAC 5.1 so I would have to hope that Tivo wrote a AAC 5.1 decoder and then set the Tivo unit to decode it to PCM and pass that out to my receiver. If they did that then maybe I could get 5.1 audio.
> 
> Has anyone tried playing an EVO or an Mpeg2 TS file with tivostream? Both those support h264 video and AC3 5.1 audio.


an m4v file is an MP4 file with AC3 5.1.... (same exact thing but it's allowed to have AC3)


----------



## moyekj

Laserfan, from your logs it looks like tivostream is not reaching the point where it sends the stream to the Tivo(s) for some reason, but there's no Java exception being generated either so it doesn't appear to be crashing.
Perhaps the file naming is causing an issue somewhere (due to a tivostream bug). Try renaming the file to a very simple name without special characters or spaces just to see if that gets any further...


----------



## Laserfan

moyekj said:


> ...there's no Java exception being generated either so it doesn't appear to be crashing.
> 
> Try renaming the file to a very simple name...


Changed the file to Fugitive.mpg and got rid of the others, some of which were attempts to mux .264 files but which failed miserably (thought maybe getting them out of there was prudent). Anyway, same thing.

About Java, when tivostream worked for me I was running 1.5.0.11. Then it stopped working and I un-installed and re-installed to no effect. So I un-installed again and from the initial trouble post(s) above have been running:

C:\>java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

I should ask--is this build OK? Should I go back to 1.5.0.11 (which I think is the last of the 1.5 versions). I at least want to start-over troubleshooting this with the right version of Java that you'd recommend.

I'm maniacal to get this working again, and then next to figure-out how to properly do 264s for my Tivos. Thanks for paying attention here! Appreciated!!!


----------



## moyekj

Laserfan said:


> Changed the file to Fugitive.mpg and got rid of the others, some of which were attempts to mux .264 files but which failed miserably (thought maybe getting them out of there was prudent). Anyway, same thing.
> 
> About Java, when tivostream worked for me I was running 1.5.0.11. Then it stopped working and I un-installed and re-installed to no effect. So I un-installed again and from the initial trouble post(s) above have been running:
> 
> C:\>java -version
> java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
> 
> I should ask--is this build OK? Should I go back to 1.5.0.11 (which I think is the last of the 1.5 versions). I at least want to start-over troubleshooting this with the right version of Java that you'd recommend.
> 
> I'm maniacal to get this working again, and then next to figure-out how to properly do 264s for my Tivos. Thanks for paying attention here! Appreciated!!!


That version of Java matches exactly what I am running on Windows so should work fine. As I said your problem seems rather unique as the application is not crashing but it's not getting to the point where it sends the stream either so something is going wrong.
Perhaps try out tivostream_v0p8 and see if you have same issue there? (There may be extra log commands showing in that version that may help pinpoint the problem further).
EDIT: Another thing to try is reboot your Tivo(s) to see if that makes a difference (I doubt it but worth a shot).


----------



## Laserfan

moyekj said:


> EDIT: Another thing to try is reboot your Tivo(s) to see if that makes a difference (I doubt it but worth a shot).


Kevin, I'd tried running tivostream on 2 other computers, turned-off Home Media on one of my Tivos, physically DISCONNECTED a Tivo from my network, messed with router settings, and disconnected other equipment.

I had not tried rebooting a Tivo, but your idea made sense to me, as I recalled that my Popcorn Hour media player needed re-boot when one tried to play the wrong kind of file on it. I had certainly done that with a couple of my attempts at 264 playback.

Well, rebooting worked! Holy bleep! I will sleep tonight, many thanks for that! :up:

It's gonna make finding a muxer that makes tivostream-friendly 264s very difficult, but at least my hours of troubleshooting this problem are over. Jeez, a TiVo reboot, how simple can you get... 

Thanks again!


----------



## moyekj

Laserfan said:


> Kevin, I'd tried running tivostream on 2 other computers, turned-off Home Media on one of my Tivos, physically DISCONNECTED a Tivo from my network, messed with router settings, and disconnected other equipment.
> 
> I had not tried rebooting a Tivo, but your idea made sense to me, as I recalled that my Popcorn Hour media player needed re-boot when one tried to play the wrong kind of file on it. I had certainly done that with a couple of my attempts at 264 playback.
> 
> Well, rebooting worked! Holy bleep! I will sleep tonight, many thanks for that! :up:
> 
> It's gonna make finding a muxer that makes tivostream-friendly 264s very difficult, but at least my hours of troubleshooting this problem are over. Jeez, a TiVo reboot, how simple can you get...
> 
> Thanks again!


 I guess I should know better and always make a reboot my 1st suggestion.  Anyway glad it's working now.
As far as encoding H.264 if you use "kmttg" there are 2 encoding profiles called "tivostream_sd" and "tivostream_hd" which use ffmpeg to create files that will stream to Tivos (it automatically runs the encodings through qt-faststart after ffmpeg). If you don't want to install kmttg then you can use ffmpeg & qt-faststart directly to do it (I can post the exact ffmpeg commands necessary), but having a GUI makes things easier. For SD files it's best to leave them as mpeg2. H.264 format is handy for HD files as it cuts down the bandwidth needed to stream them and keep up with real time playback.


----------



## Laserfan

moyekj said:


> I guess I should know better and always make a reboot my 1st suggestion.


In my own defense neither of my Tivos showed any hint of instability, and in 8+ years of owning Tivo I've had to reboot only a couple of times so I just never think about it!

Re: encoding 264 for Tivo, as I indicated I already have a Popcorn Hour that plays everything I throw at it, but it sure would be nice, for the room I have (only) an HDTV and TivoHD in (not the PCH), if I could re-mux & play Blu-ray discs, both comm'l and homebrew. In particular I like to re-encode HDTV to BD because it's the most efficient way to back-up such programs in full HD glory, and cost-effective too (DVD-5/9).

I need either to figure out how to demux & remux .m2ts files to mp4, or I suppose the alternative might be to start by re-encoding for tivostream mp4, then trying to convert those to BD-compliant (without re-encoding which takes days for me). But I don't know anything about mp4 containers.

P.S. Altho I'm not going to use it this way, I discovered tonight that tivostream works on my 450MHz P3 from, what, 1998? Streaming SD that is. Still, pretty amazing stuff.


----------



## menos

moyekj said:


> 3 GB is a little too big to deal with. Since you know about where it is crapping out perhaps you can use VRD to edit out everything but shortly before and after the point it craps out and then send me the resulting mpeg2 clip? If resulting mpeg2 is below 1GB then I can work with that so please PM me and I can give you an upload location (ftp).
> EDIT: Of course it's possible that after editing the file as such and re-encoding to mpeg4 that it will work fine, but it's worth a shot.


Initial results are that the .mpg streams fine though way, way slower . I've tried cutting a chunk of the video out of the .mp4 and the .mpg +-3 minutes around the failure timecode, but the shorter samples stream fine.

Both of the files I've worked today have had the problem. One died after 21:16 and the other died at 20:50. Coincidence?

Like the last attempt this is the entry in the log


Code:


21:17:49,234  INFO [Acceptor] AppHost - 192.168.1.50 I/O Exception handling  HTTP GET Terminator The Sarah Connor Chronicles-(Nov-17-2008)-Complications.mp4: Connection reset by peer: socket write error

I guess it's funny but that is the same error you get if you just hit the left arrow and leave the stream. It's like the tivo is killing the stream for some reason.


----------



## menos

The plot thickens. Both of the problem children videos have the exact same problem and die in the exact same place when using wcmbrine's hme/vlc streamer. I guess I need some way of verifying the .mp4 file doesn't have any errors. 

They play fine in vlc, though quicktime errors when I try and play them through it (should they play through quicktime?).


----------



## moyekj

menos said:


> The plot thickens. Both of the problem children videos have the exact same problem and die in the exact same place when using wcmbrine's hme/vlc streamer. I guess I need some way of verifying the .mp4 file doesn't have any errors.
> 
> They play fine in vlc, though quicktime errors when I try and play them through it (should they play through quicktime?).


 That's good information that the hme/vlc streamer also fails which points the finger at some .mp4 incompatibility for Tivo. Which encoding profile did you use? If you used tivostream_hd try using tivostream_sd instead to see if that works.


----------



## Laserfan

Sevenfeet said:


> One minor update... 2 mbits/sec for 1080p is a pretty lousy bit rate, even for upscaled standard def. It looks ok on a standard def TV (32") but it's pretty lousy to my eyes on the 1080i RPTV I have. Compare that to 10 mbits/sec for a Wall-E trailer I have from Pixar (also 1080p). Broadcast HDTV (which is Mpeg-2) is anywhere from 12-19 mbits/sec or 1080i.
> 
> I'll try some better rates and see what looks good to the eye.


I've made a 1080p .mp4 that plays beautifully (a little over 5Mbps) using MP4Muxer which is a GUI front-end to MP4Creator. It now includes AC3 support, but my first effort results in no sound out of Tivo. Maybe it doesn't like the 640Kbps audio track bitrate--I will try 448 instead to check.

EDIT: Turns out 640Kbps AC3 is OK; I think I just de-selected the "Interleaving" checkbox in MP4Muxer. And the total bitrate is 6600Kbps--I will try to find the upper range of 1080p bitrate the TiVo will handle. This is very exciting stuff!


----------



## westside_guy

I'm having a small problem with tivostream and certain mp4 files. I've got a few H.264 / AAC mp4 files that are widescreen 640x360 (they're TV shows we purchased from iTunes maybe a year ago, but recently ran through Requiem so we could play them on the TV rather than our computer). If I use tivostream to stream and watch them (to a Tivo HD feeding a 16:9 Sony Bravia TV), they are displayed as if they have a 4:3 aspect ratio rather than 16:9 - but if I transfer them to the Tivo using pytivo instead, they display correctly.

I don't have very many digital videos to use for comparison; but this aspect ratio problem seems to only effect these particular shows - other files appear to display using the correct aspect ratio. However I don't have any other iTunes-purchased television shows to use for comparison - I don't have any other videos that are 640x360 actually.


Any ideas how I can rectify this? Thank you!


----------



## moyekj

westside_guy said:


> I'm having a small problem with tivostream and certain mp4 files. I've got a few H.264 / AAC mp4 files that are widescreen 640x360 (they're TV shows we purchased from iTunes maybe a year ago, but recently ran through Requiem so we could play them on the TV rather than our computer). If I use tivostream to stream and watch them (to a Tivo HD feeding a 16:9 Sony Bravia TV), they are displayed as if they have a 4:3 aspect ratio rather than 16:9 - but if I transfer them to the Tivo using pytivo instead, they display correctly.
> 
> I don't have very many digital videos to use for comparison; but this aspect ratio problem seems to only effect these particular shows - other files appear to display using the correct aspect ratio. However I don't have any other iTunes-purchased television shows to use for comparison - I don't have any other videos that are 640x360 actually.
> 
> Any ideas how I can rectify this? Thank you!


 There's probably not a 16:9 flag defined in those videos so Tivo is assuming 4:3. There's probably not an easy way to fix it other than stretching the picture horizontally which if you use Native output mode you may be able to do with TV settings, or if you use some fixed output mode on Tivo then choose "Full" under Aspect Correction Mode. Note, aspect ratio button doesn't work inside tivostream playback so you need to set it externally before starting tivostream if you go that route.


----------



## menos

moyekj said:


> That's good information that the hme/vlc streamer also fails which points the finger at some .mp4 incompatibility for Tivo. Which encoding profile did you use? If you used tivostream_hd try using tivostream_sd instead to see if that works.


Update: The exact same .mpg that was encoded to the tivostream_hd profile and failed was encoded to the tivostream_sd profile and streamed correctly.

Isn't the only difference between the two the bitrate?


----------



## moyekj

menos said:


> Update: The exact same .mpg that was encoded to the tivostream_hd profile and failed was encoded to the tivostream_sd profile and streamed correctly.
> 
> Isn't the only difference between the two the bitrate?


 Yes, bitrate is only difference. _hd is 8000k and _sd is 2000k. Perhaps editing the _hd profile and backing down to 6000k will solve the problem and still be a good encode (the file to edit is tivo_mp4_encode.pl).


----------



## Laserfan

Does anyone here have a TivoHD with the new update (11.0.P3 I think) and is tivostream working? My S3 w/9.4 sees my tivostream server but not the TivoHD (yes I rebooted it ).


----------



## BiggieSmalls

This App ROCKS! Is it possible to have multiple instances of this app running on various machines throughout the network?

I suppose each stream server would need to be named differently so there aren't duplicate "Video Streamer" apps listed on the Tivo.


----------



## moyekj

BiggieSmalls said:


> This App ROCKS! Is it possible to have multiple instances of this app running on various machines throughout the network?
> 
> I suppose each stream server would need to be named differently so there aren't duplicate "Video Streamer" apps listed on the Tivo.


 Yes you can run multiple instances on different machines. I believe when you have more than 1 of same name the second will be called "Video Streamer [1]", the third "Video Streamer [2]", etc.

NOTE: I know it's not what you are asking, but while technically one instance of this app running on one computer can serve multiple Tivos at once I didn't write the app with that in mind, so while it's possible to start multiple shows playing back from 1 server I don't believe you can exit out of playback mode properly once you do that (the app crashes I believe). It should be possible to fix things so that serving more than 1 Tivo at a time works properly - perhaps a future enhancement if the need is there.


----------



## Emillion

1. Posted this on the pyTivo thread but it is common to tivostream and Tivo Desktop too, on a TiVo HD, 9.4. Wondering if this is a known issue and would appreciate any suggestions for a fix... It would apply to any DVD saved as .vob, renamed as .mpg and then tivostreamed.

... most of the 16x9 DVD vob files still show bars on top/bottom on a 16:9 display... they are MPEG2/AC3 files ... looks like a TiVo problem? No matter what TiVo settings I try - the bars are still there. However I have found DVD-vob files that don't show the bars and the only difference between the files looks to be the "player telecine" 3:2 pulldown. The files "with bars" show 23.976 pics/s but with 3:2 pulldown still 29.97 frames/s (NTSC), 720x480, sar 3:2, par 32:27, dar 16:9. The files that play full 16:9 screen are the same except they have 29.97 pics/s and don't require 3:2 pulldown.

2. Any way to fix the "vob rename to mpg" issue the same way you tricked the lower-upper case for extensions? Would be nice not to have to rename the vob files; and internaly they still are DVD-vob files even when renamed as mpgs so that TiVo could play them...

3. Is the "go back to live TV" after five minutes fixed in the new 0.9 tivostream version?

Thank you


----------



## moyekj

Emillion said:


> 1. Posted this on the pyTivo thread but it is common to tivostream and Tivo Desktop too, on a TiVo HD, 9.4. Wondering if this is a known issue and would appreciate any suggestions for a fix... It would apply to any DVD saved as .vob, renamed as .mpg and then tivostreamed.
> 
> ... most of the 16x9 DVD vob files still show bars on top/bottom on a 16:9 display... they are MPEG2/AC3 files ... looks like a TiVo problem? No matter what TiVo settings I try - the bars are still there. However I have found DVD-vob files that don't show the bars and the only difference between the files looks to be the "player telecine" 3:2 pulldown. The files "with bars" show 23.976 pics/s but with 3:2 pulldown still 29.97 frames/s (NTSC), 720x480, sar 3:2, par 32:27, dar 16:9. The files that play full 16:9 screen are the same except they have 29.97 pics/s and don't require 3:2 pulldown.
> 
> 2. Any way to fix the "vob rename to mpg" issue the same way you tricked the lower-upper case for extensions? Would be nice not to have to rename the vob files; and internaly they still are DVD-vob files even when renamed as mpgs so that TiVo could play them...
> 
> 3. Is the "go back to live TV" after five minutes fixed in the new 0.9 tivostream version?
> 
> Thank you


1. I don't think there's anything that can be done in tivostream to deal with that. The streams are being thrown at Tivo as is and it's deciding aspect ratio to display. I have seen several cases of YouTube playback where the aspect ratio is not right either. So short of possibly adding flags to the mpeg stream itself I'm not sure what can be done.

2. Tivo rejects files with .vob extension last I checked, so while you can add .vob as an extension in tivostream to make the files visible in browse mode I don't think Tivo will accept them. There is a way to pass a mime type to Tivo HME streams but I think it basically ignores that and tries to use file extension to determine file type. I'll have to experiment some more with mime type but I think I tried that before and didn't get far.

3. Timeout to live TV during video playback was fixed several releases ago (v0p3 in August). If you are talking about timeout while in browser mode with no activity then that is still there (intentionally).


----------



## Emillion

moyekj said:


> 1. I don't think there's anything that can be done in tivostream to deal with that. The streams are being thrown at Tivo as is and it's deciding aspect ratio to display. I have seen several cases of YouTube playback where the aspect ratio is not right either. So short of possibly adding flags to the mpeg stream itself I'm not sure what can be done.
> 
> 2. Tivo rejects files with .vob extension last I checked, so while you can add .vob as an extension in tivostream to make the files visible in browse mode I don't think Tivo will accept them. There is a way to pass a mime type to Tivo HME streams but I think it basically ignores that and tries to use file extension to determine file type. I'll have to experiment some more with mime type but I think I tried that before and didn't get far.
> 
> 3. Timeout to live TV during video playback was fixed several releases ago (v0p3 in August). If you are talking about timeout while in browser mode with no activity then that is still there (intentionally).


Thank you for your prompt reply,
1. That's what I thought with tivostream - unless there is a flag for 3:2 player telecine...
2. Tx for looking into it - it would be a plus for tivostream. BTW - with pyTivo vob files transfer and play - why? is this an indication it could be done?
3. Just great!

wmcbrine mentioned HME based apps could "play folders" theoretically - any thoughts on tivostream being able to stream an entire folder of music videos, in random order, for example?


----------



## moyekj

Emillion said:


> Thank you for your prompt reply,
> 1. That's what I thought with tivostream - unless there is a flag for 3:2 player telecine...
> 2. Tx for looking into it - it would be a plus for tivostream. BTW - with pyTivo vob files transfer and play - why? is this an indication it could be done?
> 3. Just great!
> 
> wmcbrine mentioned HME based apps could "play folders" theoretically - any thoughts on tivostream being able to stream an entire folder of music videos, in random order, for example?


Regarding vob files: pyTivo is HMO protocol not HME so different animal.

Regarding "play folder" option: it's probably doable in theory. In practice I foresee the hardest issue would be to correctly identify when a stream has completed playback to know when to stop the stream and start the next one. From what I recall it's pretty hard right now to distinguish between catching up with the end of buffer and reaching end of file. As a result the behavior in tivostream right now is it will pause the stream in either case. There probably are other ways to determine when end of file is reached but it's not trivial by any means. A good suggestion for future enhancements. If you want to get your hands dirty the source code is there  (I think source code in Google project is up to v0p8 and I need to check in v0p9).


----------



## wmcbrine

moyekj said:


> There is a way to pass a mime type to Tivo HME streams but I think it basically ignores that and tries to use file extension to determine file type.


No, it doesn't. The MIME type overrides the extension if you specify it. Only if there's no MIME type does the TiVo check the extension. I use the MIME type in HME/VLC for VLC-encoded streams; it works fine.

Note that the MIME type reported by the http headers _is_ ignored, but the one specified when creating the Stream works. It looks like this in HME/VLC:



Code:


self.stream = hme.Stream(self.app, 'http://&#37;s:%d/' %
                         (host, vlc.SERVER), 'video/mpeg')

because they're encoded to MPEG-1 (it also works for MPEG-2); for h.264, it would be "video/mp4". I haven't found any other working values, although I suspect "video/x-ms-wmv" may start working in 11.0.


----------



## TivoMactopia

Are there any options to bind to a specific interface IP address as we had in .8? I can't get this app to bind to the correct IP (Mac OS X)


----------



## moyekj

TivoMactopia said:


> Are there any options to bind to a specific interface IP address as we had in .8? I can't get this app to bind to the correct IP (Mac OS X)


In .9 I was over-zealous in trying to clean up Tivo's sample Main and stripped out all arguments except --port. For current development version I've already added it back in (along with some other changes), but for now just stick with .8. The only big change from .8 to .9 was making file extensions case insensitive, so if you can live with that issue then .8 should be good enough for now until next release.


----------



## moyekj

wmcbrine said:


> No, it doesn't. The MIME type overrides the extension if you specify it. Only if there's no MIME type does the TiVo check the extension. I use the MIME type in HME/VLC for VLC-encoded streams; it works fine.
> 
> Note that the MIME type reported by the http headers _is_ ignored, but the one specified when creating the Stream works. It looks like this in HME/VLC:
> 
> 
> 
> Code:
> 
> 
> self.stream = hme.Stream(self.app, 'http://%s:%d/' %
> (host, vlc.SERVER), 'video/mpeg')
> 
> because they're encoded to MPEG-1 (it also works for MPEG-2); for h.264, it would be "video/mp4". I haven't found any other working values, although I suspect "video/x-ms-wmv" may start working in 11.0.


That's great information, thanks for confirming. If that's the case I should be able to get .vob extension working then, though Java HME is a lot more convoluted than your nice Python implementation.
BTW, how do you know that the mime type for wmv files is "video/x-ms-wmv"?


----------



## wmcbrine

moyekj said:


> BTW, how do you know that the mime type for wmv files is "video/x-ms-wmv"?


I typed "wmv mime" in the search thingie.


----------



## Laserfan

No one here w/rev 11? Tivostream's broke!? 



Laserfan said:


> Does anyone here have a TivoHD with the new update (11.0.P3 I think) and is tivostream working? My S3 w/9.4 sees my tivostream server but not the TivoHD (yes I rebooted it ).


----------



## scronin

I've been looking all over trying over google and this thread trying to determine how to simply launch tivostream via galleon. I'd really like tivostream to always be running, and be in the background as a service on my always on desktop pc. What do I need to do to make this happen? what should my launch.txt file look like? Is there a way to makek tivostream launch as a service in windows vista other than via galleon, or can it be accomplished in another manner? I appreciate your help. I'm just not as techie, as you guys, and I must say i'm EXTREMELY impressed with the capability of both tivostream!!
Steve


----------



## moyekj

scronin said:


> I've been looking all over trying over google and this thread trying to determine how to simply launch tivostream via galleon. I'd really like tivostream to always be running, and be in the background as a service on my always on desktop pc. What do I need to do to make this happen? what should my launch.txt file look like? Is there a way to makek tivostream launch as a service in windows vista other than via galleon, or can it be accomplished in another manner? I appreciate your help. I'm just not as techie, as you guys, and I must say i'm EXTREMELY impressed with the capability of both tivostream!!
> Steve


 I don't use Galleon but the steps were outlined earlier in this thread:
http://www.tivocommunity.com/tivo-vb/showthread.php?p=6690062#post6690062


----------



## moyekj

Laserfan said:


> No one here w/rev 11? Tivostream's broke!?


 Don't have it yet, but it's hard to imagine it wouldn't at least show up under Music, Photos & More. My guess is in current state no other non-Tivo HME app will show up either so the Tivo is not getting the MDNS (Bonjour) broadcasts. Are Tivo's HME apps such as YouTube, Swivel Search, etc. working at least?
Another Tivo reboot probably can't hurt either if you haven't tried that already.


----------



## Laserfan

moyekj said:


> Don't have it yet, but it's hard to imagine it wouldn't at least show up under Music, Photos & More. My guess is in current state no other non-Tivo HME app will show up either so the Tivo is not getting the MDNS (Bonjour) broadcasts. Are Tivo's HME apps such as YouTube, Swivel Search, etc. working at least?


Works w/my 9.4 S3, not with my v11 TivoHD of several days.

In the new Video on Demand and YouTube menu I'm still "opted-out" so I get nothing there but a screen inviting me to change preferences. On the new Music, Photos, & Showcases menu I still get everything that was there before (in addition to Showcases as No. 1 on the list) including Rhapsody, YouTube (!), Live365, Wordsmith, etc. but no Video Streamer. The other entries work fine still. BTW I disabled Home Networking and re-enabled, still no worky.

Surprised I guess that somehow I scored v11 and no one else here has yet? And dunno either why my 9.4 machine hasn't been "upgraded"--you'd think TiVo would try to update all the machines a family might have, so we wouldn't have to deal with different UIs... :down:


----------



## RaGINaR

Alrighty, finally have some free time to try this application out. I made some copies of DVDs that I own and ripped them using Handbrake to an "Ipod hi-res" picture. Then I used the python version of qt-faststart to move the headers to where they need to be. The file seems to start streaming, however it doesn't have any video. I get a prompt at the bottom that looks like a time thing (0:00 on the left and right). 

I was pretty stoked to not get the 0xFFFF thing anymore. Any ideas on what I'm doing wrong? Do I need to re-encode?

Thanks,
Chris


----------



## moyekj

moyekj said:


> That's great information, thanks for confirming. If that's the case I should be able to get .vob extension working then...


 I defined proper mime type for files with .vob extension and now they play fine with tivostream in development version.


----------



## westside_guy

Laserfan said:


> Surprised I guess that somehow I scored v11 and no one else here has yet? And dunno either why my 9.4 machine hasn't been "upgraded"--you'd think TiVo would try to update all the machines a family might have, so we wouldn't have to deal with different UIs... :down:


My Series 2 got its "Fall update" a couple days ago; but my Tivo HD just got it this evening.


----------



## moyekj

RaGINaR said:


> Alrighty, finally have some free time to try this application out. I made some copies of DVDs that I own and ripped them using Handbrake to an "Ipod hi-res" picture. Then I used the python version of qt-faststart to move the headers to where they need to be. The file seems to start streaming, however it doesn't have any video. I get a prompt at the bottom that looks like a time thing (0:00 on the left and right).
> 
> I was pretty stoked to not get the 0xFFFF thing anymore. Any ideas on what I'm doing wrong? Do I need to re-encode?
> 
> Thanks,
> Chris


 If the status bar at the bottom doesn't move then Tivo is not accepting the stream. I did try a short clip using Handbrake 0.9.3 and the "iPhone & iPod Touch" profile followed by qt-faststart. The result did play back on my Tivo but was a little jumpy. I get better results with the "tivostream_sd" profile in kmttg which uses following ffmpeg recipe (you can up the -b argument for higher quality):


Code:


ffmpeg -y -i inputFile.mpg -vcodec libx264 -coder 0 -level 31 -r 29.97 -sameq -g 300 -bufsize 14745k -b 2000k -maxrate 16000k -bug "+autodetect+ms" -me epzs -trellis 2 -mbd 1 -acodec copy -f mp4 outputFile.mp4


----------



## Laserfan

westside_guy said:


> My Series 2 got its "Fall update" a couple days ago; but my Tivo HD just got it this evening.


So is tivostream working for you on your TivoHD?


----------



## westside_guy

Laserfan said:


> So is tivostream working for you on your TivoHD?


I had to re-enable it to check, because I stopped using tivostream in favor of pyTivo. But yes - tivostream is working for me on my Tivo HD running 11.x.


----------



## moyekj

I hadn't noticed but one of my units got the 11.x update yesterday (rebooted and installed overnight). I can confirm that tivostream works fine.

Also, for .wmv files I see that while the unit accepts the streams now I can't get them to actually play back, and a couple of them caused my unit to reboot. Will have to experiment some more.


----------



## moyekj

moyekj said:


> Also, for .wmv files I see that while the unit accepts the streams now I can't get them to actually play back, and a couple of them caused my unit to reboot. Will have to experiment some more.


 Experimenting for hours with this now and still no luck getting Tivo with 11.x to play various wmv files back, though I've had a few that actually display the correct total length of video and show some activity but still no audio or video. I'm going to study closely the Netflix blog on encoding to see if I can get any clues from there...


----------



## Emillion

moyekj said:


> I defined proper mime type for files with .vob extension and now they play fine with tivostream in development version.


Many thanks for this, we'll wait for the next release...


----------



## Laserfan

westside_guy said:


> I had to re-enable it to check, because I stopped using tivostream in favor of pyTivo. But yes - tivostream is working for me on my Tivo HD running 11.x.





moyekj said:


> I hadn't noticed but one of my units got the 11.x update yesterday (rebooted and installed overnight). I can confirm that tivostream works fine.


Thanks for checking--guess I have some serious troubleshooting to do...


----------



## Laserfan

EDIT: I found the problem--it is "Turbo" mode on my Airlink101 AR410W access point/AP431W (tivo side) ap client combo. Super G works, Super G with Turbo mode does not. Can't imagine how v11.0.P3 exposed this, but since even HD programs appear to stream w/no issue in G mode, I consider this "case closed"! Whew! 

Regarding my TivoHD's inability to "see" tivostream, I've tried a CAT5E cable in lieu of my Wireless AP and it works! As soon as I connect the cable, the Video Streamer selection appears in Music, Photos, & Showcases. What is very odd however is that if I do not exit-out of tivostream, I can re-connect the WAP and it works. Only if I exit tivostream altogether while connected via WAP do I lose Video Streamer and can't re-connect again without using the CAT5E cable first. I hope there is something that inspires moyekj or wmcbrine cuz AFAICT there is no filter set-up in my WAP that might account for this.

Below is the log showing what happened when I did the following:

1. Connect CAT5E in place of WAP, Video Streamer appears
2. Play a video (Fugitive) and it starts & plays OK
3. Go Back (left-arrow) to videostream menu
4. Re-plug Wireless AP
5. Select video (Test1nointerleave) and it starts & plays OK
6. Go Back to videostream menu and select again Fugitive video (still connected via WAP) and it plays OK
7. Back all-the-way out of videostream to Music, Photos, & Showcases and Video Streamer has disappeared again
8. Plug-in CAT5E, Video Streamer reappears
9. Re-plug to WAP, VS disappears again

Is there anything about this that exposes a weakness in tivostream, or is my WAP solely to blame here?

p.s. Recall too that other than Video Streamer my Music, Photos, & Showcases menu items all appear & work OK via the WAP, as too does the tivo daily connect...



Code:


C:\tivostream>set DEBUG=1

C:\tivostream>java -cp tivostream_v0p9.jar com.hme.tivo.videostream.Main com.hme
.tivo.videostream.videostream
STARTING tivostream...
LOG: added factory
MDNS: http://192.168.1.108:7288/videostream/
LOG: 192.168.1.105 icon.png HTTP GET - to factory /videostream/
LOG: 192.168.1.105 icon.png HTTP GET - to factory /videostream/
>> Reading config file: config.ini
>>config: topdir=.
>>config: extensions=.mpg .mpeg2 .mp2 .mp4 .mpeg4
>>config: font=medium
>>config: timeout_status_bar=5
>>config: timeout_info=10
>>config: skip_back=8
>>config: skip_forwards=30
>>config: slow_speed=0.125
>> Reading bookmarks file: bookmarks
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=C:\t
ivostream
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2089,
focusable,bounds=0,0,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=C:\tivost
ream
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2089,focusable,bounds=0,0,512x30] v2=null
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Top Level

>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: HME receiver connected
>>>Listener.java: com.hme.tivo.videostream.Listener.readEvents(line 315): app=vi
deostream[#1,uri=null] [email protected]
911f71
>>>HostContext.java: com.hme.tivo.videostream.HostContext.getLogger(line 91):
LOG: unknown event opcode : 8
>>>HostContext.java: com.hme.tivo.videostream.HostContext.getLogger(line 91):
LOG: unknown event opcode : 10
>>>videostream.java: com.hme.tivo.videostream.videostream.handleAction(line 92):
 action=push
>>>videostream.java: com.hme.tivo.videostream.videostream.makeFileName(line 87):
 name=C:\tivostream
>>>videostream.java: com.hme.tivo.videostream.videostream.lastEntryPush(line 197
): name=C:\tivostream
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.updateFileList(lin
e 71): DIR=C:\tivostream
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=DIR: C:\t
ivostream
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.clear(line 39):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=null v2=BView[#-1,focusable,bounds=0,0,512x30]
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.getSortedByName(li
ne 144): DIR=C:\tivostream files=[Ljava.lang.String;@1f7d134
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Fugitive.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=India Arie - Purify Me.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Lonesome Dove Part 1.mp4
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Test1nointerleave.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2118,focusable,bounds=0,0,512x30] index=0
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Fugi
tive.mpg
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2118,
focusable,bounds=0,0,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Fugitive.
mpg
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2124,focusable,bounds=0,30,512x30] index=1
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Indi
a Arie - Purify Me.mpg
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2124,
focusable,bounds=0,30,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=India Ari
e - Purify Me.mpg
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2130,focusable,bounds=0,60,512x30] index=2
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Lone
some Dove Part 1.mp4
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2130,
focusable,bounds=0,60,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Lonesome
Dove Part 1.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2136,focusable,bounds=0,90,512x30] index=3
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Test
1nointerleave.mp4
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2136,
focusable,bounds=0,90,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Test1noin
terleave.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2118,focusable,bounds=0,0,512x30] v2=null
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleAction(line 92):
 action=push
>>>videostream.java: com.hme.tivo.videostream.videostream.makeFileName(line 87):
 name=Fugitive.mpg
>>>videostream.java: com.hme.tivo.videostream.videostream.lastEntryPush(line 197
): name=Fugitive.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Fugi
tive.mpg
>>>HostContext.java: com.hme.tivo.videostream.HostContext.getBaseURI(line 153):

>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.startStream(line 52): UR
I=http://192.168.1.108:7288/videostream/Fugitive.mpg fileName=Fugitive.mpg
>>>MetaData.java: com.hme.tivo.videostream.MetaData.<init>(line 17): fileName=C:
\tivostream\Fugitive.mpg
>>>MetaData.java: com.hme.tivo.videostream.MetaData.parseMetaData(line 25): file
=C:\tivostream\Fugitive.mpg.txt
>>>MetaData.java: com.hme.tivo.videostream.MetaData.exists(line 106):
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2104,
bounds=0,0,640x480] x=32 y=24 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Fugitive.
mpg
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2104,
bounds=0,0,640x480] x=32 y=420 h_multiplier=1 type=
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2104,
bounds=0,0,640x480] x=32 y=320 h_multiplier=6 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=258
>>>VText.java: com.hme.tivo.videostream.VText.setColor(line 61): object=java.awt
.Color[r=255,g=0,b=0]
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2103,
bounds=0,0,640x480] x=32 y=240 h_multiplier=2 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=258
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Starting
Fugitive.mpg ...
>>>Listener.java: com.hme.tivo.videostream.Listener.handle(line 362): http=HttpR
equest /videostream/Fugitive.mpg
>>>Listener.java: com.hme.tivo.videostream.Listener.factoryCompare(line 334): pa
th=/videostream/Fugitive.mpg uri=/videostream/
>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: 192.168.1.105 Fugitive.mpg HTTP GET - to factory /videostream/
>>>videostream.java: com.hme.tivo.videostream.videostream$videostreamFactory.get
Stream(line 53): uri=Fugitive.mpg
url=file:/C:/tivostream/Fugitive.mpg
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.<init>(line 17): parent=BV
iew[#2103,bounds=0,0,640x480]
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.displayStatusBar(line 97
): state=true
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.makeVisible(line 59): stat
e=true
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.makeVisible(line 59): stat
e=false
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.handleKeyPress(line 184)
: code=4 rawcode=16777732
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.updatePositionsHash(line
 420): time_position=10460
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 536
): time2byte hash:
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 0=11436180
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 45245=12237720
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 49249=13477260
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 54254=14856960
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 59259=16219140
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 64264=17484960
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 70170=18917220
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 74174=20196180
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 80080=21672240
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 85285=23043180
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.updateFileList(lin
e 71): DIR=C:\tivostream
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=DIR: C:\t
ivostream
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.clear(line 39):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.remove(line 101):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=null v2=BView[#-1,focusable,bounds=0,0,512x30]
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.getSortedByName(li
ne 144): DIR=C:\tivostream files=[Ljava.lang.String;@1813fac
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Fugitive.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=India Arie - Purify Me.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Lonesome Dove Part 1.mp4
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Test1nointerleave.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2238,focusable,bounds=0,0,512x30] index=0
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Fugi
tive.mpg
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2238,
focusable,bounds=0,0,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Fugitive.
mpg
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2244,focusable,bounds=0,30,512x30] index=1
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Indi
a Arie - Purify Me.mpg
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2244,
focusable,bounds=0,30,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=India Ari
e - Purify Me.mpg
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2250,focusable,bounds=0,60,512x30] index=2
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Lone
some Dove Part 1.mp4
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2250,
focusable,bounds=0,60,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Lonesome
Dove Part 1.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2256,focusable,bounds=0,90,512x30] index=3
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Test
1nointerleave.mp4
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2256,
focusable,bounds=0,90,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Test1noin
terleave.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2238,focusable,bounds=0,0,512x30] v2=null
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.focusOn(line 131):
 entry=Fugitive.mpg
videostream[#1,uri=null] warning: resource 2154 not found.
videostream[#1,uri=null] warning: resource 2154 not found.
>>>HostContext.java: com.hme.tivo.videostream.HostContext.getLogger(line 91):
LOG: Received event for unknown resource id. Id = 2154, event = 2154.RESOURCE_IN
FO(closed, {position=0, duration=0, start=0, speed=1})
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: 192.168.1.105 I/O Exception handling  HTTP GET Fugitive.mpg: Connection res
et by peer: socket write error
>>>Listener.java: com.hme.tivo.videostream.Listener.handleException(line 214): c
tx=HttpRequest /videostream/Fugitive.mpg t=java.net.SocketException: Connection
reset
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=3 rawcode=16777475
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=BView[#2244,focusable,bounds=0,30,512x30] v2=BView[#2238,focusable,
bounds=0,0,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2244,focusable,bounds=0,30,512x30] v2=BView[#2238,focusable,b
ounds=0,0,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=3 rawcode=16777475
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=BView[#2250,focusable,bounds=0,60,512x30] v2=BView[#2244,focusable,
bounds=0,30,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2250,focusable,bounds=0,60,512x30] v2=BView[#2244,focusable,b
ounds=0,30,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=3 rawcode=16777475
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=BView[#2256,focusable,bounds=0,90,512x30] v2=BView[#2250,focusable,
bounds=0,60,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2256,focusable,bounds=0,90,512x30] v2=BView[#2250,focusable,b
ounds=0,60,512x30]
>>>videostream.java: com.hme.tivo.videostream.videostream.handleAction(line 92):
 action=push
>>>videostream.java: com.hme.tivo.videostream.videostream.makeFileName(line 87):
 name=Test1nointerleave.mp4
>>>videostream.java: com.hme.tivo.videostream.videostream.lastEntryPush(line 197
): name=Test1nointerleave.mp4
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Test
1nointerleave.mp4
>>>HostContext.java: com.hme.tivo.videostream.HostContext.getBaseURI(line 153):

>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.startStream(line 52): UR
I=http://192.168.1.108:7288/videostream/Test1nointerleave.mp4 fileName=Test1noin
terleave.mp4
>>>MetaData.java: com.hme.tivo.videostream.MetaData.<init>(line 17): fileName=C:
\tivostream\Test1nointerleave.mp4
>>>MetaData.java: com.hme.tivo.videostream.MetaData.parseMetaData(line 25): file
=C:\tivostream\Test1nointerleave.mp4.txt
>>>MetaData.java: com.hme.tivo.videostream.MetaData.exists(line 106):
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2236,
bounds=0,0,640x480] x=32 y=24 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Test1noin
terleave.mp4
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2236,
bounds=0,0,640x480] x=32 y=420 h_multiplier=1 type=
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2236,
bounds=0,0,640x480] x=32 y=320 h_multiplier=6 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=258
>>>VText.java: com.hme.tivo.videostream.VText.setColor(line 61): object=java.awt
.Color[r=255,g=0,b=0]
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2235,
bounds=0,0,640x480] x=32 y=240 h_multiplier=2 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=258
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Starting
Test1nointerleave.mp4 ...
>>>Listener.java: com.hme.tivo.videostream.Listener.handle(line 362): http=HttpR
equest /videostream/Test1nointerleave.mp4
>>>Listener.java: com.hme.tivo.videostream.Listener.factoryCompare(line 334): pa
th=/videostream/Test1nointerleave.mp4 uri=/videostream/
>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: 192.168.1.105 Test1nointerleave.mp4 HTTP GET - to factory /videostream/
>>>videostream.java: com.hme.tivo.videostream.videostream$videostreamFactory.get
Stream(line 53): uri=Test1nointerleave.mp4
url=file:/C:/tivostream/Test1nointerleave.mp4
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.<init>(line 17): parent=BV
iew[#2235,bounds=0,0,640x480]
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.displayStatusBar(line 97
): state=true
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.makeVisible(line 59): stat
e=true
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.makeVisible(line 59): stat
e=false
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.handleKeyPress(line 184)
: code=4 rawcode=16777732
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.updatePositionsHash(line
 420): time_position=24691
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 536
): time2byte hash:
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 0=19276380
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 39456=20844420
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 42459=22714680
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 45462=24541140
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 48465=26560320
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 51468=28474380
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 54637=30410340
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 57640=32236800
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 60643=34321680
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 63980=36472260
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 66983=38294340
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 69986=40107660
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 72989=41899080
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 75992=43708020
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 78662=45460020
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 81665=47794560
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 83166=50361240
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 86169=52454880
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 88171=54465300
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 90173=56186640
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.updateFileList(lin
e 71): DIR=C:\tivostream
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=DIR: C:\t
ivostream
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.clear(line 39):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.remove(line 101):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=null v2=BView[#-1,focusable,bounds=0,90,512x30]
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.getSortedByName(li
ne 144): DIR=C:\tivostream files=[Ljava.lang.String;@198dfaf
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Fugitive.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=India Arie - Purify Me.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Lonesome Dove Part 1.mp4
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Test1nointerleave.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2380,focusable,bounds=0,0,512x30] index=0
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Fugi
tive.mpg
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2380,
focusable,bounds=0,0,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Fugitive.
mpg
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2386,focusable,bounds=0,30,512x30] index=1
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Indi
a Arie - Purify Me.mpg
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2386,
focusable,bounds=0,30,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=India Ari
e - Purify Me.mpg
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2392,focusable,bounds=0,60,512x30] index=2
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Lone
some Dove Part 1.mp4
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2392,
focusable,bounds=0,60,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Lonesome
Dove Part 1.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2398,focusable,bounds=0,90,512x30] index=3
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Test
1nointerleave.mp4
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2398,
focusable,bounds=0,90,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Test1noin
terleave.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2380,focusable,bounds=0,0,512x30] v2=null
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.focusOn(line 131):
 entry=Test1nointerleave.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=BView[#2398,focusable,bounds=0,90,512x30] v2=BView[#2380,focusable,
bounds=0,0,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2398,focusable,bounds=0,90,512x30] v2=BView[#2380,focusable,b
ounds=0,0,512x30]
videostream[#1,uri=null] warning: resource 2273 not found.
videostream[#1,uri=null] warning: resource 2273 not found.
>>>HostContext.java: com.hme.tivo.videostream.HostContext.getLogger(line 91):
LOG: Received event for unknown resource id. Id = 2273, event = 2273.RESOURCE_IN
FO(closed, {position=0, duration=0, start=0, speed=1})
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: 192.168.1.105 I/O Exception handling  HTTP GET Test1nointerleave.mp4: Conne
ction reset by peer: socket write error
>>>Listener.java: com.hme.tivo.videostream.Listener.handleException(line 214): c
tx=HttpRequest /videostream/Test1nointerleave.mp4 t=java.net.SocketException: Co
nnection reset
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=2 rawcode=16777218
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=BView[#2392,focusable,bounds=0,60,512x30] v2=BView[#2398,focusable,
bounds=0,90,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2392,focusable,bounds=0,60,512x30] v2=BView[#2398,focusable,b
ounds=0,90,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=2 rawcode=16777218
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=BView[#2386,focusable,bounds=0,30,512x30] v2=BView[#2392,focusable,
bounds=0,60,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2386,focusable,bounds=0,30,512x30] v2=BView[#2392,focusable,b
ounds=0,60,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=2 rawcode=16777218
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=BView[#2380,focusable,bounds=0,0,512x30] v2=BView[#2386,focusable,b
ounds=0,30,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2380,focusable,bounds=0,0,512x30] v2=BView[#2386,focusable,bo
unds=0,30,512x30]
>>>videostream.java: com.hme.tivo.videostream.videostream.handleAction(line 92):
 action=push
>>>videostream.java: com.hme.tivo.videostream.videostream.makeFileName(line 87):
 name=Fugitive.mpg
>>>videostream.java: com.hme.tivo.videostream.videostream.lastEntryPush(line 197
): name=Fugitive.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Fugi
tive.mpg
>>>HostContext.java: com.hme.tivo.videostream.HostContext.getBaseURI(line 153):

>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.startStream(line 52): UR
I=http://192.168.1.108:7288/videostream/Fugitive.mpg fileName=Fugitive.mpg
>>>MetaData.java: com.hme.tivo.videostream.MetaData.<init>(line 17): fileName=C:
\tivostream\Fugitive.mpg
>>>MetaData.java: com.hme.tivo.videostream.MetaData.parseMetaData(line 25): file
=C:\tivostream\Fugitive.mpg.txt
>>>MetaData.java: com.hme.tivo.videostream.MetaData.exists(line 106):
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2366,
bounds=0,0,640x480] x=32 y=24 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Fugitive.
mpg
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2366,
bounds=0,0,640x480] x=32 y=420 h_multiplier=1 type=
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2366,
bounds=0,0,640x480] x=32 y=320 h_multiplier=6 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=258
>>>VText.java: com.hme.tivo.videostream.VText.setColor(line 61): object=java.awt
.Color[r=255,g=0,b=0]
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2365,
bounds=0,0,640x480] x=32 y=240 h_multiplier=2 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=258
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Starting
Fugitive.mpg ...
>>>Listener.java: com.hme.tivo.videostream.Listener.handle(line 362): http=HttpR
equest /videostream/Fugitive.mpg
>>>Listener.java: com.hme.tivo.videostream.Listener.factoryCompare(line 334): pa
th=/videostream/Fugitive.mpg uri=/videostream/
>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: 192.168.1.105 Fugitive.mpg HTTP GET - to factory /videostream/
>>>videostream.java: com.hme.tivo.videostream.videostream$videostreamFactory.get
Stream(line 53): uri=Fugitive.mpg
url=file:/C:/tivostream/Fugitive.mpg
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.<init>(line 17): parent=BV
iew[#2365,bounds=0,0,640x480]
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.displayStatusBar(line 97
): state=true
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.makeVisible(line 59): stat
e=true
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.makeVisible(line 59): stat
e=false
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.handleKeyPress(line 184)
: code=4 rawcode=16777732
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.updatePositionsHash(line
 420): time_position=12028
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 536
): time2byte hash:
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 0=11225940
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 44244=12123840
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 48248=13245120
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 52252=14291940
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 56256=15251160
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 59759=16297980
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 64264=17362320
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 68168=18448560
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 72172=19561080
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 76376=20743680
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 81281=21935040
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.printSortedHash(line 539
): 85285=23003760
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.updateFileList(lin
e 71): DIR=C:\tivostream
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=DIR: C:\t
ivostream
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.clear(line 39):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>StatusBar.java: com.hme.tivo.videostream.StatusBar.remove(line 101):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=null
>>>VText.java: com.hme.tivo.videostream.VText.clearResource(line 71):
>>>VText.java: com.hme.tivo.videostream.VText.remove(line 76):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=null v2=BView[#-1,focusable,bounds=0,0,512x30]
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.getSortedByName(li
ne 144): DIR=C:\tivostream files=[Ljava.lang.String;@14fe5c
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Fugitive.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=India Arie - Purify Me.mpg
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Lonesome Dove Part 1.mp4
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeEntryName(line 72): DIR=C:\t
ivostream name=Test1nointerleave.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2497,focusable,bounds=0,0,512x30] index=0
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Fugi
tive.mpg
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2497,
focusable,bounds=0,0,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Fugitive.
mpg
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2503,focusable,bounds=0,30,512x30] index=1
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Indi
a Arie - Purify Me.mpg
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2503,
focusable,bounds=0,30,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=India Ari
e - Purify Me.mpg
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2509,focusable,bounds=0,60,512x30] index=2
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Lone
some Dove Part 1.mp4
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2509,
focusable,bounds=0,60,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Lonesome
Dove Part 1.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2515,focusable,bounds=0,90,512x30] index=3
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=Test
1nointerleave.mp4
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2515,
focusable,bounds=0,90,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Test1noin
terleave.mp4
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2497,focusable,bounds=0,0,512x30] v2=null
>>>VText.java: com.hme.tivo.videostream.VText.setVisible(line 46): visible=false

>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.focusOn(line 131):
 entry=Fugitive.mpg
videostream[#1,uri=null] warning: resource 2415 not found.
videostream[#1,uri=null] warning: resource 2415 not found.
>>>HostContext.java: com.hme.tivo.videostream.HostContext.getLogger(line 91):
LOG: Received event for unknown resource id. Id = 2415, event = 2415.RESOURCE_IN
FO(closed, {position=0, duration=0, start=0, speed=1})
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: 192.168.1.105 I/O Exception handling  HTTP GET Fugitive.mpg: Connection res
et by peer: socket write error
>>>Listener.java: com.hme.tivo.videostream.Listener.handleException(line 214): c
tx=HttpRequest /videostream/Fugitive.mpg t=java.net.SocketException: Connection
reset
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=4 rawcode=16777732
>>>videostream.java: com.hme.tivo.videostream.videostream.handleKeyPress(line 15
6): code=4 rawcode=16777732
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.topDirList(line 49
): topDir=[C:\tivostream]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.clear(line 39):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=false v1=null v2=BView[#-1,focusable,bounds=0,0,512x30]
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.createRow(line 18): pare
nt=BView[#2525,focusable,bounds=0,0,512x30] index=0
>>>GLOBAL.java: com.hme.tivo.videostream.GLOBAL.makeFileName(line 65): name=C:\t
ivostream
>>>VText.java: com.hme.tivo.videostream.VText.<init>(line 13): view=BView[#2525,
focusable,bounds=0,0,512x30] x=25 y=4 h_multiplier=1 type=small
>>>VText.java: com.hme.tivo.videostream.VText.setFlags(line 66): flags=1
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=C:\tivost
ream
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleFocus(line 62): fo
cus=true v1=BView[#2525,focusable,bounds=0,0,512x30] v2=null
>>>VText.java: com.hme.tivo.videostream.VText.setValue(line 51): value=Top Level

>>>videostream.java: com.hme.tivo.videostream.videostream.lastEntryPop(line 203)
: name=Fugitive.mpg
>>>InitialScreen.java: com.hme.tivo.videostream.InitialScreen.focusOn(line 131):
 entry=Fugitive.mpg
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>videostream.java: com.hme.tivo.videostream.videostream.handleApplicationError
(line 208): code=4 message=view -1 not found
>>>ScreenList.java: com.hme.tivo.videostream.ScreenList.handleKeyPress(line 70):
 code=4 rawcode=16777732
>>>videostream.java: com.hme.tivo.videostream.videostream.handleKeyPress(line 15
6): code=4 rawcode=16777732
>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: connection to receiver closed
>>>HostContext.java: com.hme.tivo.videostream.HostContext.close(line 353):
>>>HostContext.java: com.hme.tivo.videostream.HostContext.getSocket(line 143):
>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: HME receiver disconnected
>>>Listener.java: com.hme.tivo.videostream.Listener.handle(line 362): http=HttpR
equest /videostream/icon.png
>>>Listener.java: com.hme.tivo.videostream.Listener.factoryCompare(line 334): pa
th=/videostream/icon.png uri=/videostream/
>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: 192.168.1.105 icon.png HTTP GET - to factory /videostream/
>>>videostream.java: com.hme.tivo.videostream.videostream$videostreamFactory.get
Stream(line 53): uri=icon.png
>>>Listener.java: com.hme.tivo.videostream.Listener.handle(line 362): http=HttpR
equest /videostream/icon.png
>>>Listener.java: com.hme.tivo.videostream.Listener.factoryCompare(line 334): pa
th=/videostream/icon.png uri=/videostream/
>>>Listener.java: com.hme.tivo.videostream.Listener.getLogger(line 425):
LOG: 192.168.1.105 icon.png HTTP GET - to factory /videostream/
>>>videostream.java: com.hme.tivo.videostream.videostream$videostreamFactory.get
Stream(line 53): uri=icon.png
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.finalize(line 520):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.finalize(line 520):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.finalize(line 520):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.finalize(line 520):
>>>ViewScreen.java: com.hme.tivo.videostream.ViewScreen.remove(line 491):


----------



## moyekj

moyekj said:


> Experimenting for hours with this now and still no luck getting Tivo with 11.x to play various wmv files back, though I've had a few that actually display the correct total length of video and show some activity but still no audio or video. I'm going to study closely the Netflix blog on encoding to see if I can get any clues from there...


 I finally had a breakthrough. I used Microsoft Windows Media Encoder 9 and tried lots of different encodings without luck. Finally I narrowed it down to a combination that works:
Video must be VC-1 Advanced Profile (WVC1 L2 or L3).
Audio must be WMA2 2-channel Constant Bit Rate. Multi-channel or variable bit rate audio doesn't work, and WMAPro also does not work. i.e. Audio support is very limited.
Only the right combination of video and audio will work. If you generate video without audio it also won't play back.

So in general Tivo's WMW decoding capabilities are very narrow right now and perhaps just sufficient to support Netflix specific encodings. Here's information on an encoding that worked:


Code:


Video
Format                           : VC-1
Format profile                   : [email protected]
Codec ID                         : WVC1
Codec ID/Hint                    : Microsoft
Description of the codec         : Windows Media Video 9 Advanced Profile
Duration                         : 29s 933ms
Bit rate mode                    : Variable
Bit rate                         : 5000 Kbps
Width                            : 1280 pixels
Height                           : 720 pixels
Display aspect ratio             : 16/9
Frame rate                       : 29.970 fps
Resolution                       : 24 bits
Bits/(Pixel*Frame)               : 0.181
Language                         : en-us

Audio
Format                           : WMA2
Format profile                   : L3
Codec ID                         : 161
Codec ID/Info                    : Windows Media Audio 2
Description of the codec         : Windows Media Audio 9.2 - 320 kbps, 44 kHz, stereo (A/V) 2-pass CBR
Duration                         : 29s 952ms
Bit rate mode                    : Constant
Bit rate                         : 320 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 44.1 KHz
Language                         : en-us

So if you have a choice it looks like mpeg4 with H.264 video and AC3 audio are a much better option for generating your own encodings.

In any case I will update the tivostream documentation with my findings and specific settings for Windows Media Encoder 9 that can generate working encodings.


----------



## moyekj

v0p10 - November 28, 2008
-------------------------
* Added proper mime type so DVD files with .vob file extension can be played
without having to rename to .mpg
* Added back --intf command line argument and equivalent --ip argument which
allow specification of an IP to use for server instead of binding to the
first one found (which in some cases is not desired if there are multiple
active interfaces).
* When attempting to play back unsupported file types tivostream would crash
(with 0x50006 error) when exiting the video playback screen. This is now fixed.
* Added documentation on .wmv file playback (with VC-1 video & WMA2 audio)
now that Tivo software version 11.x supports limited VC-1 decoding.
Documentation includes details on specific encodings that work as well as
details of how to generate a working encoding using Microsoft Media
Encoder 9.
* tivostream version number is now included after "Video Streamer"


----------



## gurdude

Got the tivostream app up and running, but was disappointed to get 0xfff error for an .mp4 movie, yet I had no problem viewing a Tekzilla .mp4 two-minute clip.

The .mp4 movie was encoded using Handbrake on Mac OSX.

Just for the heck of it, I rebooted the Tivo, but it didn't help.

Could it be that I didn't properly make the .mp4 file streamable using qt-faststart? How does one run the qt-faststart.exe file "on" the desired .mp4 file? When I double-click the .exe file (in Windows), it just flashes the cmd window and then closes.


----------



## moyekj

gurdude said:


> Got the tivostream app up and running, but was disappointed to get 0xfff error for an .mp4 movie, yet I had no problem viewing a Tekzilla .mp4 two-minute clip.
> 
> The .mp4 movie was encoded using Handbrake on Mac OSX.
> 
> Just for the heck of it, I rebooted the Tivo, but it didn't help.
> 
> Could it be that I didn't properly make the .mp4 file "streamable" using qt-faststart? How does one run the qt-faststart.exe file "on" the desired .mp4 file? When I double-click the .exe file (in Windows), it just flashes the cmd window and then closes.


 Yes you need to run qt-faststart on it. Bring up a cmd window and run the command:
qt-faststart <full path to your .mp4 file> <name for fixed .mp4 file>
Example:
qt-faststart c:\home\test.mp4 c:\home\test_qt.mp4
If you're going to be doing it a lot you may consider writing a little batch script to do it for you. Something like a script called qt.bat that looks like:


Code:


@echo off
c:\tivostream_v0p10\qt-faststart.exe &#37;1 qt_%1

Then to run you simply run:
qt yourFile.mp4


----------



## westside_guy

moyekj said:


> * Added back --intf command line argument and equivalent --ip argument which
> allow specification of an IP to use for server instead of binding to the
> first one found (which in some cases is not desired if there are multiple
> active interfaces).


So how is this used, exactly? I thought it would be something like "./run_unix.sh --intf 10.0.1.10" , but belatedly I realized that shell script isn't looking for any command line parameters at all.

*Edit:* Nevermind; I found it on a post from 11/14.


----------



## moyekj

westside_guy said:


> So how is this used, exactly? I thought it would be something like "./run_unix.sh --intf 10.0.1.10" , but belatedly I realized that shell script isn't looking for any command line parameters at all.
> 
> *Edit:* Nevermind; I found it on a post from 11/14.


Note that with v0p8 the "Main" function was different than it is now. So now the ./run_unix.sh would look something like:


Code:


java -cp tivostream_v0p10.jar com.hme.tivo.videostream.Main --intf 10.0.1.193 com.hme.tivo.videostream.videostream


----------



## gurdude

Thanks. Running qt-faststart did the trick, in that I no longer have the error message. Then the movie played, but with audio only. I tried various Handbrake encoding options, each with no success. I can stream some VOB files, but some are *missing* audio. Regardless, I've spent much of the Thanksgiving break setting this up with little to show the wife (other than an episode of Tekzilla, which she doesn't much care for). So I'll check back in a while to see if the encoding discussions here produce some fail-proof results. Of course, Netflix streaming is also due soon...



moyekj said:


> Yes you need to run qt-faststart on it. Bring up a cmd window and run the command:
> qt-faststart <full path to your .mp4 file> <name for fixed .mp4 file>
> Example:
> qt-faststart c:\home\test.mp4 c:\home\test_qt.mp4
> If you're going to be doing it a lot you may consider writing a little batch script to do it for you. Something like a script called qt.bat that looks like:
> 
> 
> Code:
> 
> 
> @echo off
> c:\tivostream_v0p10\qt-faststart.exe %1 qt_%1
> 
> Then to run you simply run:
> qt yourFile.mp4


----------



## moyekj

gurdude said:


> Thanks. Running qt-faststart did the trick, in that I no longer have the error message. Then the movie played, but with audio only. I tried various Handbrake encoding options, each with no success. I can stream some VOB files, but some are *missing* audio. Regardless, I've spent much of the Thanksgiving break setting this up with little to show the wife (other than an episode of Tekzilla, which she doesn't much care for). So I'll check back in a while to see if the encoding discussions here produce some fail-proof results. Of course, Netflix streaming is also due soon...


 Handbrake is really not the best choice for encoding. The easiest way to encode if you start from .mpg (or rename .vob files to .mpg) is to use kmttg and tivostream_sd or tivostream_hd encoding profiles. That will run ffmpeg followed by qt-faststart automatically and has produced good results for me and others and preserves AC3 audio from source .mpg.


----------



## cahoon

I've been having some problems recently with streaming mp4 files. It seems that everything works fine until about 1 hour into a movie (around 64 minutes, give or take). Then, the streaming stops, and the console shows a socket write I/O exception (the exact message depends upon the Tivostream version). I've tried a few different sources, and I see the same thing. The 1 hour limit occurs after about 30 minutes of download time. The throughput is around 5.2 Mb/s. I've tried with serveral different mp4 files, and each time the streaming stops at approximately the same time.

I have a Tivo HD with version 9.4. I haven't used the streaming in a while, but I was able to stream the entire file for one of the mp4 files in the past (but I don't recall the software version). I've also tried tivostream versions 8, 9, and 10, so I doubt it's a tivostream issue.

Does Tivo have some sort of limit on the size of the file, or the duration of the download?

Any thoughts? Thanks!


----------



## moyekj

cahoon said:


> I've been having some problems recently with streaming mp4 files. It seems that everything works fine until about 1 hour into a movie (around 64 minutes, give or take). Then, the streaming stops, and the console shows a socket write I/O exception (the exact message depends upon the Tivostream version). I've tried a few different sources, and I see the same thing. The 1 hour limit occurs after about 30 minutes of download time. The throughput is around 5.2 Mb/s. I've tried with serveral different mp4 files, and each time the streaming stops at approximately the same time.
> 
> I have a Tivo HD with version 9.4. I haven't used the streaming in a while, but I was able to stream the entire file for one of the mp4 files in the past (but I don't recall the software version). I've also tried tivostream versions 8, 9, and 10, so I doubt it's a tivostream issue.
> 
> Does Tivo have some sort of limit on the size of the file, or the duration of the download?
> 
> Any thoughts? Thanks!


Is the TivoHD you are streaming to full or close to full? Do you have suggestions enabled?
I don't think it's ever been established what the upper stream buffer limit is, but I'm sure there has to be one. It sounds to me like you are running into some sort of limit.

Just to confirm my understanding, you are saying that once the buffer reaches about 1 hour the stream stops, and that happens for multiple different .mp4 streams right?

I've managed to watch a couple of mpeg2 DVD rips > 1 hour on my S3 before without trouble in the past, though I haven't tried that lately. I'll initiate another one shortly to see if I can get past the 1 hour mark. I don't think I've tried a .mp4 running longer than 1 hour so shall have to try that as well.


----------



## moyekj

Hmm. On my S3 running 9.4 software I tried a couple of DVD rips and both cases Tivo closes down the stream at exact same point in each (about 39 min and 44 min points respectively). Those time points in both files correspond to about the 1.1 GB mark in each.
Both of these mpegs transfer completely with pyTivo so it's not some mpeg2 glitch causing the problem. Same problem using wmcbrine's HME/VLC streamer so that seems to rule out any issues with tivostream itself.

So it looks to me right now that there is ~ 1.1GB stream buffer limit. I am doing more experiments including encoding one of these mpeg2 files to .mp4 format to see if it also will stop streaming after buffer builds up to 1.1GB mark.

If this indeed is the case then this is a MAJOR limitation of video streaming to Tivos and very disappointing.

If anyone using this application has been able to stream well over the 1GB mark please post. Conversely if others have noticed a ~ 1GB buffer limit please post as well.


----------



## cahoon

moyekj said:


> Is the TivoHD you are streaming to full or close to full? Do you have suggestions enabled?
> I don't think it's ever been established what the upper stream buffer limit is, but I'm sure there has to be one. It sounds to me like you are running into some sort of limit.


I thought it might be because Tivo was full, so I permanently deleted some shows in the Recently Deleted folder. But the problem still occured. I have a 1 TB internal drive, so there were about 270+ shows in the Deleted folder.



moyekj said:


> Just to confirm my understanding, you are saying that once the buffer reaches about 1 hour the stream stops, and that happens for multiple different .mp4 streams right?


Yep - exactly. I tried 3 different mp4 streams.



moyekj said:


> I've managed to watch a couple of mpeg2 DVD rips > 1 hour on my S3 before without trouble in the past, though I haven't tried that lately. I'll initiate another one shortly to see if I can get past the 1 hour mark. I don't think I've tried a .mp4 running longer than 1 hour so shall have to try that as well.


I think I have a mpeg2 file that I'll try as well and see if that works.


----------



## cahoon

moyekj said:


> If anyone using this application has been able to stream well over the 1GB mark please post. Conversely if others have noticed a ~ 1GB buffer limit please post as well.


Very interesting. My quick calculation for my last try comes out to 1.167 GB (4.23 Mb/s for 37 min 41 sec). I still need to try a mpeg2 file...


----------



## moyekj

I encoded a 4.3GB mpeg2 file to mpeg4 which ended up as 2.2GB. Sure enough streaming that one the buffer goes further (to the 63 min mark) which puts file size limit right around the 1.1 GB mark again.

EDIT: I also just confirmed all the titles fail at the same points when streaming with HME/VLC application.

So I think it's pretty clear there is a ~1GB limit for streaming buffer size. 
For mpeg2 you can kind of work around it by stopping and playing back from where you left off once you reach end of buffer but still this is very disappointing.


----------



## cahoon

moyekj said:


> So I think it's pretty clear there is a ~1GB limit for streaming buffer size.
> For mpeg2 you can kind of work around it by stopping and playing back from where you left off once you reach end of buffer but still this is very disappointing.


Thanks for looking in to this and confirming. It is very disappointing.


----------



## Emillion

my favorite way to watch DVDs from an external drive since the DVD iso limitation of about 1GB per vob file.

However - wondering if this buffer limit could be handled by keeping it in check and "pause" the buffering when getting close to the 1GB, then later restarting it, and so on, in the background. How does Tivo handle live TV buffering when over 1GB?
Or is there a way to "discard" the beginning of the buffer while streaming?


----------



## moyekj

Emillion said:


> my favorite way to watch DVDs from an external drive since the DVD iso limitation of about 1GB per vob file.
> 
> However - wondering if this buffer limit could be handled by keeping it in check and "pause" the buffering when getting close to the 1GB, then later restarting it, and so on, in the background. How does Tivo handle live TV buffering when over 1GB?
> Or is there a way to "discard" the beginning of the buffer while streaming?


 That's the problem, via HME there is no buffer manipulation possible as far as I know so there really is no good/elegant solution to this problem. I suppose since this capability was born out of YouTube streaming and most YouTube videos are short, it makes sense that there is only a 1GB buffer. As I stated in another thread Netflix won't have same limitation and thus probably won't have a large buffer at all. We can only hope that however it's implemented for Netflix streaming can be mimicked in HME SDK, but I don't have high hopes as there seems to be a lot of HME capabilities hidden from SDK.


----------



## Sevenfeet

moyekj said:


> If the status bar at the bottom doesn't move then Tivo is not accepting the stream. I did try a short clip using Handbrake 0.9.3 and the "iPhone & iPod Touch" profile followed by qt-faststart. The result did play back on my Tivo but was a little jumpy. I get better results with the "tivostream_sd" profile in kmttg which uses following ffmpeg recipe (you can up the -b argument for higher quality):
> 
> 
> Code:
> 
> 
> ffmpeg -y -i inputFile.mpg -vcodec libx264 -coder 0 -level 31 -r 29.97 -sameq -g 300 -bufsize 14745k -b 2000k -maxrate 16000k -bug "+autodetect+ms" -me epzs -trellis 2 -mbd 1 -acodec copy -f mp4 outputFile.mp4


I was wondering whether or not that Handbrake 0.9.3 made any appreciable difference with tivostream. What have you found so far? Since Handbrake now uses ffmpeg, you'd think that it would be possible to mimic the results we get out of kmttg.


----------



## moyekj

Sevenfeet said:


> I was wondering whether or not that Handbrake 0.9.3 made any appreciable difference with tivostream. What have you found so far? Since Handbrake now uses ffmpeg, you'd think that it would be possible to mimic the results we get out of kmttg.


 For h.264 it's using x264 still I believe. I don't use Handbrake (using kmttg is more convenient for me) but if it's possible to create your own profile in Handbrake then you can probably create one that looks like the above ffmpeg recipe.


----------



## aesop

I've been running into problems with the video skipping forward by a couple of seconds while streaming. Everything seems to be working fine other than "warning: resource 2134 not found". This is what I'm getting:

C:\tivostream\tivostream_v0p9>java -cp tivostream_v0p9.jar com.hme.tivo.videostr
eam.Main com.hme.tivo.videostream.videostream
STARTING tivostream...
LOG: added factory
MDNS: http://192.168.1.136:2194/videostream/
LOG: 192.168.1.101 icon.png HTTP GET - to factory /videostream/
>> Reading config file: config.ini
>>config: topdir=Tivo Recordings == H:\My TiVo Recordings
>>config: extensions=.mpg .mpeg2 .mp2 .mp4 .mpeg4
>>config: font=medium
>>config: timeout_status_bar=5
>>config: timeout_info=10
>>config: skip_back=8
>>config: skip_forwards=30
>>config: slow_speed=0.125
>> Reading bookmarks file: bookmarks
LOG: HME receiver connected
LOG: unknown event opcode : 8
LOG: 192.168.1.101 Saw 5 2008 R5 LINE H264-KingBen.mp4 HTTP GET - to factory /vi
deostream/
url=file:/H:/My%20TiVo%20Recordings/Saw%205%202008%20R5%20LINE%20H264-KingBen.mp
4
videostream[#1,uri=null] warning: resource 2134 not found.
videostream[#1,uri=null] warning: resource 2134 not found.
LOG: Received event for unknown resource id. Id = 2134, event = 2134.RESOURCE_IN
FO(closed, {position=0, duration=0, start=0, speed=1})
LOG: 192.168.1.101 I/O Exception handling HTTP GET Saw 5 2008 R5 LINE H264-King
Ben.mp4: Connection reset by peer: socket write error
LOG: connection to receiver closed
LOG: HME receiver disconnected

Any help with getting this corrected?


----------



## moyekj

aesop said:


> I've been running into problems with the video skipping forward by a couple of seconds while streaming. Everything seems to be working fine other than "warning: resource 2134 not found".


 That warning is normal and nothing to do with skipping problem. The skipping is due to problem in the encoding or the Tivo mp4 decoder, so not much can be done other than changing encoding method if you are encoding your own (including using VRD Quickstream fix if you are starting from an mpeg2 recording).


----------



## Sevenfeet

moyekj said:


> For h.264 it's using x264 still I believe. I don't use Handbrake (using kmttg is more convenient for me) but if it's possible to create your own profile in Handbrake then you can probably create one that looks like the above ffmpeg recipe.


It would seem that although Handbrake 0.9.3 does now use ffmpeg (it even defaults to it for some functions), it doesn't allow you to tweak it nearly as much as the x264 codec. For example, ffmpeg can do H.264 but there's no way to tell it to through Handbrake. Oh well...

On using tivostream v.10, it is nice to have the ability to stream vob files directly...I was able to turn it on my folder of ripped DVDs and have it play some. The real problem is that asking to play a random vob file isn't a great interface. The holy grail of a Tivo playing ripped DVDs off a server will have to wait I guess.

The 1.1GB streaming limit is troubling but hopefully someone will figure a way around it (or Tivo will fix it, whichever comes first).


----------



## fatboy15226

Cool app. Thanks to the dev team.

I am having an issue that I have not seen posted. I can get the sample video listed here to work (my sample.mp4 seen in the log) but not my own Handbrake ripped mp4's (even with qtfast).

I have setup a server with 4 files: 2 standard mp4's that work as TV Outs on my ipod (x264 AAC) name Rm.mp4 and test02.mp4. test01.mp4 is test02 with qtfast run and sample.mp4 is the sample from this thread.

Debug log below (running WinXP latest java)

C:\TiVo>java -cp tivostream_v0p10.jar com.hme.tivo.videostream.Main com.hme.tivo
.videostream.videostream --intf 172.16.1.10
STARTING tivostream...
LOG: added factory
MDNS: http://172.16.1.10:7288/videostream/
tivostream ready & listening.
LOG: 172.16.1.101 icon.png HTTP GET - to factory /videostream/
>> Reading config file: config.ini
>>config: topdir=.
>>config: extensions=.mpg .vob .mpeg2 .mp2 .mp4 .mpeg4 .m4v
>>config: font=medium
>>config: timeout_status_bar=5
>>config: timeout_info=10
>>config: skip_back=8
>>config: skip_forwards=30
>>config: slow_speed=0.125
>> Reading bookmarks file: bookmarks
LOG: HME receiver connected
LOG: unknown event opcode : 8
LOG: unknown event opcode : 10
LOG: 172.16.1.101 Rm.mp4 HTTP GET - to factory /videostream/
url=file:/C:/TiVo/Rm.mp4
LOG: 172.16.1.101 I/O Exception handling HTTP GET Rm.mp4: Connection reset by p
eer: socket write error
ERROR code=1 Message: can't create rsrc. unsupported stream type /videostream/30
2.m4v
ERROR code=1 Message: can't create rsrc. unsupported stream type /videostream/30
2-tivo.m4v
LOG: connection to receiver closed
LOG: HME receiver disconnected
LOG: 172.16.1.101 icon.png HTTP GET - to factory /videostream/
>> Reading config file: config.ini
>>config: topdir=.
>>config: extensions=.mpg .vob .mpeg2 .mp2 .mp4 .mpeg4 .m4v
>>config: font=medium
>>config: timeout_status_bar=5
>>config: timeout_info=10
>>config: skip_back=8
>>config: skip_forwards=30
>>config: slow_speed=0.125
>> Reading bookmarks file: bookmarks
LOG: HME receiver connected
LOG: unknown event opcode : 8
LOG: unknown event opcode : 10
LOG: 172.16.1.101 sample.mp4 HTTP GET - to factory /videostream/
url=file:/C:/TiVo/sample.mp4
videostream[#1,uri=null] warning: resource 2154 not found.
videostream[#1,uri=null] warning: resource 2154 not found.
LOG: Received event for unknown resource id. Id = 2154, event = 2154.RESOURCE_IN
FO(playing, {position=108541, duration=1440000, start=0, speed=1, pos=108541/144
0000, span=0/1440})
videostream[#1,uri=null] warning: resource 2154 not found.
videostream[#1,uri=null] warning: resource 2154 not found.
LOG: Received event for unknown resource id. Id = 2154, event = 2154.RESOURCE_IN
FO(closed, {position=0, duration=0, start=0, speed=1})
LOG: 172.16.1.101 I/O Exception handling HTTP GET sample.mp4: Connection reset
by peer: socket write error
LOG: 172.16.1.101 test01.mp4 HTTP GET - to factory /videostream/
url=file:/C:/TiVo/test01.mp4
videostream[#1,uri=null] warning: resource 2700 not found.
videostream[#1,uri=null] warning: resource 2700 not found.
LOG: Received event for unknown resource id. Id = 2700, event = 2700.RESOURCE_IN
FO(closed, {position=0, duration=0, start=0, speed=0})
LOG: 172.16.1.101 I/O Exception handling HTTP GET test01.mp4: Connection reset
by peer: socket write error
LOG: 172.16.1.101 Rm.mp4 HTTP GET - to factory /videostream/
url=file:/C:/TiVo/Rm.mp4
LOG: 172.16.1.101 I/O Exception handling HTTP GET Rm.mp4: Connection reset by p
eer: socket write error
LOG: 172.16.1.101 test02.mp4 HTTP GET - to factory /videostream/
url=file:/C:/TiVo/test02.mp4
LOG: 172.16.1.101 I/O Exception handling HTTP GET test02.mp4: Connection reset
by peer: socket write error
LOG: 172.16.1.101 test01.mp4 HTTP GET - to factory /videostream/
url=file:/C:/TiVo/test01.mp4
videostream[#1,uri=null] warning: resource 2881 not found.
videostream[#1,uri=null] warning: resource 2881 not found.
LOG: Received event for unknown resource id. Id = 2881, event = 2881.RESOURCE_IN
FO(closed, {position=0, duration=0, start=0, speed=0})
LOG: 172.16.1.101 I/O Exception handling HTTP GET test01.mp4: Connection reset
by peer: socket write error
LOG: connection to receiver closed
LOG: HME receiver disconnected

Thoughts? Thanks (sorry if this is dumb)

-dsd


----------



## moyekj

fatboy15226: For encoding with Handbrake the documentation lists the formula that worked for me, specifically:
* Choose Xbox 360 profile (this will select H.264 video and AAC audio)
* Change Audio Encoder to AC3
* Be sure to NOT enable &#8220;HTTP Optimized MP4&#8221; option as that will not work with AC3
* Once Handbrake completes the encoding you must then run qt-faststart on it

NOTE: The .m4v extension is not understood by Tivo and I don't have a mime type defined for it so won't work with that extension. Use .mp4 extension instead.

As I've mentioned in this thread a few times I've had better results using ffmpeg for encoding, specifically the tivostream_sd or tivostream_hd profiles in kmttg.


----------



## Laserfan

Sevenfeet said:


> The 1.1GB streaming limit is troubling but hopefully someone will figure a way around it (or Tivo will fix it, whichever comes first).


Yeah I arrived late to this happenin' tivostream party just when we find this turd in the punchbowl!   (Sorry.)

Unless & until there's a workaround developed, would I have to install Tivo Desktop (again) to obtain TTCB functionality i.e. send shows to the Tivo for playback? I've used TivoPlayList to grab shows off'n the Tivo, but forget how to send them back. Can someone here indulge me...


----------



## fatboy15226

moyekj, thanks for the response.

I will give that a shot. I was hoping to have 1 format that would work on both Tivo and iPod and ideally use my existing files (in the hundreds).

Thanks,
dsd


----------



## moyekj

fatboy15226 said:


> moyekj, thanks for the response.
> 
> I will give that a shot. I was hoping to have 1 format that would work on both Tivo and iPod and ideally use my existing files (in the hundreds).
> 
> Thanks,
> dsd


 Note that there's a chance if you leave the audio as AAC that it will work on your iPod too. I doubt that with AC3 audio it will work on iPod as that's pretty non-standard (though the Tivo accepts it).


----------



## moyekj

Laserfan said:


> Yeah I arrived late to this happenin' tivostream party just when we find this turd in the punchbowl!   (Sorry.)
> 
> Unless & until there's a workaround developed, would I have to install Tivo Desktop (again) to obtain TTCB functionality i.e. send shows to the Tivo for playback? I've used TivoPlayList to grab shows off'n the Tivo, but forget how to send them back. Can someone here indulge me...


 I would use pyTivo instead of Tivo Desktop.
I've been trying to go through TivoPony P.M. route to ask about the 1.1GB limitation but I'm not hopeful it will go anywhere as I haven't received a response.


----------



## wmcbrine

I'd rather ask them about the specification for video streaming in general (remember, they haven't published _anything_ on this)... if I thought they'd answer... which I don't.


----------



## Laserfan

moyekj said:


> I would use pyTivo instead of Tivo Desktop.


Thanks, I'll take a look. Tivo Desktop is such bloatware for what I want to do...


----------



## moyekj

wmcbrine said:


> I'd rather ask them about the specification for video streaming in general (remember, they haven't published _anything_ on this)... if I thought they'd answer... which I don't.


 Sadly I think you're right. I don't know how much can be gleamed with some network sniffing of Tivo/Netflix... last time I tried that with YouTube I didn't really get much out of it because of all the encryption in use. It's a pain to do the network sniffing since I have to pull out and connect things to an old hub and use an older computer with Win XP to do the sniffing (wireshark doesn't seem to run properly on Vista 64).


----------



## Meklos

moyekj said:


> Tivo currently only seems to accept H.264 (and of course mpeg2) for video. MP4 V2 is not supported. The AAC audio portion should be fine.


Can I interpret this to mean that the H264_med_rate profile from kmttg will not play back on a TivoHD?


----------



## moyekj

Meklos said:


> Can I interpret this to mean that the H264_med_rate profile from kmttg will not play back on a TivoHD?


 That is H.264 video, so it should work, but only after running qt-faststart on the resulting encoding.


----------



## Meklos

moyekj said:


> That is H.264 video, so it should work, but only after running qt-faststart on the resulting encoding.


I tried, and it did... so I went back and I thought that I read that the newest version had an option for doing this automatically during the process... ??

Also, do you have to perform the encode process to get the results of the captioning into the final file? Was looking at the logs and it didn't look like it really had completed, but I'm still tracing down other problems related to commercial cuts and mencode.

[edit] Realized I was trying to use the 264 medium rate instead of the tivostream_hd

To clarify, I'm actually trying two things here...

1) Encode DVD-ripped VOB and MPG files to 264-med, no commercial cut
2) Perform commercial cut on OTA-recorded shows, using tivostream-hd

I couldn't use tivostream to stream the 264 medium stuff until I ran it through qt-faststart. Having this run automatically would be nice, but I can work around that for now.

For the OTA stuff, I'm working on that now to see if I can get it to complete a full run without errors.


----------



## moyekj

Meklos, the tivostream_sd & tivostream_hd profiles encode to H.264 and run qt-faststart automatically. The h.264 medium rate is similar to tivostream_sd.

NOTE: If you read back a little in this thread we've discovered that Tivo doesn't buffer over 1.1GB worth of video when streaming to it which doesn't make streaming to Tivo very useful for any video > 1.1GB. After it reaches the limit Tivo will close down the stream so you can't watch beyond that point. This put a big damper on my enthusiasm to further enhance this application. I've tried to get more information from Tivo on a workaround to this limitation but no luck thus far...
(I added a note about this limitation on the tivostream web page a while back).


----------



## Meklos

I understand the 1.1GB limit, and I understand how frustrating it is... which is why I was trying to find the right codec for my DVD rips. I can get my DVD rips down to about 750MB per ripped episode using the 264-medium.

I figure I can stream ripped DVD episodes, but I'll have to transfer any HD stuff... but I still want to remove the commercials from the HD stuff that I record OTA.


----------



## chrisph

Just wanted to give a huge thank you to the dev. of tivostream.

After pulling my hair out dealing with TiVo Desktop (constantly locking up my PC) and not being able to get pyTivo running after many frustrating hours, I was thinking about giving up.

But tivostream does everything I need it to do! So thanks again!


----------



## moyekj

v0p11 - January 03, 2009
-------------------------
* Added folder play capability. Pressing "Play" on a folder will setup an
alphabetical playlist of video files under the folder and play them
sequentially. "Channel Up" can be used to jump to next title in playlist and
"Channel Down" to return to previous title. See documentation for details
and limitations.

* Added multiple file play capability. Pressing "Enter" in file browsing
mode will play all video files listed in current folder from the current
cursor position downwards.

* During normal single file mpeg4 streaming the program will now exit to file
browser mode once end of play is reached. (This currently only works for
mpeg4 files, not mpeg2, but see below for mpeg2).

* An optional ffmpeg entry in config.ini can be given to give full path to
ffmpeg executable for your system. When this is set, ffmpeg is used to
determine end times for mpeg2 files so that tivostream can exit back to
file browser mode automatically, or continue automatically to next file
in playlist mode.
NOTE: This is optional only not a requirement. Without this set playback
will simply pause at the end of mpeg2 files instead of exiting automatically.

* Updated documentation explaining new features and to include a summary of all remote button functions supported both in file browser and playback modes.


----------



## moyekj

NOTE: There's a bug in v0p11 with the "enter" playlist capability not picking up proper number of video files in folder. There will be a new release shortly (next day or so) to fix that issue along with some other fixes for more obscure bugs.


----------



## stag67

Newbie question. Will tivostreaming v0p8 work with Windows XP Media Center Edition?


----------



## moyekj

stag67 said:


> Newbie question. Will tivostreaming v0p8 work with Windows XP Media Center Edition?


 This application runs on pretty much anything that supports Java 1.5 or later and has ethernet support.


----------



## moyekj

v0p12 - January 04, 2009
------------------------- 
* Fixed bug with "Enter" function for multiple file playback within a file
not properly detecting all video files in the folder.

* Fixed issues with application crashing when pressing video trick functions
before playback begins.


----------



## JerseyRU

Hi moyekj, thanks for your hard work with this.

Just, curious, any word from TiVo reps on the 1.1 GB limit yet? Would be nice to stream bigger files.


----------



## moyekj

JerseyRU said:


> Hi moyekj, thanks for your hard work with this.
> 
> Just, curious, any word from TiVo reps on the 1.1 GB limit yet? Would be nice to stream bigger files.


 Unfortunately not. I do have a possible workaround in mind which may work for mpeg2 files:
* For mpeg2 files > 1GB split up streaming of the file into up to 1GB segments. i.e. Segment 1 would stream until 1GB limit, then when the 1GB point is reached in playback automatically stop the stream and start new stream of same file, but offset to start playing at the 1GB mark. Repeat for any additional 1GB segments.

Of course the above means there will be an interruption of play between segments and unfortunately only would work for mpeg2 files since Tivo needs to see the start of mpeg4 files (the whole qt-faststart nonsense) to work.

Of course in English it sounds a lot easier than actually programming the above and only would work for mpeg2, so I'm still wondering if it would be worth the effort to implement?

Another possibility is to transcode non-mpeg2 files to mpeg2 using ffmpeg and then adding the above segmenting concept such that capability works for video files in general, but that would take even more effort to integrate ffmpeg transcoding into the application (and make it platform specific for ffmpeg binaries).
wmcbrine's VLC/HME video streamer may be a better/easier platform for adding such capability as he already has integration with VLC built in.

For those reading this thread any opinions/suggestions?


----------



## windracer

I guess I never noticed before but on my S2, tivostreamer shows up as "Video Streamer (v0" instead of "Video Streamer (v0p11)". Not a big deal since it's not supported on the S2 anyway but wanted to point it out.


----------



## bluehz

Been trying all day but no matter what format I convert video to (mpg, mp4, etc) I can see the video on Tivo box, but any attempts to play it yields:

An error occured while running the application. The application closed during a read (0X50006)

And thats as far as I get. Like I said - have tried several different formtas, qt-quickstart, etc.

Mac OS X 10.5
tivostream (0.12)
Tivo S3 HD

Also - I am currently running streamer from Galleon, but I get same results when launching autonomously.

Any suggesstions? I have tried multipled transcoding to various formats using ffmeg (and others) and stil no luck - I feel that at this point its more to it than the format.

thx


----------



## moyekj

bluehz said:


> Been trying all day but no matter what format I convert video to (mpg, mp4, etc) I can see the video on Tivo box, but any attempts to play it yields:
> 
> An error occured while running the application. The application closed during a read (0X50006)
> 
> And thats as far as I get. Like I said - have tried several different formtas, qt-quickstart, etc.
> 
> Mac OS X 10.5
> tivostream (0.12)
> Tivo S3 HD
> 
> Also - I am currently running streamer from Galleon, but I get same results when launching autonomously.
> 
> Any suggesstions? I have tried multipled transcoding to various formats using ffmeg (and others) and stil no luck - I feel that at this point its more to it than the format.
> 
> thx


Give a known good file a try:
systm--0063--dolby--hd.h264.mp4
If still no luck reboot your Tivo and try again. If that one works and yours do not then it's likely a format issue, though with mpeg2 pretty much anything standard should play.


----------



## Laserfan

moyekj said:


> I do have a possible workaround in mind [for the 1Gb limitation] which may work for mpeg2 files: * For mpeg2 files > 1GB split up streaming of the file into up to 1GB segments.... any opinions/suggestions?


Well, I for one have a rather low level of enthusiasm for anything MPEG2 these days. Most of my MPEG2 source is DVD, for which I have plenty of playback options.

But if the MPEG2 is a large file HD off the Tivo originally, my inclination is to re-encode as .264 and archive it as a Blu-ray disc (DVD-5 or -9) given 264's exceptional quality-to-size ratio (rather than keep the MPEG2 around, which for even 1 hour TV shows is ~5Gb in size). So my excitement over Tivostream was that given my new inclination to save everything to BD, I might stream the m2ts files to one of my HDTVs that has a Tivo but no BD player.

Does that make sense...I'd be unlikely to use the feature.


----------



## moyekj

Laserfan said:


> Well, I for one have a rather low level of enthusiasm for anything MPEG2 these days. Most of my MPEG2 source is DVD, for which I have plenty of playback options.
> 
> But if the MPEG2 is a large file HD off the Tivo originally, my inclination is to re-encode as .264 and archive it as a Blu-ray disc (DVD-5 or -9) given 264's exceptional quality-to-size ratio (rather than keep the MPEG2 around, which for even 1 hour TV shows is ~5Gb in size). So my excitement over Tivostream was that given my new inclination to save everything to BD, I might stream the m2ts files to one of my HDTVs that has a Tivo but no BD player.
> 
> Does that make sense...I'd be unlikely to use the feature.


 Understood. Unfortunately the same trick can't be applied to mpeg4 files because Tivo has to see the start of the mpeg4 file to read information about the stream, thus using a file offset sent to the Tivo doesn't work as it does for mpeg2.
Given the amount of effort involved and low interest I don't plan on implementing it.
Perhaps better time is spent trying to figure out a way to tell Tivo to allocate a bigger buffer somehow which would be the ultimate solution. Just frustrating that Tivo doesn't seem to want to throw us HME developers a bone to help us out. Maybe I just haven't found the right Tivo contact...

So the only suitable workaround to the 1.1 GB file limit right now is to split up any videos larger than that into multiple parts and then use the folder play or multiple file play option in tivostream v0p12.


----------



## windracer

windracer said:


> I guess I never noticed before but on my S2, tivostreamer shows up as "Video Streamer (v0" instead of "Video Streamer (v0.11)". Not a big deal since it's not supported on the S2 anyway but wanted to point it out.


Looks like this is a bug in the S2 software. It's the period that's truncating the name of the app ... same behavior with 0.12.

Is it really necessary to have the version number there anyway?


----------



## moyekj

windracer said:


> Looks like this is a bug in the S2 software. It's the period that's truncating the name of the app ... same behavior with 0.12.
> 
> Is it really necessary to have the version number there anyway?


 Not necessary, but somewhat useful to know what version you are running (or if I'm helping someone debug to have a quick, definite way to know what version they are running).


----------



## bluehz

moyekj said:


> Give a known good file a try:
> systm--0063--dolby--hd.h264.mp4]systm--0063--dolby--hd.h264.mp4
> If still no luck reboot your Tivo and try again. If that one works and yours do not then it's likely a format issue, though with mpeg2 pretty much anything standard should play.


No luck with the known working file. The exact log message I am seeing in the console at the moment when I attempt to play the files is:

LOG: Unexpected error: java.lang.NoSuchMethodError: java.io.File.canExecute()Z

FWIW - I read somewhere (i think earlier in this thread) to use the full path to the java executable when launching had helped another mac user - but it made no difference here


----------



## bluetex

bluehz said:


> No luck with the known working file. The exact log message I am seeing in the console at the moment when I attempt to play the files is:
> 
> LOG: Unexpected error: java.lang.NoSuchMethodError: java.io.File.canExecute()Z
> 
> FWIW - I read somewhere (i think earlier in this thread) to use the full path to the java executable when launching had helped another mac user - but it made no difference here


I'm getting the same message when trying to play a .vob. When I go back to v0.10 it plays. I think there may be an issue with the distribution?


----------



## bluehz

bluetex said:


> I'm getting the same message when trying to play a .vob. When I go back to v0.10 it plays. I think there may be an issue with the distribution?


BOOM!! Reverting to v0.10 does indeed work. Tried v.011 with no luck either. Not only does it work, but it is playing back mp4 output from iMovie without having to run them through qt_quickstart!

There is definitely some Mac issue with v0.12...

Thanks for the tip bluetx!

PS - oddly though I am unable to launch v0.11 using the run_unix script, but I can manually run the same cmd inside the run_unix script in the console and it works fine... not sure about that.. perplexing.

PSS - it is also working from within Galleon


----------



## moyekj

bluehz said:


> No luck with the known working file. The exact log message I am seeing in the console at the moment when I attempt to play the files is:
> 
> LOG: Unexpected error: java.lang.NoSuchMethodError: *java.io.File.canExecute()*
> 
> FWIW - I read somewhere (i think earlier in this thread) to use the full path to the java executable when launching had helped another mac user - but it made no difference here


 It's pretty clear from that message the issue, so thanks for the posting. It looks like on Mac platform version of Java the canExecute() method is missing (this is what I use to check for existence of ffmpeg). (works fine on windows & probably unix/linux platform). For next release I can switch to the more conventional exists() method and that should solve the problem for Macs.


----------



## Laserfan

Regarding special handling of MPEG2 to work-around the 1.1Gb limit:


moyekj said:


> Understood. Unfortunately the same trick can't be applied to mpeg4 files because Tivo has to see the start of the mpeg4 file to read information about the stream, thus using a file offset sent to the Tivo doesn't work as it does for mpeg2. Given the amount of effort involved and low interest I don't plan on implementing it. Perhaps better time is spent trying to figure out a way to tell Tivo to allocate a bigger buffer somehow which would be the ultimate solution. Just frustrating that Tivo doesn't seem to want to throw us HME developers a bone to help us out. Maybe I just haven't found the right Tivo contact...
> 
> So the only suitable workaround to the 1.1 GB file limit right now is to split up any videos larger than that into multiple parts and then use the folder play or multiple file play option in tivostream v0p12.


At least my "The Fugitive" episodes stream in their entirety, as they're about 800Mb each! 

I agree w/your thoughts. I have to wonder though, with all the emphasis TiVo has placed on broadband access lately (isn't there a Netflix option? what of The Dark Knight email I got from them yesterday? I don't use broadband so don't follow this at all) does this mean there is no such limitation for certain TYPES of streaming, only the type you & wmcbrine are utilizing? Not sure what the difference is if any...


----------



## moyekj

Laserfan said:


> I agree w/your thoughts. I have to wonder though, with all the emphasis TiVo has placed on broadband access lately (isn't there a Netflix option? what of The Dark Knight email I got from them yesterday? I don't use broadband so don't follow this at all) does this mean there is no such limitation for certain TYPES of streaming, only the type you & wmcbrine are utilizing? Not sure what the difference is if any...


 We are using the YouTube style "streaming" which is really a buffered download but unfortunately with a fixed 1GB buffer. Netflix streaming is more like true streaming since there appears to be little to no buffer on the Tivo, so that implies there must be some HME protocol which allows some control over streaming style but it has not been uncovered (yet). Personally I do like having the buffer on the Tivo since it allows smooth trick function use, just hope to find a way to increase the buffer or at least make it a circular buffer similar to live TV style buffers.


----------



## bluehz

moyekj said:


> It's pretty clear from that message the issue, so thanks for the posting. It looks like on Mac platform version of Java the canExecute() method is missing (this is what I use to check for existence of ffmpeg). (works fine on windows & probably unix/linux platform). For next release I can switch to the more conventional exists() method and that should solve the problem for Macs.


Hey thats great news we were able to give you some clues for a solution. Credit goes to bluetx though for suggesting downgrading. Funny how we forget the simple solutions. Let me know if you want someone to beta test the next release on Mac platform - will be more than happy to help out.

FWIW - v0.10 is running beautifully here under Galleon on an old Mac G4 with Mac OS X 10.5.x


----------



## moyekj

v0p13 - January 09, 2009
------------------------
* Macintosh platform compatibility fix (versions v0p11 & v0p12 were not
working on Mac java due to Java.io.File.canExecute method missing for
that platform).

If someone on Mac platform could please confirm the fix that would be great.


----------



## bluehz

moyekj said:


> v0p13 - January 09, 2009
> ------------------------
> * Macintosh platform compatibility fix (versions v0p11 & v0p12 were not
> working on Mac java due to Java.io.File.canExecute method missing for
> that platform).
> 
> If someone on Mac platform could please confirm the fix that would be great.


CONFIRMED WORKING Mac OS X 10.5.6

Thanks moyekj - that was fast! Played darn near everything I could throw at it including all the MP4 I have straight from iMovie edits. No need for qt_quickstart.

One thing on Mac platform there seems to be a problem with the IP identification. I always need to edit the run_unix.sh and add "--intf IP_ADDRESS" to get tivostream to use the proper IP address.


----------



## Laserfan

moyekj said:


> We are using the YouTube style "streaming" which is really a buffered download but unfortunately with a fixed 1GB buffer. Netflix streaming is more like true streaming since there appears to be little to no buffer on the Tivo, so that implies there must be some HME protocol which allows some control over streaming style but it has not been uncovered (yet)...


Thanks for your reply, and good luck--glad you are on the case!!!


----------



## westside_guy

This may be a dumb question - but how can I get the source for the current release version? When I grabbed the source per instructions on the website (using svn), it still has the f.canExecute() line in ViewScreen.java - so it seems like that's not the most current version.

Also, should step 7 in tivostream_build.txt state to create "com/tivo/hme/videostream" rather than "com/hme/tivo/videostream"?

I'm interested in the source because I want to add a "video/mp4" mimetype for .m4v files - it'd be a pain to rename all of them to .mp4 .


----------



## Emillion

Thank you for the "play folder" Kevin! Useful for playing DVD folders and Music Video folders. Any thought on the "random list" feature, maybe with the "right" action (since Play and Enter are taken)?
It does not need the ffmpeg setting to create the list - but it needs it to auto-jump to the next list item, right?


----------



## moyekj

westside_guy said:


> This may be a dumb question - but how can I get the source for the current release version? When I grabbed the source per instructions on the website (using svn), it still has the f.canExecute() line in ViewScreen.java - so it seems like that's not the most current version.
> 
> Also, should step 7 in tivostream_build.txt state to create "com/tivo/hme/videostream" rather than "com/hme/tivo/videostream"?
> 
> I'm interested in the source because I want to add a "video/mp4" mimetype for .m4v files - it'd be a pain to rename all of them to .mp4 .


 Sorry, haven't updated the source to match v0p13 yet (it is a one line change for that plus a one line change in GLOBAL.java for version update). My linux box I do svn from is down this weekend but will be back up tomorrow at which point I'll update the source. com/hme/tivo/videostream is correct as per build instructions.


----------



## moyekj

Emillion said:


> Thank you for the "play folder" Kevin! Useful for playing DVD folders and Music Video folders. Any thought on the "random list" feature, maybe with the "right" action (since Play and Enter are taken)?
> It does not need the ffmpeg setting to create the list - but it needs it to auto-jump to the next list item, right?


 I'll add random play folder order in todo list. Yes, ffmpeg is only needed to help detect end of play for mpeg2 files (so that it can jump to next file in playlist automatically). If you don't specify it then for mpeg2 files you have to use channel down to jump to next title once pause at end of play is reached.


----------



## westside_guy

moyekj said:


> Sorry, haven't updated the source to match v0p13 yet (it is a one line change for that plus a one line change in GLOBAL.java for version update).


Thanks much - I think I know what the two one-line changes are (based on your recent previous posts). I just didn't know if there were other changes as well.

I appreciate the fact that you've made the source available - thank you. I haven't actually done any programming in java for quite a few years; but what I wanted to accomplish was very straightforward.


----------



## txporter

westside_guy said:


> I'm interested in the source because I want to add a "video/mp4" mimetype for .m4v files - it'd be a pain to rename all of them to .mp4 .


BTW, if you want to change the extension in windows, I am pretty sure you can make a batch file (rename.bat or something like that), that can change everything in the current directory. It needs to have 'rename * *.mp4' or maybe 'rename *.* *.mp4' in it. Been a while since I have done it.

Jason


----------



## Sicklybutsexy

I've downloaded the latest tivostream file and whenever I try to run the .bat file the cmd window comes up for a brief second (not long enough to read it) and then nothing. Anything I'm doing wrong? I've download the latest java.


----------



## westside_guy

txporter said:


> BTW, if you want to change the extension in windows, I am pretty sure you can make a batch file (rename.bat or something like that), that can change everything in the current directory. It needs to have 'rename * *.mp4' or maybe 'rename *.* *.mp4' in it. Been a while since I have done it.


I could script it - I'm on a Mac, and know the bash shell pretty well. But I'd also have to script around the pyTivo metadata files (the ones I have anyway); plus more importantly it'd kill my ability to use anything Quicktime-based to play those files. VLC and MPlayerOSX have improved by leaps and bounds over the past couple of years, but IMHO they still don't work nearly as well as Quicktime does.


----------



## moyekj

Sicklybutsexy said:


> I've downloaded the latest tivostream file and whenever I try to run the .bat file the cmd window comes up for a brief second (not long enough to read it) and then nothing. Anything I'm doing wrong? I've download the latest java.


Start a cmd window (Start->Run... and type in cmd) and then go to the directory where the run_win.bat script is (using cd command) and then run the script there (just type run_win). That way you will be able to see the error message.
My guess is you don't have java in your path. If that's the case either add java to your windows path or edit the run_win.bat script and replace "java" with the full path to java.exe.


----------



## Sicklybutsexy

I'm an idiot. I didn't have runtime environment. now it works.


----------



## bluetex

How is everyone else dealing with the need/want to run the tivostream as a service and not having to have the console window running all the time?

I've downloaded this "wrapper" .. the gpl version. 
http://wrapper.tanukisoftware.org

Anyone else have a more elegant solution? This works, but you have to know how to monkey around with java to make it go.


----------



## westside_guy

bluetex said:


> How is everyone else dealing with the need/want to run the tivostream as a service and not having to have the console window running all the time?
> 
> I've downloaded this "wrapper" .. the gpl version.
> http://wrapper.tanukisoftware.org
> 
> Anyone else have a more elegant solution? This works, but you have to know how to monkey around with java to make it go.


I haven't used Windows as my primary OS for several years - but there is/was a freeware tool (FireDaemon) that can be used to add most anything to the list of services. I wouldn't recommend it to someone who's not comfortable administering Windows, since messing with services can cause serious breakage; but I found it very useful on occasion, and think it'd fit the bill perfectly.


----------



## wmcbrine

bluetex said:


> How is everyone else dealing with the need/want to run the tivostream as a service and not having to have the console window running all the time?


The minimize button?


----------



## windracer

bluetex said:


> Anyone else have a more elegant solution? This works, but you have to know how to monkey around with java to make it go.


I run tivostream through Galleon on Linux (which, coincidentally, uses the same wrapper).


----------



## bluetex

wmcbrine said:


> The minimize button?


LOL. That's an elegant design? I didn't want to have the command box minimized any more than I want to have it maximized.


----------



## moyekj

Keary has released a new and much improved HME streaming video application. Check it out:
TCF thread
streambaby home page

For any of you who are using tivostream or tried it before and weren't happy with it this is a must try. Keary did an excellent job adding new features, especially the random access anywhere in a video (even for mpeg4) and the workaround for the 1.1GB limit - stream is automatically restarted at the point where buffer ends while you are playing. The preview method ala Tivo/Netflix implementation is also a very cool feature, not to mention transcoding of incompatible streams such that you can stream a wide variety of videos (similar to pyTivo).

This application obsoletes tivostream so I don't plan any more updates for tivostream.


----------



## Laserfan

moyekj said:


> Keary has released a new and much improved HME streaming video application. Check it out....This application obsoletes tivostream so I don't plan any more updates for tivostream.


Lessee if I can spel this rite w/o a dictionary: How very magnanimous of you! Thanks for tivostream (and the memories)! :up:


----------



## Sevenfeet

Thank you Moyekj for all your work with Tivostream over the last several months and to allow its use to kick off Streambaby. You're a great developer who always listened to the users and tried your best to give us what we wanted. Thank you.


----------



## moyekj

Thanks guys. Enjoyed it. My first experience with HME and Java so I learned a lot in the process.


----------



## westside_guy

As others have said, thank you moyekj for all the work you did on this, and are continuing to do in collaboration on the streambaby project.

I hope you will leave the tivostream info, source, and downloads available on Google Code for a while. I know that streambaby is likely the future, but IMHO for streaming h.264 video it's not yet quite on par with the current (final) state of tivostream in terms of problem-free viewing.


----------



## kearygriffin

Just wanted to throw my 2-cents in here and thank moyekj also, both for all the work on tivostream and his help with streambaby.

I have to admit I was a little nervous when I first contacted him about streambaby, as I wasn't sure how he would react to a fork of tivostream. The offers of support/assistance/testing came immediately (all of which I took advantage of


----------



## aburt

scronin said:


> I've been looking all over trying over google and this thread trying to determine how to simply launch tivostream via galleon. I'd really like tivostream to always be running, and be in the background as a service on my always on desktop pc. What do I need to do to make this happen? what should my launch.txt file look like? Is there a way to makek tivostream launch as a service in windows vista other than via galleon, or can it be accomplished in another manner? I appreciate your help. I'm just not as techie, as you guys, and I must say i'm EXTREMELY impressed with the capability of both tivostream!!
> Steve


If anyone's still looking for an answer to how to launch batch files at boot in the background on XP (without a task bar icon or command window), one way to do it is to put the .bat file into the Scheduled Tasks list (start -> all programs -> accessories -> system tools -> scheduled tasks), set to run at startup and run as user "NT AUTHORITY\SYSTEM" (without quotes; note space after NT and backslash before SYSTEM; this is in the properties dialog for the entry).

Thanks to everyone who's worked on the streamers -- absolutely fabulous.


----------



## mbagshaw

It looks like there haven't been any posts on this forum since 2009, but I have just downloaded and installed version of StreamBaby released only recently so I gather it is still an active program.

I installed the program, changed the .ini file to point to my videos and launched the .bat. TiVo then lets me find the videos okay, but when I press PLAY I get an error x0ffff. Looking at the .bat window I get the following message is when I start StreamBaby:

Initializing StreamBaby v20111203-2132...
12/27/11 15:56:04 FFmpegJavaVideoModule: Unable to load FFmpeg native libraries
12/27/11 15:56:04 Listener: added factory
12/27/11 15:56:04 Main: streambaby ready & listening.

Is the message about not loading the FFmpeg native libraries the problem? If so, how do I fix this?


----------



## windracer

This is the really old thread. Try the current one.


----------

