PDA

View Full Version : Tivo video server/client


jmoak
02-08-2002, 10:27 AM
I started a thread over at avs about a local video server for series 1 tivos. In effect, turning the tivo's into clients.

It involved PlayBack, playitsam and some manual playback methods.

TheDoctor was even posting about a new version of PlayBack!

Let's just say that I was asked not to go into any details on how to do some of these things, and that the discussion of the extraction of even raw tystreams was against the wishes of the managment.

As the next logical step in the disscussion was how to do some of these things, it could not continue there.

Thats why I'm here.

Shall we continue here?:)

I'm no expert, but I'll try this weekend to post some details and how to's. As some of the folks here are way beyond me, I ask you guys to keep an eye on this thread, correct me where I'm wrong and if you have any ideas or comments, Please join in!!!!

Thanks!

jmoak

grgcombs
02-08-2002, 10:48 AM
Lay it on me, I'm ready to see the light.

g

jmoak
02-09-2002, 10:17 PM
on second thought, the beginning of this might be better suited for a newbie forum. I hope this gets a little more in depth as we go along. mods? whadoyathink?

I was hoping we could build a ui around some of the software out there, but that actually may already be in development somewhere around here....;)

To start with, I'm going to assume that you have a standalone, a tivonet and a connection to another machine.(nfs, samba/ win, linux, etc..)

You can play mpegs on the tivo (mpeg 1 or 2), if you can de-mux them into separate audio/video files. There are a few programs out there that can do this easily. Tmpeg and MPEG2VCR are two, for example. You can also use the raw m2a/m2v files that ExtractStream gives you.

The hardware on the tivo is surprizingly robust. It has not failed to play any mpeg1 or 2 files I've thrown at it.

I use to shutdown myworld completely as the first step in playing a file, but embeem says:

"hmm.. you could shutdown myworld but there's no point.

All you have to do is simply suspend the processes that provide output like the mpeg decoder and the user interface (TvMomMpegSink and ContextMgr respectively) then when you're done messing around with the mpeg device you can resume the previously suspended processes. If you did it right the live buffer and current recording would be unaffected, provided that you didn't put too much of a load on the system."

This is actually very cool! Simply suspending TvMomMpegSink and ContextMgr to play an external file will allow us to do it without stopping the regular jobs the tivo is normally doing. This means that we can play a mpeg and still have the tivo doing it's regular recording jobs at the same time, I believe. ...as long as we're not taxing the system too much....

In order to have access to the audio hardware on the tivo, you have to use a file called "audioctl", brought to us by the good people at http://tivo.samba.org/download/mbm/bin/ .(embeem)
(while your there, check out "madplay". it's suppose to be a tivo mp3 player! it's just commandline, but wha do ya want for 'nuttin, eh??;))

"audioctl off" allows us to stop the tivo from using the audio hardware and lets us feed the audio file for playback.

...now on this subject, embeem says:

"I should also point out that audioctl completely disables audio video synchronization so there's a high probability of the audio and video being out of sync on anything longer than a few minutes."

So far, I haven't had a problem with this, but most of my files are between 5 and 30min long. I have no idea what would happen if you did it with a hour and a half movie......

I think he may have been hinting that there is another way to get audio playback to work without "audioctl off", but so far I can't figure out how and he's not telling. If anyone has any clues....:)

Now, once you've run "./audioctl off" and have access to your a/v files, your ready to cat 'em to the approprate devices.

(assuming you've mounted your share at /mnt)

cat /mnt/Dreams.m2v > /dev/mpeg0v & cat /mnt/Dreams.mp2 > /dev/mpeg0a

...and watch your vid on your tivo!!!!

I wish there was some way we could do this and still have access to the remote functions, but we gotta crawl before we can walk, eh?

If you want to kill it before it's through, you can "ctl/c" to kill the audio and get the pid for the video by "ps ax" and kill it that way.

When your done run:

./audioctl on

and resume TvMomMpegSink and ContextMgr and umount your share.

...if all else fails reboot!

I also want to give a big THANKS! to Vadim and the mods here. Some of the best work in tivoland has come from this board in the last few months.....

If anyone has any better ways of doing this, or if I'm doing something the hard way, let me know!!!!

TheDoctor
02-11-2002, 06:35 PM
One problem with resuming those paused processes I found during testing was that all of the buttons on the remote I had pressed during testing were played back when the context mgr was resumed.

TheDoctor
02-16-2002, 09:51 AM
I never heard back from the alpha tested so this may have toasted his system. I have used it on several systems with no loss of data.

It provides on screen control of MP3 playback, as well as shows from local storage or the server.

It allows editing of shows on local storage for export to the server, as well as batch transfer.

It allows a choice of software or hardware based buffering. (Hardware requires special hardware config.)

It allows buck save to VCR.

The playback element runs on 1.3, 2.0 and 2.5.1 StandAlone units. The batch extraction program can used with DTV 2.0.

It requires the PC and PVR have access to common storage. (I used samba for testing.)

There should be full support for Philips remotes, partial for Sony remotes. (Each version of the remotes seem to change the values for 1 or 2 keys, and there is a limit to the number of remotes I am going to buy!)

THIS IS BETA SOFTWARE-BACK UP YOUR MACHINE!!!

TheDoctor
02-16-2002, 09:52 AM
THe manuals

TheDoctor
02-16-2002, 01:36 PM
If you get an error about mswinsck.ocx then you should be able to register the missing ocx with the attached.
command line is:

regsvr32 mswinsck.ocx

you will have to reboot your windows machine before using. Only install this if you get an error message.

grgcombs
02-17-2002, 04:27 PM
Waiting to get a TivoNet, (soon!) for at least one of the DirecTivo's and then I'll be giving this a try.

You said playback won't work on DTivo's, once I get set up is there anything I can do to help debug issues for you?

G

TheDoctor
02-17-2002, 06:50 PM
I probably won't let get around to trying to add playback to the Dtivo will the 0.4 series. Audio playback is possible by piping the audio data to madplay, but CPU utilization is to high and sync keeps dropping out. I will probably go back to splitting the streams on the server and pipe the data in from there.

For the 0.3 series I am working on allowing background recording.

el jefe
02-18-2002, 08:39 PM
Now, I'm not sure if I did all of this correctly, but when I run the PBC.EXE, set the IP address and directory, then hit the Philips PVR button it blanks my video, then shows the Philips animation, but then it just stops with the blank animation thing running.
ps shows ./vplay, cat, .osdtxt and a bunch of /bin/bash -login.
I have a lot of shows on the TiVo so I left the Last 6 option selected.
If I hit the compass comtrol a few times, the PC gives me a Run-time error '380': Invalid property value.

My /mnt/playback and c:\playback\ directories are identical.

This is on a Phillips TiVo running 2.5.1 upgraded from 14 hrs to 82 hours.

Any idea what's going wrong?

TheDoctor
02-19-2002, 01:52 PM
I will have to try to recreate. How long did you let if run, before trying to force a response? Also, have you tried letting PBE extract a few shows, and was it successful?

I will have to do some more testing on heavly loaded systems. I will also try to add some type on on screen indicator that the system is still pulling data, as it can take minutes to build the display for PVR storage. You might look on your network card and see if the lights are flashing.

I will try to post an update by the weekend.

el jefe
02-20-2002, 12:12 AM
I let it run for probably at least 15-20 minutes before doing anything. I haven't tried extracting anything to use the server option until now, but it doesn't really seem to be working either. It listed a bunch of numbers (around 85) in the top window, then one line saying Program= some number, but the bottom window is blank (stream description), and it doesn't seem to be doing anything at all.
I did notice that the /mnt/playback directory on the TiVo does have the same files listed as the Windows computer, but it some of the files are listed with what looks like the DOS filenames (ie. mfs_ex~2), but if I do ls mfs_export it shows with the complete name, so I'm not sure it's really a problem.
I guess I can leave this PBE running for a while to see if anything happens.

edit:

Ok, I let PBE run for over an hours and it didn't seem to do anything else. Then I started PBC and let it run all night, and I still have a blank screen with just the menu backbround.

TheDoctor
02-20-2002, 05:21 PM
Sound like you gave it plenty of time.
Please make a log of 'ls -al' and then
try the following from the Bash prompt: (The values will change for your system.) It sound like it may not be finding the schema.txt entry to decode the field names. The samba client for the PVR does not seem to support all options and filename mangeling or permissions may be messing things up.

bash-2.02# ./mfs_ls /Recording/NowShowing
dir: fsid=2883 count=32
fsid type name
-----------------------------------
269890 tyDb A:88262:17201:269890
^^^^^^
243418 tyDb A:88262:76600:243418

bash-2.02# ./mfs_dumpobj 269890
Showing 269890/11 {
Date=11737
Duration=3600
Program=242151/-1
^^^^^^^^^^^^^^^
Reason=2
Station=3710/-1
Time=82800
IndexUsedBy=269890/10
}
RecordingPart 269890/12 {
File=276373
Begin=0
End=1435052
}
bash-2.02# ./mfs_dumpobj 242151
ApgProgram 242151/11 {
Category=11403640 11403648 11272297 11272316
}
Program 242151/10 PRIMARY {
Version=1
ServerId=A00004249
ServerVersion=3
Actor=Shatner|William Nimoy|Leonard Kelley|DeForest Doohan|James Nichols
|Nichelle Takei|George Koenig|Walter Barrett|Majel
ApgProgram=242151/11
DescLanguage=English

TheDoctor
02-20-2002, 08:20 PM
Attached is 0.3.1 beta.

1) Contains fix for chunks with more than 255 records.
2) Allows for playback sources to be changed without restarting program.
3) Should allow background recording by native software.
4) Provides a mouse based ..remote..
5) Allows the program to monitor the native software for a ..launch sequence.. from the remote.
6). Provides a little debug info for NativePVR showlist.

TheDoctor
02-20-2002, 08:21 PM
Doc's update...

el jefe
02-20-2002, 11:45 PM
Ok, I ran what you said, but the mfs_dumpobj doesn't seem to be working..
I got the same result for any that I tried from the list.
(The mfs_dumpobj 55100/-1 works fine, by the way)

bash-2.02# ./mfs_dumpobj 57955
Showing 57955/11 {
Program=55100/-1
Station=2021/-1
Date=11218
Time=73800
Duration=1800
TvRating=4
Bits=3
DontIndex=1
Reason=3
Genre=25 91 1002
SeriesId=55099
IndexUsedBy=57955/10
}
RecordingPart 57955/18 {
File=76374
Begin=-2000
End=1802000
}
Recording 57955/10 PRIMARY {
Version=59
Showing=57955/11
RecordQuality=40
Score=0
BitRate=0
Part=57955/18
State=4
StartDate=11218
StartTime=73798
StopTime=75602
ExpirationDate=24855
ExpirationTime=0
SelectionType=3
DeletionTime=0
DeletionDate=0
StopDate=11218
NSecondsWatched=23
NVisit=4
ERROR: Didn't find fsid=0!

I guess this is what you want as the log of ls -al in the attatchment..

Thanks for the help..
el jefe

TheDoctor
02-22-2002, 02:43 AM
Quick poll...

Has anyone gotten one of the beta's released here to run?

I did hear back from my alpha tester that the alpha ran. It may be that when I am zipping things for this batch that I am missing something important. I have verified the program on a couple of pc's ranging in speed from 100mhz to 800mhz, but that was using the same software directory.

I have modified a version of PBE for debuging purposes, since I understand that 'el jefe' was unable to run it as well. I have not had a chance to test it yet, but will later this morning. It will produce a detailed log that can be zipped and sent back to me.

el jefe
02-22-2002, 04:56 AM
I download the newer version, and it has fixed the problem I was having with the mfs_dumpobj. Now when I connect to the Phillips PVR, I see the status (windows title) scrolling through objects. I accidentally unchecked the 'Last 6 PVR', so I have a feeling it will take a while to finish this, but I'll edit once I know what the final result is.

Thanks,
el jefe

edit:

I ran it and everything I've tried works fine. Thanks you, 'The Doctor', for the help.

maxx22
02-22-2002, 12:06 PM
i have a phillips sa 2.5.1. i tried the .3 beta and could only play video if i browsed for the fsids manually. playback on it's own just put a zero out to the bash prompt and hung there. .31 somehow fixed that though so now i can run just playback and browse through my now playing list using the remote. coolest thing about it is that multiple files will run...so finally i have a way to batch save all my cowboy bebops to vcr! thank you doctor!

background operations don't work for either version...i started a manual record and checked the timestamp when i ran playback...ran through some tests and then rebooted. the manual recording stopped right at the point i started playback. tried setting a manual for 10 minutes, started playback when it was five minutes in, played for 10 minutes and noticed that the red light never shot off. rebooted and sure enough there was only five minutes on the manual record.

all functions work(fast foward, rewind, chunk foward, pause, etc) except clear. i am using a urc-8800 with the hacked tivo protocol...i'll have to steal my brothers peanut to see if it's just a minor difference in the code it recieves. is there a way to invoke the clear manually? i noticed that the bash provides feedback(PLAY, FAST FOWARD, etc) when a button is pressed. i tried typing clear and enter and it restarted the playback to the beginning. running through the program it still shows all parts that where marked for clearing...so it didn't work.

again, excellent work. let me know if i can help out in any way.

TheDoctor
02-22-2002, 06:07 PM
max22,

Make sure the filename schema.txt is in lowercase. That should allow menus/auto extraction under 2.5.1. Somewhere in the copy process it got messed up on it way to the origional zip file.

Background recording does not work with the command line, it must be selected via the GUI. And the GUI must launch playback for it to work. There are a slew of other command line options used by the program. As I have not finalized them, they are not documented. (Feel free to thow a packet sniffer at them. Don't be pissed if they change.)

The clear button provides no feed back (att), it just clears the skip sets out of memory.

Thanks for the feedback.

Playing around today, I noticed that enabling the some other functions had disabled the MP3 playlist. Attached is a corrected version of PBC.

AlphaWolf
02-24-2002, 05:50 PM
Awesome little project you guys have running here. I would love to assist in the beta testing. I am very willing to allow anything that is potentialy very deadly destructive on my hardware (in fact, I like doing it :) )

A few questions first though, is dtivo currently under active developement yet? (I dont own an SA tivo), is a tivonet/turbonet an absolute necessity? (I don't have one yet)

TheDoctor
02-24-2002, 09:04 PM
Limited effort being thrown at dtv at this time. The video plays back fine, and video/audio can be extracted. Audio playback does not work. I have been working to get the audio to play via madplay. Have limited luck so far.

TheDoctor
03-03-2002, 03:01 PM
This is an updated version of playback and pbc.exe.

Should correctly handle more than 255 frames per chunk (I sent wrong copy last upgrade.)

Reduced pauses then changing playmodes. (ff/rw/play)

Smoother ff/rw/jumps.

Allows audio resync by pressing play.

Better audio sync with VBR recordings. (You should be aware that this increases sync problems with higher/fixed bitrate recordings...)

More stable interface.

Still working on DTV audio...I can produce static now...

TheDoctor
03-04-2002, 06:27 PM
Finally figured out what I was doing wrong with madplay on dtv. I should be posting a dtv version in a few days. (I just have to build this house of cards a little higher...)

I also have improved audio sync some more for SA's...

michaelk
03-05-2002, 10:11 AM
awesome work!

Thanks for the effort.

Anxiously awaiting turbonet boards for my dtivos to start experimenting myself.

DBordello
03-16-2002, 11:22 AM
I am a little confused here :)

I am VERY intrested in being able to play files from other tivos or the server.

With Pdc, do you select which file to play on the computer, or do the recordings show up in the now playing list on the tivo? I assumed it was the computer, but then someone stated that it could be done from Now playing.

Exactly, what do you do (and from where) to get this to work. I do not have a turbonet card yet, but am very very interested.

Thx
db

TheDoctor
03-17-2002, 08:08 PM
Download the last documentation zip file.
The program (PBC) can sleep, awaiting for a wakeup keep sequence from the remote.
When running the program kill or suspends normal tasks and put up it own menu. Show are organized by series title on the left side of the screen, episode number/title on the right and partial description at the top.

Shows can be selected/controlled with the remote or the computer.

Playback is currently possible on series 1 stand alones.

Sync control of audio playback on dtv units is stall causeing problems, and so that has not been released yet.

PBE can extract problem from standalone (series 1) or DTV units running 2.0 and store them on the server.

TheDoctor
03-18-2002, 06:23 PM
Got my Turbonet cards today...Initial testing looks VERY good. Playback now passes the 'buffy' test. Buffy on FX is one of the highest bit rate shows on DTV. Playback on a SA unit using only software buffering plays back smoothly. WIll have do do more testing. There were some startup issues, the program was unable to suspend background tasks on startup.

One thing I did notice was that under 1.3 I could not get smbmount to work.

willieb
03-25-2002, 10:19 PM
Hey Doctor,
Have you taken a look at playitsam at all? I have been toying around with it a little lately, and I have gotten pretty good results. I can play back my High Qual files from my server with no glitches, etc.
I have not tried playback yet, but it looks to be more fully featured at his point. The one thing that I initially see as better about playit sam is that it doesn't require a samba mounted drive on a windows box. Am I wrong that play back requires samba? I read your docs, but I couldn't tell. Have you considered implemeting something like playit sam's tyserver code to connect the tivo to a win box? If not I will have to try and figure out a way to connect my win2k box to the tivo using samba -- Never tried it before, don't know where to start, but always up for a challenge! I've heard it isn't that hard but is a lot slower than other methods like netcat. Just curious. Thanks.

WillieB

Edited out bad grammar....

TheDoctor
03-26-2002, 04:20 PM
At this time PlayBack does require a drive mount, I expirement with a stream server approach in the beginning fut found that to get the results I wanted, I would have to esentially recreate a file protocal. I have seen several stream approaches implemented but most give up control of playback (ff/rw/pause/skip/menu selections etc...). I have not run any PlayItSam so I can't say with any authority what approach it takes on these matters. I did look at the documentation on on of the early releases, but I was already moving in another direction.

For a home network approach, the Samba mount seems to me a small price to pay for the added flexability. I can have up to 6 recorders dumping programming to the server at once. File based management seems far easier to me than stream management. It should also work with an NFS mount, but I have never tried it, as in past experiences, I have found NFS and windows seldom play nicely for long, and only slowely when they do.

After my last post I did find during additional testing, that a few gliches still occur during playback, however in playing the show back under tivo software I found some gliches in the recordings, so I am not sure how much of the blame can be placed on the network.

However use whatever works best for you.

Enigma
03-27-2002, 08:58 PM
Doc, what prompt are your applications (specifically pbc) looking for? I had [user@directory] # and the programs didn't seem to do anything. I changed it to the default but it does not seem to be working either. It seems to get further into the process, but never gets to anything I can work with. It just ends up with a bash prompt in the title bar after blanking the screen. Is there any way to have it log the commands it is sending to troubleshoot it further? What files are required and what path should they be in? I have all the files that were supplied with the software in /mnt/playback, do I need other files elsewhere?

Also, is it permissible for me to host the playback directory on a different machine than the one on which I am running your software? Currently I have /mnt/playback on the tivo mounted via NFS to a linux server, and have w:/ mapped on my windows workstation to the share via Samba. Will having the windows drive being a network share be a problem?

I don't know what the problem is but I can't get pbc.exe or pbe.exe to display any information (although sometimes pbc will respond to remote control keys with an error: Run-time error '380' Invalid property value when I press chan-up).

Sorry if this message is rambling, I am really just trying to get my thoughts in order on how to run the software :D

Enigma
03-27-2002, 09:36 PM
When I run the playback binary on the tivo, I get the copyright message and the background for the OSD, but no shows are listed. "0 is not an object" appears on the invoking console. When I press up or down I get a "working" message and another occurance of "0 is not an object" on the console". Any idea of what might be causing this? It is a 2.5.1 tivo, and I am trying to invoke it with no ars, that should work under this version, right?

Also, I was able to get PBE to list some data in the top frame (fsid's?) but no description info show up in the lower 2 frames. How can I initiate the extraction of some of these shows?

TheDoctor
03-28-2002, 10:06 AM
It should not matter that things are on diffrent machines. I am using a linux file server, and a windows control machine.

The bash prompt is what I use.

The most likely reason for the problem you are seeing is file name conversion. You need to make sure that 'schema.txt' appears to be in lower case from the PVR platform (This only seems to cause problems on 2.5x platforms). That is the only file that should be case sensitive over a samba mount. If you are using NFS then you should make sure all filename appear in program file names appear in lower case.

If you read the documentation there is a discription of the data that I need from you to troubleshoot your problem. (It is on the last page of the win32 manual.) Once you provide that I may be able to help further.

TheDoctor
03-28-2002, 10:12 AM
From manual:

On the windows platform, under the playback directory run:
Dir > Out1.txt

One the PVR in the playback directory run:

./ls –al >Out2.txt
./ps ax>Out3.txt

In addition please provide OS version numbers for both windows and PVR software, as well as the PC processor speed and memory configuration.

Please include a which software buttons were pressed/options clicked on the application.

Please Zip the Out.x files and send me the info as a PM on Dealdatabase.com (you can also send me an email at thedoctor@dealdatabase.NET, however, there have been reports of mail gone missing.)

Enigma
03-28-2002, 11:05 AM
Looks like my problems were my own fault. I was running the Windows applications from a different directory. I had read to change the case of schema.txt earlier in this thread, and I had done so, but it was not in the shared storage directory. The only files I had copied to the shared directory were the linux(TiVo) binaries. Once I copied all the files to the shared directory and started executing the windows binaries from there things started working much better. So if you get more people that see the numbers in pbe.exe but no descriptions, not having the schema file is most likely their problem as well. I am still having problems with the playback (audio and video quickly go out of sync and menus are VERY slow), but this is probably due to my slow connection to the TiVo (57600bps PPP link). I will wait until my TurboNet ships and see if it clears up my current issues. Although I have actually extracted a show with this connection, it is quite slow. Thanks for the help and all the work you put into this, Doc!

aliu
04-26-2002, 12:50 PM
I'd like to try playback as an editing tool, but I can't get around one problem: It wants to record to the directory it lives in.

The other problem I'll have is that I have a Sony SA, so (I think) the remote codes are different.

So, my requests:

1. Allow playback to take a command-line parameter saying where to write output files.

2. Either support the Sony remote, or allow command-line control from the telnet window.

I tried playitsam (a clone of playback, I think) and it had one major problem -- I couldn't use the resulting .ty file.

TheDoctor
04-28-2002, 02:08 PM
As far as I know it does support the sony remote with limitations, as indicated in the manual. I do not have a sony system, but did load a sony image and tested with a universal remote. I don't have all of the key codes, so they are a little diffrent.

Output and input files path names will not be supported in any new ways anytime soon. You can get more intergration by use the PBC interface, which will put the data in a subdirecory based on the TMSid, (createing one if required.) On a linux system you can always move and link the files. I have 10 storage drives on my server with 8 partitions that all live under the playback 'root'

If the problem fails to function as the manual indicates then please reference the specifics.

TheDoctor
04-30-2002, 08:34 PM
The following is a list of commands available from the command prompt in the current version, They must be followed with a carriage return. These were intended for internal use, not user interface. Good luck with them. Commands are case sensitive.

t = terminate
p = pause
P = Play
R = Rw
F = FF
b = Skip Start
e = Skip End
E = Blank Screen
C = Clear Skip Sets
r = record
S = return to Start
U = Up to next file
D = Down to earlier file

1-9 jump forward
0 = skip back
T = Reboot

AlphaWolf
05-24-2002, 10:43 AM
Doc: been a while, I'm curious of how you are progressing with the dtv audio...

TheDoctor
05-24-2002, 04:00 PM
Sorry, have been side tracked.... I am probably going to redo some things to move the app off of tivo and back to the pc for a while. It's easier to work with their. That will take a couple of weeks. I can get it to play, but maintaing sync on the dtv systems is proving to be a bitch. I have been working on getting playback to handle some other media sources as well.

dlang
06-03-2002, 12:40 AM
I'm starting to look at this problem (with the added thought that if we replace the /dev/mpeg* files with links the playback should go into that file, which as after being decrypted :-) but I am running into a problem at the very beginning.

if I shutdown myworld (either by issuing a kill command or with the remote) or stop the TvMom or Contect* programs my combo unit reboots (2.5.2)

any idea how to avoid this?

TheDoctor
06-03-2002, 04:16 PM
You should be able to shutdown the processes with kill -19, and restart with kill -18. If you are are just using kill or kill -9 then you have to shutdown eventswitcher.

You cannot pipe audio to /dev/mpeg0a. The CS22 is not used for audio decoding on the combo. If you do it, you will hear nothing till you fill up the buffer then everything will lock up and you will be forced to reboot. If you spend the time, you can decode to ioctl codes and pipe the audio to the 5505 driver. (I am on teh road, and don't rember which /dev entry.

If you want a fast fix, make a fifo, feed it the audio data with mpeg header stripped, and use madplay to play the fifo. It will work, but the data must be COMPLETELY clean to maintain sync.

Unfortantely, I have just found this technique will not work to play the data under the client/server system I am working on, so combo support for PlayBack is still a ways off...

dlang
06-04-2002, 02:24 AM
Ok, now I can play back video, on to audio (madplay complains about a missing library so that won't work for tonight)

from looking at /proc/devices the only other device that looks reasonable is device 127 (mixaud) in /dev there are three devices with a major number of 127 mixaud0-3

cat audiofile >/dev/mixaud* results in
0 write error
1 no errror, but no output
2 device or resource busy *** bingo ***

now I guess I need to build the toolchain to write a shim program to sit between the tivo and the video and audio devices that lets me redirect the data to/from a file/socket

I haven't built a cross compiler before, is there a nice howto document to help me with this (building gcc is simple enough, the trap appears to be in getting multiple copies of gcc to not clobber each other on your system, let alone multiple copies of libc)

dlang
06-04-2002, 02:50 AM
hmmm, doing a stings on /tvbin/send5505 and looking through the result it looks like it is talking to the tuner, are you sure the audio is output throught the 5505 device?

send5505 has refrences to the following devices in it
/dev/oslink
/dev/oslink2
/dev/apg
/dev/apg2
/dev/dtune
/dev/cam
/dev/cam2
/dev/ddl

I'm not absolutly sure what most of these are, but I'm pretty sure the oslink/oslink2 drivers are for the two tuners.

TheDoctor
06-05-2002, 11:15 AM
The Device entries have nothing to do with the 5505. It you pull the logs it says that it is using the 5505 instead of the cs22 for audio. I am still on road and do not have the exact syntax.

The are two device entries that work. One accepts 32khz pcm audio, that is used by madplay, do a string search on that program to find it.

The other I believe, accepts the standard tivo audio that would normally be piped to mpeg0a, but requires ioctl control. I have been able to play about 15 seconds of audio that way on a combo before it locks up. I don't rember the device name, and it will be a few days before I finish my road trip.

If you are looking for the libm file it should be in the last PlayBack distro.

hermanator
06-06-2002, 11:20 AM
dlang.. There is a script to automate the process of building the cross compiler:

http://tivo.samba.org/download/mbm/tivo-build-xcompiler.tgz

I havn't seen it here, the link for the CS22 User Guide is:

http://tivo.samba.org/download/tridge/dec-cs22-usrapgd.pdf

TivoDvlpr
06-12-2002, 11:16 AM
I was wondering if anyone has cracked the code to allow adding files to the TIVO unit yet? If not, can someone get me everything we know about the file system?

Also, can someone get me the list of ioctl calls we know of for doing the on-screen GUI?

BubbleLamp
06-12-2002, 11:36 AM
And while you're at it, can someone please get me a Stoli and 7, hold the lime :D

PhanMan
06-12-2002, 12:02 PM
While somebody's up, a double crown would be nice.

But drinks aside, is it possible to add content to a SATivo from some internet downloaded content?

TivoDvlpr
06-12-2002, 12:31 PM
Ok, if its too difficult to point me somewhere to get the last two questions answered (i.e. everything we know about the file system and GUI), how about throwing me a bone and answering if anyone has figured out anything about puttine files onto the TIVO/adding to the now-playing list?

I'll buy you a drink, promise!:D

I'll get the other info by pouring through the TivoWeb code and the TivoApp code. Perhaps I'll document what I find and post it? Wouldn't that be nice!

michaelk
06-12-2002, 04:10 PM
i dont know squat 'cept basically pushing buttons on the remote- so dont look at me. Maybe i can point you in the general direction though...

Tivoweb's newest beta can 'undelete' from what i read - so you might get info from that as to how to screw with the now playing list.

Also i've read that very early versions of the tivo software (maybe 1.3?) had scripts for putting stuff on but those have since been removed from newer versions.

Also keep in mind the concept earlier in this thread (from the doctor I think) that you could just put in a bigger hard drive and partition the new space as ext2 and than play from there. that way you can avoid some of the mfs issues (but not knowing squat, that might have its own problems...)

dlang
06-12-2002, 04:12 PM
right now we haven't figured out how to put content back onto the tivo yet

there is a program /tvbin/ele2??? that was used (in 1.3) by some scripts that looked like they would put content onto the tivo.

in /tvlib/tcl/tv/mfslib/tcl there is a routine called ToMfs that is supposed to take a *nix file and put it into the tivo MFS database, unfortunantly my attempts to call this routine crash and cause the tivo to reboot (it dies on mfs allocate)

as for the on screen gui. there is osdwriter that will put an image onto the screen and text2osd that will take text and put it on the screen.

dlang
06-12-2002, 04:22 PM
re: playback of files from a ext2 filesystem

there are a couple problems with this.

1. we currently don't know how to play back audio on the dtivos

2. you can't use the remote (pause, etc) on playback

3. the ext2 filesystem doesn't really handle large files well, in MFS they are split up into 512M chunks and the playback knows how to go from one to another, doing this with external files will require more software

TivoDvlpr
06-12-2002, 04:59 PM
Thanks for the info dlang. I'm just thinking that the ultimate capability for this thing would be to be able to put stuff onto the TIVO. Then I could archive stuff I like off to my server, and when I want to play something, just put it onto the TIVO and it shows up in my now-playing list.

I think it is going to be difficult to get software good enough to use around the myworld program. It would seem to me that it would be much simpler to figure out how to put stuff into the now-playing list and just use the existing software.

How complex can their little file system be? If I can get the info we have (obviously TivoWeb can read the structures) I may be able to write C code to directly access those files and put files onto the Tivo in the now playing list.

Perhaps I should start a new thread on this subject?

TheDoctor
06-12-2002, 05:19 PM
Wow, this is more activity than this thread has seen in months.

dlang,

1) Ture, PlayBack does not work with DTivo. I have not been able to get it to work well so I am not releasing it, and I have not had time to work on it.

2) Playback has always been able to work with the philips remotes to provide pause, ff, rw, etc. Support has been added for Sony codes obtained from universal remotes has been added. It it does not work with your 'pure' sony remote, then blow $10 for one of the cheap universals.

3) Playback can jump from file to file on extracted files, that the way it extracts them. (One file per fsid.) I thinks you are limited to 10 fsids or files. It also can produce a description list that is used by the windows program to provide onscreen selection. It cannot handle the megafiles producted by some of the extractions programs. THe mega file approach includes bad data in to outfile that then has to be filtered and is limited on the size of the program that can be extracted. The Playback aproach will allow you to extract and use up to 3 hours of high quality video.

TivoDvlpr,

You have access to as much mfs info as the rest of us. You should try reading over the code for tridge's mfs routines. I don't know the link, but the search button works.

I have not heard to date that anyone has uploaded a file back into now playing, and for my purposes, I can't see why they would bother. You would have to wait some time before you could begin watching the show, from the time you decided what you wanted to see. Even attempting to undelete shows in MFS has on occasions corrupted the file system, requireing reinstall.

The other reason is that I really hate the tivo user interface. But I know that a lot of people like it, so by all means figure out how to put stuff back into MFS and let us know.

TheDoctor
06-12-2002, 06:54 PM
As I have said before, It you want to try a simple way to add a file to mfs, you might try recording 3 hours of anything at best quality. Mark the show as do not delete, and rename it 'Import'. You should be able to reverse the extraction program process to replace the stream with an external swtream on a byte for bite basis.

I don't know if this would work, but at least you could be sure that you are writing to a safe portion of the disk, and that database entries already exist. You would in effect reserve 3 hours of space for imports. You should probably make sure that the stream quality matches the quality of the stream you are replacing.

dlang
06-12-2002, 10:35 PM
putting things back into now playing would make things better for the non-techies that we need to support. it's much easier for me to tell my roomate that he needs to go to this website and click on programs to put them on his tivo and then he can play them whenever

as for the upload time, since it takes ~1/3 playing time to transfer a show you should be able to start playing it immediatly, just like you can with shows currently being recorded.

unfortunantly for me all I have are dtivos (and I haven't yet put the turbonet card in my roomates machine)

is there anything I can do to assist in the development of playback for the dtivo? (noting that I am out of town this week so experimentation will have to wait a bit)

TheDoctor
06-13-2002, 08:04 AM
Transfer times are not always the same. I have tried transfering the files to ext2 on the tivo instead of playing from a samba mount. On Dtivo, for low quality recording it works fine, but for high stream rates like HBO it would over run the transfer, especially if FF is used. I would imagine that a transfer to mfs would be no faster and perhaps slower then a tranfer to ext2.

What you want may work, and may be the best way to get the Dtivo's working, but is totally at odds with what I am doing. If you want to try that approach set up the compiler and have at it. Personally adding commercial detection would be of far more value to me than getting it in now playing.

PhanMan
06-13-2002, 02:26 PM
It seems that Tivo has seen the value of placing other source material in the file system.

In reading some of the "rewards" of using series 2 Tivo, downloading content from broadband. They are teaming with companies to provide this content. Real comes to mind for mp3's and I believe it's Radiance for the video.

This is great, but another pay service?

TivoDvlpr
06-13-2002, 10:53 PM
One idea I was toying with was an ftp server on the tivo whose file system was the mfs. You could then use simply links to upload/download (or your favorite ftp software). It would then be extremely easy to archive things off the tivo, and put them back on when you want to play them.

I've got some ftp server code around here somewhere, I just need to modify it to handle the mfs...assuming I/we can figure out how to do that.

Thanks for the info!!

Xnaron
06-19-2002, 06:07 PM
Can someone please post the latest version of playback and playback docs. Also if playback has a web page can I get the URL as well.

Thanks!

Xnaron

spud1458
06-20-2002, 08:40 PM
Originally posted by TivoDvlpr
I was wondering if anyone has cracked the code to allow adding files to the TIVO unit yet? If not, can someone get me everything we know about the file system?

Also, can someone get me the list of ioctl calls we know of for doing the on-screen GUI?

The first thing you want to do is take your video and audio streams and use ele2pestriple to insert them into MFS:
ele2pestriple /export/tmp/t0.vid /export/tmp/t0.aud "/Recording/Active/t0"

Now you want to get it into Now Showing, using something like this. This may not be quite right - I stripped out a bunch of extraneous stuff and may have screwed up in the process. Debug it if you're interested (in tivosh of course):

set path "/Recording/Active/t0"
set db [dbopen]

set info [mfs find $path]
set fsid [lindex $info 0]
mfs unlink $path

set recording [db $db create Recording]
set part [db $db createsub RecordingPart $recording]
dbobj $part set File $fsid
dbobj $recording add Part $part
set program [db $db create Program]
dbobj $program set Title "test 0"
dbobj $program set Description "descr 0"
set showing [db $db createsub Showing $recording]
dbobj $showing set Program $program
dbobj $recording set Showing $showing
puts [ dbobj $recording fsid ]

There's all sorts of other stuff you can set, like durations, start times, end times, stations, etc., but this is the basics, at least for the dtivo.

gregggreg
06-21-2002, 03:11 PM
Originally posted by spud1458


The first thing you want to do is take your video and audio streams and use ele2pestriple to insert them into MFS:
ele2pestriple /export/tmp/t0.vid /export/tmp/t0.aud "/Recording/Active/t0"


This works ok for split files, but has anyone gotten this work with ty streams and therefore negating the need for ele2pestriple?

I tried using ToMfs to put a tystream into MFS and then used these same routines to create an entry in Now Playing that points to my newly inserted ty stream, but when I go to play it, it says "Error playing a recording."

In looking at the MFS db files that make up the Now Showing entry and comparing it with an entry where the ty stream was split, reimported with ele2pestriple, and then added to NowPlaying, there really is no difference. It would be a nice shortcut to skip on the splitting/ele2pestriple part.

PS- the tcl code to import into Now Playing is actually on your Tivo already in /tvlib/tcl/tv/file-to-recording.tcl.

-Greg

dlang
06-23-2002, 03:24 AM
can you send me the script that you used to put the file into MFS? every time I have attempted to use the tomfs routine I have crashed my tivo.