# Reverse Engineering 4K Networking



## mlinehan

Ha! I've done it! 


I've succeded in convincing my 4080 that my PC is another 4080!!


I had a small lower-case / upper-case errro in my UPnP:Alive SSDP multicasts, but I've got that fixed now!


As soon as I fixed my UPnP:Alive packet, my 4080 attempted to retrieve "Device_Descr.xml" from my PC. You only get one shot at this. If the PC fails to deliver the requested xml file, the 4080 won't ask again. Had to keep rebooting the 4080 until I got it right.


So I hacked up a quick www server in my ReplayPC application and fed the 4080 a "Device_Descr.xml" that describes my PC as a 4080 called "ReplayPC".


Sure enough, the replay guide now allows me to select a remote 4080 called "ReplayPC". When I select the ReplayPC ReplayGuide, the 4080 sends an HHTP request to my PC:

http://192.168.0.4/http_replay_guide...4080K000000000 


Note, the serial number in the above request is the serial number of the 4K requesting guide data. I've zeroed it out here, the 4080 does not seem to care.


Point your www browser at the above url (correct the ip address as required) and the 4K will dump the entire ReplayGuide through the HTTP connection. InternetExplorer does not understand this data, so it chokes on it. But if you watch with a packet sniffer, it's easy to see that the entire contents of the ReplayGuide is in the transmission. (10.5KB of data in my case)


Well time for some sleep, and then back to work.


Anyone else out there willing to help?


----------



## markus98

...192.168.0.x is all private IP address

space and not globally routable.


You're behind a network address translation

device (NAT gateway) and possibly a multiple

address to one using port address translation

(PAT) such as a D-LINK DI713P or LinkSYS BESWFR4

or whatever it is ;-)


If you truly want us to connect to your 4080,

you need to

1. Give us the globally routable address

2. If you're using NAT or PAT, make your router

map incoming connects on port 80 on the

extransl address to port 80 on the .4 address.


Cheers, and happy new year


M


----------



## mlinehan

Why would I wan't you to connect to my 4080???


I'm telling YOU how to get the ReplayGuide from YOUR 4xxx.


The hope being that toghther, we can reverse engineer the guide data, and then move onward to reverse enginerring how one 4K unit requests an mpeg stream from another 4K unit.


The end goal being to write a PC application that can retrieve desired mpeg files from a 4K at will.


Understand now?


----------



## q3ded

Dude, sweeeeet! I was parsing the data right from My ReplayTV, which of course, I was worried about being sued over. This way I could negate them completely and have more info than I need.


So much for sleep tonight. You rock!


Cheers,

Chad



____________

Share your shows, only at:
Planet Replay


----------



## dkan24

mlinehan,


very awesome! Even with my non-engineering background, that seems like a pretty big breakthrough!


keep up the great work- and let's make our 4000's the absolute best machine ever!


----------



## mlinehan

Well I now have my ReplayPC program retrieving the ReplayGuide from my 4080 at start up and saving it to disk.


It then sends out some UPnP:Alive packets to get the attention of my 4080.


The 4080 then requests Device_Descr.xml from my PC, and I supply it one.


At this point my 4080 thinks my PC is another 4080 on the local network called ReplayPC.


Next I tell my 4080 to access the ReplayPC ReplayGuide


The 4080 then request the guide from ReplayPC, and my program then feeds the saved guide file back to my 4080, and the 4080 dutifilly allows me to select a remote program for streaming playback. (I'll work on decoding this file later)


Now things start to get interesting. The 4080 then issues a request for the following url to my PC:


/httpfs-fstat?name="/"


I've used i.e. to probe what the proper response is. But I'm a bit confused on where to go from here at the moment. I don't think my PC program is properly emulating the response just yet.


Time for a lunch break, then I'll get back on it.


Anyone else out there ready to report any sucesses?


----------



## mlinehan

A summary of what I know so far.


The 4K's find each other on the local network via Universal Plug and Play. This involves SSDP multicast packets to 239.255.255.250, udp port 1900. These multicast packets contian an HTTP url with wich to retrived the UPnP Device description XML file: "n.n.n.n/Device_Descr.xml"


When one 4K first becomes aware of another 4K, it request retrieves the "Device_Descr.xml" to discover the "Friendly Name" of the new 4K on the network.


Note: The "Device_Descr.xml" file that the 4K is serving up is NOT complient with the UPnP standard. UPnP requires that the decripton file enumerate the available services, and provide directions on how to use the SOAP remote procedure call mechinisim to access them. These are MISSING!!!!


At this point, the 4K ReplayGuide will allow access to the new 4K on the network.


As soon as a remote ReplayGuide is accessed by a 4K user, the 4K sends a HTTP request to the remote 4K to retrieve the Remote ReplayGuide. The url is n.n.n.n/http_replay_guide-get_snapshot?guide_file_name=0&serial_no=RTV4080K0000000000 (The serial number is that of the requesting 4K unit, I don't know what name is. 0 seems to work consistantly)


The remote 4K unit then dumps it's entire ReplayGuide back in one lump sum. I do not yet know the format for this data. There appears to be both binary and null terminated text mixed in. For now, I just write this to disk, and then echo it back when my 4K asks my PC for it's guide file.


At this point, the 4K user can browse the remote 4K's replay guide. If the user select "Play" for a remote program, the 4K then sends a request for: n.n.n.n/httpfs-fstat?name="/" to the remote 4K.


The correct response appears to be

"0\

type=d\

"


Next the 4K sends a request for: n.n.n.n/httpfs-fstat?name="/Video" to the remote 4K


The correct response appears to be:

"80820024\

"


One time, and one time only, I saw the 4K request: n.n.n.n/httpfs-fstat?name="/Video/1009609197.mpg"


I do not know the correct response, and I have not been able to repeate the feat. But I would assume that this is the actual name of the mpg file I'm attempting to stream!!! I do not see an obvious connection between the mpg file name and data in the ReplayGuide file yet.


More research will be needed.


I need to take another break.

Is anyone else out there working this?

I could use some support here. I really don't want to be a one man reverse engineering crew!


Happy hunting!!!


----------



## toots

/Video is where the mpeg partition is rooted in the... UPnP??? system.


Looking at the replay's config file /sys2/etc/httpfs-export, you see three different roots being exported: the program guide, the Photo partition (apparently named "storage," exported as "Photo") and the mpeg partition, exported as "Video."


The name should indeed be the filename that the program appears under in the mpeg partition.


----------



## toots

ps - I'm betting that the 100xxxxxxx filename is probably derived from some sort of timestamp, for instance when the program was created. Probably a unix date/timestamp. For instance, with the example you gave, backtranslating from unix timestamp gives December 29, 2001, 1:59:57.


----------



## toots

Quote:

_Originally posted by mlinehan_
*Next the 4K sends a request for: n.n.n.n/httpfs-fstat?name="/Video" to the remote 4K


The correct response appears to be:

"80820024\

"
*
Interesting... last night, while horsing around with WS_PING (the most handy tool I have for flinging HTTP requests around without using a browser), I was doing a n.n.n.n/httpfs-ls?name="/Video", and the sole response I got back was that "80820024\

" (from memory... if not that, something that looked very much like it).


Wonder what that number means?


----------



## mlinehan

Thanks Toots!


The filename is indeed the unix time stamp.


Said mpg file was recorded on:

12/29/2001 at 2:00AM


The answer was right in front of my face and I didn't see it.

For shame, I have used Unix Timestamps like this myself several times in the past. I should have seen it!


Thanks!


----------



## mlinehan

As I understand it, the RPTV's are running VXWorks, a unix like real time OS.


Could the 80820024 be a representation of the file access rights in decimal?


I've never been good unix access rights, owner, group, other, and all that.


----------



## centaur

Well I'll be damned...


Nice work Mlinehan!


Stepping back, it looks like the HTTP FileService is trying to stat (access) the Mpeg partition, and speculating, in that access request should be some kind of hash for the desired .mpg file, which the RP is not sending in your example. Looks like it accesses the drive, then the part, then should come the file request.


Wow, I can't believe this is not encrypted.


They is gwine lose dey lawsuit...


Better lock em down boys, to prevent a feature-ectomy.


I'm envisioning a "TV Engine"(TM ), with IR/UHF in/out on ttyS1, firewire tapped into the sat receiver, and video card going directly to the projector!


Me, I'm still waitin' for my 4k. (snif)TM


----------



## mlinehan

The url to request the mpg file is:

n.n.n.n/httpfs-readfile?pos=0&name="/Video/xxxxxxxx.mpg"


But you can't do this from a normal www browser. The HTTP request must contain an "Authorization: Basic aaaaaaaaaaaaaaaaaaaaaaaa" option or the 4K won't reply.


I leave it as an exercise to the reader to discover how to coax the "aaaaa" auth code from the 4K


The file is being transfered via HTTP with chunk transfer encoding. I didn't understand chunk transfer encoding, so my first wack resulted in a 1.7GB file on the PC. But the file was not useable because the HTTP protocol headers used for chunk encoding were written into the file.


I've since updated my program to understand chunk encoding, and I have another file transfer underway!!!!


BTW: each xxxxxxx.mpg file has an associated xxxxx.ndx file. The 4K's transfer the nxd file before requesting the mpg file.


Anyone have any ideas what the ndx file may be??? For my 1.7GB mpg, the ndx is 241KB.


L8tr

L8tr


----------



## mlinehan

OK, I'm packing it in for a while since I have to resume my day job!  At least until next weekend.


Even though I won't be working on my ReplayPC program for a while, I'm willing to answer others questions. E-mail me....


I have retrieved a 1 hour medium quality file from my 4080, and I think that I've properly stripped out all the HTTP protocol stuff.


I copied the code from extract_rtv that corrects the mpg header and put it in my program, but windows media player still insists that it does not have a codec with which to play the file.


Here is a hex dump of the first 500H bytes of my resulting mpg file. Can someone who knows a bit about mpg files take a look at this and let me know if they see anything incorrect!


00 00 01 BA 44 00 04 00 04 01 00 A5 03 F8 00 00

01 BB 00 0C 80 52 81 06 E1 FF E0 E0 E0 C0 C0 20

00 00 01 BC 00 12 E1 FF 00 00 00 08 02 E0 00 00

03 C0 00 00 AA 58 7B F9 00 00 01 BA 44 00 04 00

04 01 00 A5 03 F8 00 00 01 BB 00 0C 80 52 81 06

E1 FF E0 E0 50 C0 C0 50 00 00 01 C0 02 AA 81 80

07 21 00 01 8C B3 FF FF FF FD B4 04 66 66 33 44

66 45 44 44 44 44 44 6E 46 DB 48 90 00 01 22 00

00 00 AA AA 5A A5 54 5F 5F AA AA 8F 3D 55 5F 7E

28 A4 82 48 23 8E 49 27 96 79 65 8E 58 E5 92 5A

24 9E 39 E3 92 59 25 96 39 63 9E 49 E4 92 49 A6

9A 65 96 5E DA 64 F6 D3 27 8C 9F AC 64 FD 69 AE

9A D1 94 65 CB 1B 96 35 FE 2D D6 55 96 BA AE 9B

26 C8 C1 30 4E 83 A2 25 12 66 D9 B3 51 A9 58 AC

76 ED 29 28 51 AB 17 20 58 B9 00 AC 31 85 61 8D

4E B4 EA AD AB 6E 96 DB 2D B7 22 F0 B1 AC 65 C1

70 B8 AD 09 F2 7C 94 25 01 B0 DC 1D 07 57 AB CA

35 1B E7 CD 6E 8D 0D 7C C6 AB E6 35 4B 64 70 5B

23 8A A5 AA 56 01 80 54 78 A8 F1 7E 6B 73 24 C9

4A 92 A2 2C 8B 58 96 21 A0 B9 49 A4 E0 F8 3C B4

5A 8D C6 C8 91 73 8A 14 9C 4C B9 A2 65 CC E7 09

57 38 4A DE AD EA A1 88 67 64 AE C9 4B F3 D3 3E

4D 0C 1F 07 B6 8D A2 10 84 2A 4D 1B 4D A6 2F 15

F2 29 12 69 34 E1 C4 21 A3 41 A2 8C 31 14 61 8A

74 47 52 A2 39 65 96 59 BF 6F E8 EB D1 F7 5D 5E

1D A2 6A E0 C8 31 C5 6F 21 09 8C 1D 1B AA 55 26

D9 B6 51 A8 E3 51 A4 08 1A D5 2A 68 DB 04 06 D7

E0 69 57 07 4A B8 28 DA 8D AC 03 01 77 B2 EF 62

34 CE CD DB 76 93 24 D0 64 18 BA 24 33 7C DE 5B

2D AD 4B 9C 4A 24 94 4A 56 AD 6B 53 A6 6C 38 A3

61 C5 1A E1 69 97 0B 4C 50 B5 0B 3A 0E 85 0E 4A

1C 87 07 52 45 11 42 BC AF 71 DC 75 91 01 B2 AC

A8 64 31 63 58 E5 D2 E4 62 31 E3 C8 C5 4A 9A 14

2A C0 A1 66 14 87 72 A4 3F 8A 8A A8 A8 72 1C CD

D4 93 A8 D9 B2 CA 34 8D 37 8D E3 88 E2 39 0E 9A

38 8E 17 0B 8A BA AE DA 6D 44 A2 50 9E C1 AF 9F

1A 62 B9 73 15 CB 4B 0A EA 58 57 75 DF 5D CD 33

4E 10 84 21 08 59 66 CC C3 32 C1 B0 6B 1A C4 7A

1E 96 D5 B6 4D 26 46 91 A2 89 45 4C A6 1A 35 8C

7C FA 8F E6 E3 7F 37 10 C7 F8 46 BF C3 38 13 81

0C 43 1B 6C 76 D8 AB 50 90 20 08 05 B1 6C 5A 16

8F 03 C0 6B 9A F4 3A 1B AA EA 86 43 2D C6 E4 58

A7 3A 54 A6 D0 E4 CE 87 26 86 E7 3E 37 39 F3 95

39 5A C2 B0 90 E5 21 C8 C8 47 44 85 21 36 8D 97

1D D0 9C E1 83 2C CB 92 49 03 00 C2 B5 52 95 CA

DC B9 6C 29 D3 A2 BB 90 56 5C 82 F7 2A 27 B9 51

2C B2 CB 2C 0B 03 5B 06 B6 0B 63 BB A5 A9 6A 3C

8F 2E 8B A2 20 88 B7 8D E0 44 22 DF 37 D6 BB 58

84 42 E5 CA 94 A5 49 80 00 00 01 C0 02 AA 81 80

07 21 00 01 9D 93 FF FF FF FD B4 04 33 55 33 44

45 44 55 33 33 22 33 92 49 23 92 44 89 00 00 00

00 00 AA 50 50 1A 4A 00 00 05 50 54 10 51 47 DE

7D E8 A5 7A 29 5E 89 D8 9D 96 48 25 92 09 64 76

57 61 86 58 65 A2 18 E3 9A 48 26 96 09 E6 76 79

9D 96 47 66 91 D9 A5 72 69 5C 9E 67 A8 99 F9 DD

9D D9 DC 9D CA 67 76 99 DD 99 D9 9D 30 83 08 73

01 9C C0 66 9A 69 A4 45 11 AB D5 F6 43 90 E1 56

15 5B 4D A7 43 A1 CB 96 C3 62 3F 7B 8D 22 05 F5

7D 61 F5 AA D6 B5 C1 D0 74 48 8E 77 2A F2 AE A9

43 A2 50 CB DC BD C1 50 53 7F 6F 29 42 62 04 20

43 1A 8D 36 93 56 2C 2A 95 46 71 9C 65 18 2B C2

F0 98 6A 9D F7 7D 5B 56 D2 24 6B 61 DA 1D AF 45

FB D1 7F 49 74 D6 A8 AA 1A C9 48 27 09 C5 D8 5D

88 9C 4D 3A 9D 50 A2 CB 65 9C 67 1A 9E 9E 41 D0

73 4D C2 0B 83 0B 22 27 5E C1 08 D1 8D 19 68 3D

5A 0F 58 A7 8A 6A 52 94 B5 AB 39 DA 76 B9 B3 9B

B6 9B 4E 47 23 E7 D1 38 9B 6A DA 99 A3 E0 4A 12

D4 38 E6 21 88 AE EB B9 D3 9A D8 97 89 72 E9 A4

BA 69 88 38 83 AA AA A1 E6 1C C4 11 0A 5B 65 B9

32 99 86 61 6E DD 4F 17 8D 83 62 0F 83 E9 9A 64

8E B0 AE EB BA 30 8C 3D 7A D6 AA 42 A4 29 15 0A

45 42 55 25 51 AE 6B B8 18 D2 61 18 4C D2 AB 4D

36 99 48 20 F1 E4 72 38 2D 8B 6B 42 D0 D9 36 48

9B 49 07 3F 96 15 86 5C B6 31 CD 1C D0 8E 47 23

91 D6 F1 6F 0C 53 11 C7 99 85 B5 6D 86 78 57 6D

B6 E2 74 B7 CF 8B 65 B7 11 C4 4B 52 D6 A9 AA 7A

98 AE 7B 9E B0 AC 2F 9F 10 92 8B 28 B6 C2 C5 B0

B0 C9 0C 90 DA 36 B0 23 2D 2D 6B 53 C4 C4 53 6D

B6 A3 56 24 48 DB 4E 4B 12 C2 48 92 36 6D 98 E0

D1 68 9A 24 21 08 7A F6 D6 9D C9 DC 92 15 64 85


----------



## dkan24

could the ndx file be the commercial skip information?


At some point, someone has to write a program to interpret the ndx into Womble and automatically cut out the commercials from the mpeg!  


Have you tried playing the file in a software DVD player such as PowerDVD or WinDVD? I know that WinDVD will play straight mpeg2 files. If you want to send me the file, I could try opening it in any of those or Womble.


----------



## toots

I doubt that it has commercial skip information. I distinctly recall them being present on the 2000/3000 series MPEG partitions as well.


I always assumed they contained specific show content information as well as some kind of back-pointer to the replay channel database on the system partition.


----------



## FreezeFrame

I know nothing, nothing, nothing!!!


----------



## mlinehan

My new years gift to the comunity, the source code for my ReplayPC application. This compiles under VC6.0, and runs on my Win2K system. You mileage may varry.


Note: The output mpg file is not correct yet, but I am getting close.

Code:


Code:


//**********************************************************************************************
//
// ReplayPC.c  Retrieve the guide file and .mpg files from a 4000 series ReplayTV via network
// WARNING - This is ALPHA software. Don't try to use this unless you know what your doing!
//
//
//  Release history:
//  v0.1    01/01/2002  First Souce Code Release, Just to let others help in this effort
//                      This code comiles with VC++ 6.0, but I've attempted to keep it as
//                      portable as possible to other operating systems. Thats why I chose
//                      to write this as a Win32 Console Application. Microsoft makes this hard!
//                      Development and testing were done on a PII-400 Win2K system     
//
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// If you distribute a modified version of this program, the program MUST tell the user
// in the usage summary how the program has been modified, and who done it!
// Modified source code MUST be distributed with the modified program.
//
// Please submit patches and sugestions to  [URL='mailto:[email protected]'][email protected][/URL] 
//
//**********************************************************************************************
#include 
#include 
#include 
#include 

//Tell the linker to link with the winsock library
#pragma comment(lib, "ws2_32.lib")


//**********************************************************************************************
// Global Variables and Defines
//**********************************************************************************************



//**********************************************************************************************
// Function Prototypes
//**********************************************************************************************
void GetReplayGuide(char *IPAddress);
void GetMpgFile(char *IPAddress, char *FileName);
int  RecieveHTTPData(SOCKET s, char* Buffer, int Len, char Terminator);


//**********************************************************************************************
// Main Loop
//**********************************************************************************************
int main(int argc, char* argv[])
{
    WSADATA wsaData;            //Winsock Garbage
    LPVOID  Dummy       = NULL; //Winsock Garbage
    int     fGetGuide   = 0;    //Flag, true if were getting the guide file
    int     fGetFile    = 0;    //Flag, true if were getting a file
    char    *FileName   = NULL; //pointer to filename
    char    *IPAddress  = NULL; //pointer to ip address as a string
    int     i           = 0;    //temp counter

    //fire up windows sockets version 2.2
    if(WSAStartup(MAKEWORD( 2, 2 ), &wsaData ) == -1)
    {
        perror("WSAStartup() Failed\
");
        exit(1);
    }

    //Print usage summary if options are not supplied
    if(argc > 8);
                    sys_hdr[8] = (unsigned char)(rate_bound & 0xff);
                    fwrite(sys_hdr,1,sizeof(sys_hdr),fileptr);

                    //Finally, write the program stream map
                    fwrite(psmap,1,sizeof(psmap),fileptr);
                }

                //write the data to disk
                fwrite(Buffer, len, 1, fileptr);

            }while(chunklen);

        }
        else
        {
            //zero lengh chunk marks end of transmission
            Done=1;
        }
    }while(!Done);
        
    //all done, cleanup as we leave
    printf("\
Done, output written to [%s]\
", FileName);
    fclose(fileptr);
    closesocket(s);
}


//**********************************************************************************************
// A helper function for dealing with HTTP chuncked data
// We have to do this when using WinSock, because WinSock sockets are NOT streams
// in a Unix system a socket is also a file descriptor allowing use of stream I/O
//**********************************************************************************************
int RecieveHTTPData(SOCKET s, char *Buffer, int Len, char Terminator)
{
    static int PacketLen=0;
    static int SrcIndex=0;
    static int DstIndex=0;
    static char PacketBuffer[1500];
    char c;

    //Destination is zero lenght each call
    DstIndex=0;
        
    if (Terminator)
    {
        //Were retrieving terminated data
        do
        {
            //Retrieve HTTP data as required into PacketBuffer[]
            if (SrcIndex == PacketLen)
            {
                PacketLen = recv(s, PacketBuffer, sizeof(PacketBuffer), 0);
                SrcIndex = 0;
            }

            //Copy a byte from PacketBuffer[SrcIndex] to Buffer[DstIndex]
            c = Buffer[DstIndex++] = PacketBuffer[SrcIndex++];
            Buffer[DstIndex]=0x00;

        }while(c != Terminator);
    }
    else
    {
        //Were retrieving binary data
        do
        {
            //Retrieve HTTP data as required into PacketBuffer[]
            if (SrcIndex == PacketLen)
            {
                PacketLen = recv(s, PacketBuffer, sizeof(PacketBuffer), 0);
                SrcIndex = 0;
            }

            //Copy a byte from PacketBuffer[SrcIndex] to Buffer[DstIndex]
            c = Buffer[DstIndex++] = PacketBuffer[SrcIndex++];

        }while(DstIndex


----------



## centaur

Very nice work, Mlinehan. Thank you.

I'll see if this'll compile on Unix libraries.


And FreezeFrame, any dorkus can say he 'knows the secret but can't reveal it', and he'll still look like a dorkus for saying it. Happy farging new year.


----------



## King Of Bayonne

Excellent, excellent work! 


I too have been fiddling with the UPnP angle, and like mlinehan found that the RTV4K is *not* in compliance with the UPnP spec. Don't know if that's intentional or if they just haven't finished with the code yet... maybe in a future build...?


Anyway, I was using the universal control point app from the UPnP SDK and found the non-compliance. Too bad; I was hoping that the 4K advertised a control page so that you could actually control it from a browser...


Anyway, I was diddling with mlinehan's app, and realized that I wanted a way to simply send a given string to the box using HTTP GET to, um, discover more features.  I hacked the code to do this, and also fixed a minor bug. Updated source code will follow in my next post.


It seems that some commands require a secure connection (e.g. file get), and others don't. I found that ALL commands will

respond over secure connections, so my mods to the test program just send a command over a secure connection.


mlinehan, your Auth data works fine with my box.   


With new tool in hand, I started issuing commands like


replaypc ww.xx.yy.zz -c /httpfs-ls?name="/"


This listed the contents of the root directory:


Photo

SnapshotDir

Video


SnapshotDir contains:


RemoteSnapshots

Snapshot-Local-1009926000


I have no idea what these are...


Photo contains:


Test Folder


which is the name of my test folder (surprise!) for photo viewing.


Retrieving a folder list for Test Folder (had to escape the space by using %20 in the request string) listed the JPEGs I had stored on the machine.


Listing the Video directory yielded:


tmp

1009753197.mpg

1009753197.ndx

1009918797.mpg

1009918797.ndx


These correspond to the two shows I have recorded. Not sure what "tmp" is.


More coming later...


KOB


----------



## King Of Bayonne

As promised, the updated souce code for mlinehan's nifty little utility follows...


Built correctly for me using VC6 SP4 on WinXP Pro.



KOB





// ************************************************************ **********************************

//

// ReplayPC.c Retrieve the guide file and .mpg files from a 4000 series ReplayTV via network

// WARNING - This is ALPHA software. Don't try to use this unless you know what your doing!

//

//

// Release history:

// v0.1 01/01/2002 First Souce Code Release, Just to let others help in this effort

// This code comiles with VC++ 6.0, but I've attempted to keep it as

// portable as possible to other operating systems. Thats why I chose

// to write this as a Win32 Console Application. Microsoft makes this hard!

// Development and testing were done on a PII-400 Win2K system

//

//

// This program is distributed in the hope that it will be useful,

// but WITHOUT ANY WARRANTY; without even the implied warranty of

// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

//

// If you distribute a modified version of this program, the program MUST tell the user

// in the usage summary how the program has been modified, and who done it!

// Modified source code MUST be distributed with the modified program.

//

// Please submit patches and sugestions to [email protected] 

//

// ************************************************************ **********************************

#include 

#include 

#include 

#include 


//Tell the linker to link with the winsock library

#pragma comment(lib, "ws2_32.lib")



// ************************************************************ **********************************

// Global Variables and Defines

// ************************************************************ **********************************




// ************************************************************ **********************************

// Function Prototypes

// ************************************************************ **********************************

void GetReplayGuide(char *IPAddress);

void GetMpgFile(char *IPAddress, char *FileName);

void DoCommand(char *IPAddress, char *Command);

int RecieveHTTPData(SOCKET s, char* Buffer, int Len, char Terminator);



// ************************************************************ **********************************

// Main Loop

// ************************************************************ **********************************

int main(int argc, char* argv[])

{

WSADATA wsaData; //Winsock Garbage

LPVOID Dummy = NULL; //Winsock Garbage

int fGetGuide = 0; //Flag, true if were getting the guide file

int fGetFile = 0; //Flag, true if were getting a file

int fDoCommand = 0; //Flag, true if were sending a command

char *FileName = NULL; //pointer to filename

char *IPAddress = NULL; //pointer to ip address as a string

char *Command = NULL; //pointer to command string

int i = 0; //temp counter


//fire up windows sockets version 2.2

if(WSAStartup(MAKEWORD( 2, 2 ), &wsaData ) == -1)

{

perror("WSAStartup() Failed\

");

exit(1);

}


//Print usage summary if options are not supplied

if(argc 
{

printf("ReplayPC V0.1, built on " __DATE__ " " __TIME__ "\

");

printf("USAGE: %s \

", argv[0]);

printf(" -g Retrieve Replay Guide File, Write to Disk\

");

printf(" -e filename Retrieve MPG File Named filename, Write to Disk\

");

printf(" -c \\"command\\"' Send a command string using HTTP GET\

");

printf("EXAMPLE: %s 192.168.0.4 -g\

", argv[0]);

printf("EXAMPLE: %s 192.168.0.4 -e 1009609197.mpg\

", argv[0]);

printf("EXAMPLE: %s 192.168.0.4 -c \\"/httpfs-readfile?pos=0&name=\\"/Video/1009609343.mpg\\"\\"\

", argv[0]);

return -1;

}


//scan command line arguments

IPAddress = argv[1];

for(i=2;i sizeof(Buffer))

{

//Recieve sizeof(Buffer) bytes of binary data

len = RecieveHTTPData(s, Buffer, sizeof(Buffer), 0x00);

chunklen -= len;

}

else

{

//Recieve chunklen bytes of binary data

len = RecieveHTTPData(s, Buffer, chunklen, 0x00);

chunklen = 0;

}


//write the data to disk

fwrite(Buffer, len, 1, fileptr);


}while(chunklen);


}

else

{

//chunklen is zero, signifying end of transmission

Done=1;

}

}while(!Done);


//all done, cleanup as we leave

printf("\

Done, ReplayGuide written to [guide.dat].\

");

fclose(fileptr);

closesocket(s);

}



// ************************************************************ **********************************

// Retrieve a MPG file and write it to disk

// ************************************************************ **********************************

void GetMpgFile(char *IPAddress, char *FileName)

{

SOCKET s; //A socket request the guide data with

struct sockaddr_in adr_dst; //Destination Address

char Buffer[1500]; //Buffer to recieve the guide data into

int len, chunklen; //a temp for dealing with buffers

FILE *fileptr; //a normal file pointer

int Done=0; //temp flag

int FirstTime=0; //another flag

char ReqMpg[500]; //build the HTTP request here


//build the HTTP request

//NOTE: The Authorization is very important. This code works with my 4K

// I don't know if it will work for others....

sprintf(ReqMpg, "GET /httpfs-readfile?pos=0&name=\\"/Video/%s\\" HTTP/1.1\

\

", FileName);

strcat(ReqMpg, "Authorization: Basic Uk5TQmFzaWM6QTd4KjgtUXQ=\

\

");

strcat(ReqMpg, "User-Agent: Replay-HTTPFS/1\

\

");

strcat(ReqMpg, "Host: 192.168.0.2\

\

");

strcat(ReqMpg, "Accept-Encoding: gzip\

\

");

strcat(ReqMpg, "\

\

");


//fill the destination address/port structure

memset(&adr_dst, 0, sizeof(adr_dst));

adr_dst.sin_family = AF_INET;

adr_dst.sin_port = htons(80);

adr_dst.sin_addr.s_addr = inet_addr(IPAddress);


//get a socket

s = socket(AF_INET, SOCK_STREAM, 0);

if (s == INVALID_SOCKET)

{

perror("GetMpgFile:socket() Failed\

");

exit(1);

}


//Open the file we will use to store the response data

if ((fileptr = fopen(FileName, "wb")) == NULL)

{

perror("GetMpgFile:fopen() Failed\

");

exit(1);

}


//Connect to the 4K

if (connect(s, (struct sockaddr*)&adr_dst, sizeof(adr_dst)) == -1)

{

perror("GetMpgFile:connect() Failed\

");

exit(1);

}


//Tell the user were up to something

printf("Retrieving /Video/%s...\

", FileName);


//Send the request for the file

send(s, ReqMpg, strlen(ReqMpg), 0);



//Initialize flags

Done=0;

chunklen=0;

FirstTime=1;

do

{

//Skip the HTTP header stuff by searching for the blank line

do

{

len = RecieveHTTPData(s, Buffer, sizeof(Buffer), 0x0A);

}while(len != 2);


//This line should be a chunk lengh specifier

len = RecieveHTTPData(s, Buffer, sizeof(Buffer), 0x0A);

sscanf(Buffer, "%x", &chunklen);

printf(".", chunklen);


//For some bizzar reason, the fist chunk has a line feed terminated

//number before the mpg data, skip over it

if (FirstTime)

{

chunklen -= RecieveHTTPData(s, Buffer, sizeof(Buffer), 0x0A);

}


//If the chunk lenght is nonzero

if (chunklen)

{

//Loop for chunklen bytes of data

len=0;

do

{

if (chunklen > sizeof(Buffer))

{

//Recieve sizeof(Buffer) bytes of binary data

len = RecieveHTTPData(s, Buffer, sizeof(Buffer), 0x00);

chunklen -= len;

}

else

{

//Recieve chunklen bytes of binary data

len = RecieveHTTPData(s, Buffer, chunklen, 0x00);

chunklen = 0;

}


//mpg file fixup from extract_rtv!

if (FirstTime)

{

// Write a small pack that includes a system header and a program stream map

// This fixes incompatibility issues with Womble MPEG-2 VCR and MProbe and

// makes the MPEG-2 files much more MPEG-2 compliant which apparently they

// don't need to be for the ReplayTV box to play them back.

unsigned long rate_bound;

unsigned char pack_hdr[] = {0x00, 0x00, 0x01, 0xba, // pack_start_code

0x44, 0x00, 0x04, 0x00, 0x04, 0x01, // system_clock_reference_base

0x00, 0x6f, 0xe7, // program_mux_rate

0xf8}; // pack_stuffing_length

unsigned char sys_hdr[] = {0x00, 0x00, 0x01, 0xbb, // system_header_start_code

0x00, 0x0c, // header_length

0x80, 0x37, 0xf3, // rate_bound

0x06, // audio_bound/CSPS_flag

0xe1, // system_audio_lock_flag/system_video_lock_flag/video_bound

0xff, // packet_rate_restriction_flag/reserved

0xe0, // stream_id

0xe0, 0xe0, // P-STD_buffer_bound_scale/P-STD_buffer_size_bound

0xc0, // stream_id

0xc0, 0x20}; // P-STD_buffer_bound_scale/P-STD_buffer_size_bound

unsigned char psmap[] = {0x00, 0x00, 0x01, // packet_start_code_prefix

0xbc, // map_stream_id

0x00, 0x12, // program_stream_map_length

0xe1, // current_next_indicator/program_stream_map_version

0xff, // reserved

0x00, 0x00, // program_stream_info_length

0x00, 0x08, // elementary_stream_map_length

0x02, // stream_type

0xe0, // elementary_stream_id

0x00, 0x00, // elementary_stream_info_length

0x03, // stream_type

0xc0, // elementary_stream_id

0x00, 0x00, // elementary_stream_info_length

0xaa, 0x58, 0x7b, 0xf9}; // CRC_32


FirstTime=0;


// Make sure this is really an MPEG-2 file before we mess around with it

if ((Buffer[0]!=0x00) || (Buffer[1]!=0x00) || (Buffer[2]!=0x01) || (Buffer[3]!=(char)0xba))

{

printf("Not an MPG file! %X %X %X %X\

", (int) Buffer[0], (int) Buffer[1], (int) Buffer[2], (int) Buffer[3]);

exit(1);

}


// Copy the first pack header from the Replay's MPEG file

// but don't copy the pack_stuffing_length since we don't

// want any stuffing_bytes

memcpy(pack_hdr, Buffer, sizeof(pack_hdr) - 1);

fwrite(pack_hdr,1,sizeof(pack_hdr),fileptr);


// Set the system header's rate_bound to the same as the

// pack header's program_mux_rate. Since this is a CBR

// MPEG-2 file we're dealing with, these values can be

// the same

rate_bound = (pack_hdr[10] 2;

rate_bound = (rate_bound > 16);

sys_hdr[7] = (unsigned char)(rate_bound >> 8);

sys_hdr[8] = (unsigned char)(rate_bound & 0xff);

fwrite(sys_hdr,1,sizeof(sys_hdr),fileptr);


//Finally, write the program stream map

fwrite(psmap,1,sizeof(psmap),fileptr);

}


//write the data to disk

fwrite(Buffer, len, 1, fileptr);


}while(chunklen);


}

else

{

//zero lengh chunk marks end of transmission

Done=1;

}

}while(!Done);


//all done, cleanup as we leave

printf("\

Done, output written to [%s]\

", FileName);

fclose(fileptr);

closesocket(s);

}



// ************************************************************ **********************************

// Issue a command to the 4K using HTTP GET

// ************************************************************ **********************************

void DoCommand(char *IPAddress, char *Command)

{

SOCKET s; //A socket request the guide data with

struct sockaddr_in adr_dst; //Destination IPAddress structure

char Buffer[1500]; //A Buffer for our work

int len, chunklen; //a temp for dealing with the buffer

FILE *fileptr; //a normal file pointer

int Done; //temps


//A HHTP request for the command, in two parts

char Req1[]="GET ";


char Req2[]=" HTTP/1.1\

\

"

"Authorization: Basic Uk5TQmFzaWM6QTd4KjgtUXQ=\

\

"

"User-Agent: Replay-HTTPFS/1\

\

"

"Host: 192.168.0.4:80\

\

"

"Accept-Encoding: gzip\

\

"

"\

\

";


//fill the destination address/port structure

memset(&adr_dst, 0, sizeof(adr_dst));

adr_dst.sin_family = AF_INET;

adr_dst.sin_port = htons(80);

adr_dst.sin_addr.s_addr = inet_addr(IPAddress);


//get a socket to work with

s = socket(AF_INET, SOCK_STREAM, 0);

if (s == INVALID_SOCKET)

{

perror("DoCommand:socket() Failed\

");

exit(1);

}


//Open the file we will use to store the result data

if ((fileptr = fopen("result.dat", "wb")) == NULL)

{

perror("DoCommand:fopen() Failed\

");

exit(1);

}


//Initiate the connection to the 4K

if (connect(s, (struct sockaddr*)&adr_dst, sizeof(adr_dst)) == -1)

{

perror("DoCommand:connect() Failed\

");

exit(1);

}


//Tell the user were up to something

printf("Sending command \\"%s\\"...\

", Command);


//Send the request for the guide

send(s, Req1, strlen(Req1), 0);

send(s, Command, strlen(Command), 0);

send(s, Req2, strlen(Req2), 0);


//retrieve all the data

Done=0;

do

{

//Skip past the HTTP header junk by searching for the blank line

do

{

len = RecieveHTTPData(s, Buffer, sizeof(Buffer), 0x0A);

}while(len != 2);


//The next line should be a chunk lengh specifier

len = RecieveHTTPData(s, Buffer, sizeof(Buffer), 0x0A);

sscanf(Buffer, "%x", &chunklen);

printf(".", chunklen);


//If this chunk is non zero in length

if (chunklen)

{

//Loop for chunklen bytes of data

len=0;

do

{

if (chunklen > sizeof(Buffer))

{

//Recieve sizeof(Buffer) bytes of binary data

len = RecieveHTTPData(s, Buffer, sizeof(Buffer), 0x00);

chunklen -= len;

}

else

{

//Recieve chunklen bytes of binary data

len = RecieveHTTPData(s, Buffer, chunklen, 0x00);

chunklen = 0;

}


//write the data to disk

fwrite(Buffer, len, 1, fileptr);


}while(chunklen);


}

else

{

//chunklen is zero, signifying end of transmission

Done=1;

}

}while(!Done);


//all done, cleanup as we leave

printf("\

Done, command output written to [result.dat].\

");

fclose(fileptr);

closesocket(s);

}



// ************************************************************ **********************************

// A helper function for dealing with HTTP chuncked data

// We have to do this when using WinSock, because WinSock sockets are NOT streams

// in a Unix system a socket is also a file descriptor allowing use of stream I/O

// ************************************************************ **********************************

int RecieveHTTPData(SOCKET s, char *Buffer, int Len, char Terminator)

{

static int PacketLen=0;

static int SrcIndex=0;

static int DstIndex=0;

static char PacketBuffer[1500];

char c;


//Destination is zero lenght each call

DstIndex=0;


if (Terminator)

{

//Were retrieving terminated data

do

{

//Retrieve HTTP data as required into PacketBuffer[]

if (SrcIndex == PacketLen)

{

PacketLen = recv(s, PacketBuffer, sizeof(PacketBuffer), 0);

SrcIndex = 0;

}


//Copy a byte from PacketBuffer[SrcIndex] to Buffer[DstIndex]

c = Buffer[DstIndex++] = PacketBuffer[SrcIndex++];

Buffer[DstIndex]=0x00;


}while(c != Terminator);

}

else

{

//Were retrieving binary data

do

{

//Retrieve HTTP data as required into PacketBuffer[]

if (SrcIndex == PacketLen)

{

PacketLen = recv(s, PacketBuffer, sizeof(PacketBuffer), 0);

SrcIndex = 0;

}


//Copy a byte from PacketBuffer[SrcIndex] to Buffer[DstIndex]

c = Buffer[DstIndex++] = PacketBuffer[SrcIndex++];


}while(DstIndex 
}


//Return number of bytes coppied

return(DstIndex);

}


----------



## toots

Quote:

_Originally posted by King Of Bayonne_
*SnapshotDir contains:


RemoteSnapshots

Snapshot-Local-1009926000


I have no idea what these are...
*
And thanks to you all who helped make this work!


I think I've mentioned this before, but if you ever yank the drive on the replay and dump all the files out of the system partition, you will find (from memory, so excuse me if I get the precise location wrong) /sys2/etc/httpfs-export, which defines these three top level directories (Video, SnapshotDir, Photo). The SnapshotDir is some directory on the system partition, and while I didn't look too closely at its contents the last time I was there, I figured it to be some subset of the program guide, although I could certainly well be wrong about that.


Predictably, "Video" just points at the MPEG (big) partition, and "Photo" just points to the photo partition.


----------



## FlipFlop

A suggestion:


As a courtesy, could you attach the source code as an attachment instead of pasting into the message text. This keeps the thread from stretching out onto mutliple pages, and also will preserve the indenting in the file.


----------



## dfrumin

Very cool. I spent a few days on this last week but then took a couple of days off.


I have a rudimentary web server working that serves up all but video. I'll try and finish it today and post it up. Some extra information...


Discovery:

Helps to change the serial number of the unit. I had it choke a couple of times and that helped. That also shows up in the uPnP publishing. Discovery also expires every 30mins, so I'm adding code to my server to send an "alive" SSDP message every 30mins.


Channel Guide:

The RTV will choke if we serve it the same channel guide twice (trust me, bad, required 777-zones.) The algorithm it follows is: it asks for serial_no=# and you either return it a fresh guide with a different file name or "up to date". My mini-server names the guide the way the replay expects it on the hard drive and checks that. So we have that piece.


Channel Guide format:

I haven't focused too much here cuz I want to serve video first, but this will become important. It carries an 808 bytes header, 624 bytes per replay channel, and 444 per show. I have most of the channel format decoded and will post that. Eventually I hope to write a channel guide generator.


Wacky enough, I ran into the basic auth piece to get the video but still ran into the access denied (80820004) error. I'll try again with the code posted to see what's up with that.


I'm going to try and integrate the learnings from the code posted into my server. Hopefully by EOD I can have a mini-server that serves a single show to a single RTV (threading and what not after that.)


thx.


----------



## toots

Ah, so the stuff in the SnapshotDir is just that: A snapshot of the program guide, with the Unix timestamp of when the snapshot of the guide was taken, encoded into the filename.


Right?


I mean, I'm just guessin' and all...


and thanks for straightening me out on what 80820004 means.


----------



## dfrumin

Very cool. I spent a few days on this last week but then took a couple of days off.


I have a rudimentary web server working that serves up all but video. I'll try and finish it today and post it up. Some extra information...


Discovery:

Helps to change the serial number of the unit. I had it choke a couple of times and that helped. That also shows up in the uPnP publishing. Discovery also expires every 30mins, so I'm adding code to my server to send an "alive" SSDP message every 30mins.


Channel Guide:

The RTV will choke if we serve it the same channel guide twice (trust me, bad, required 777-zones.) The algorithm it follows is: it asks for serial_no=# and you either return it a fresh guide with a different file name or "up to date". My mini-server names the guide the way the replay expects it on the hard drive and checks that. So we have that piece.


Channel Guide format:

I haven't focused too much here cuz I want to serve video first, but this will become important. It carries an 808 bytes header, 624 bytes per replay channel, and 444 per show. I have most of the channel format decoded and will post that. Eventually I hope to write a channel guide generator.


Wacky enough, I ran into the basic auth piece to get the video but still ran into the access denied (80820004) error. I'll try again with the code posted to see what's up with that.


I'm going to try and integrate the learnings from the code posted into my server. Hopefully by EOD I can have a mini-server that serves a single show to a single RTV (threading and what not after that.)


thx.


----------



## karog

Quote:

_Originally posted by King Of Bayonne_
*mlinehan, your Auth data works fine with my box.*
Yes, that auth data is the same both my 3060 and SS use to get nightly guide data from the mothership.


The data is just a base64 encoding of usernameassword where username in this case is RNSBasic and password is some letters, digits, and symbols. I won't provide that so as not to piss off any ReplayGuys but it is easily gotten from the data since base64 is easily reversible.


base64 is encryption only from the casual glance. Its real purpose is to turn byte streams into printable character (A-Za-z0-9+/=) streams.


Also, where you said *secure connection*, you probably meant *authorized connection*, no? Secure implies something like HTTPS (SSL).


----------



## King Of Bayonne

Quote:

_Originally posted by FlipFlop_
*As a courtesy, could you attach the source code as an attachment instead of pasting into the message text. This keeps the thread from stretching out onto mutliple pages, and also will preserve the indenting in the file.*
Guilty as charged. Normally, I'd attach the file or put it somewhere Internet-accessible, but I was so damned excited... 



KOB


----------



## King Of Bayonne

Quote:

_Originally posted by karog_


Also, where you said *secure connection*, you probably meant *authorized connection*, no? Secure implies something like HTTPS (SSL).
Correct... I mean "authorized."



KOB


----------



## King Of Bayonne

Retrieving and playing MPEGs using the ReplayPC tool works!


I just did a


replaypc ww.xx.yy.zz -e 1009753197.mpg


to retrieve one of the two MPG files stored on my 4K. It took quite awhile to download, as the tool isn't exactly optimized for performance.  Turns out it was an episode of "Enterprise"... one hour = 1.9 GB on my PC (recorded at Medium quality).


Much to my delight, when I pointed to the file using Windows Explorer (in XP Pro), I saw a preview image. Opening the file in Windows Media Player resulted in perfect playback.


According to WMP, here are the properties for the file:


Video codec: DivXG400

Audio codec: Morgan Stream Switcher

Bit rate: unknown



KOB


----------



## toots

Yah, and alls we need now is some back-end processing to automatically detect (and delete) the "Enterprise" theme song from the MPEG data, then we'll be all set!


----------



## karog

Quote:

_Originally posted by King Of Bayonne_
*Retrieving and playing MPEGs using the ReplayPC tool works!*
Cool!


Approx how long did it take to xfer the 1.9GB and on what bandwidth connection (10 or 100 Mbps)? I'm curious about real world results rather than theoretical.


----------



## Dallben

Quote:

_Originally posted by mlinehan_
*But you can't do this from a normal www browser. The HTTP request must contain an "Authorization: Basic aaaaaaaaaaaaaaaaaaaaaaaa" option or the 4K won't reply.


I leave it as an exercise to the reader to discover how to coax the "aaaaa" auth code from the 4K*
Personally, I find it interesting that this is the same "password" that the 4K uses to talk to the network to download programing info, etc.


Well, maybe it's not that interesting.


Anyone want to attach a compiled, working version of replaypc? Can't find my VC CD, and I've been doing all this playing around with perl & netcat.


----------



## King Of Bayonne

Quote:

_Originally posted by karog_
*Cool!


Approx how long did it take to xfer the 1.9GB and on what bandwidth connection (10 or 100 Mbps)? I'm curious about real world results rather than theoretical.*
I'm using 100Base-T. Didn't do any scientific timing, and I was

doing other stuff on the desktop at the time (I *am* "at work", after all ), but it seemed to take around 10-15 minutes.


Of course, the existing tool is not optimized for performance, your mileage may vary, etc ad nauseum. If I get a minute I'll try a more scientific test.



KOB


----------



## King Of Bayonne

Per several requests, attached is a copy of REPLAYPC.EXE. It *should* work on most flavors of Windows...



KOB

 

replaypc.zip 40.0810546875k . file


----------



## karog

Quote:

_Originally posted by King Of Bayonne_
*I'm using 100Base-T. Didn't do any scientific timing, and I was

doing other stuff on the desktop at the time (I *am* "at work", after all ), but it seemed to take around 10-15 minutes.*
Of course, more interesting than what else the desktop is doing would be what the RTV4K can do while pumping out the mpeg at this speed.


How well can it playback while this is happening?


How well can it record while this is happening?


Both?


----------



## dfrumin

Hey folks... I just finished my first live video playing from PC -> RTV.


That's the good news. The bad news is that the code is still in super-hack mode. Here are the things I'd like to do before posting it:


1. Deal with the RTV jumping around (pos=#)

2. Make the server multi-threaded

3. Encapsulate in C++ classes


I see two ways that we can use this server, each of which requires some code. I'll either get to one of the below or if someone else wants to write those while I clean up, that's great.


1. Full image archive of an RTV

We convert ReplayPC to extract ALL files + guide, clean up the guide, modify Device_Descr to name it uniquely + unique serial number. Then, I add an option to the server that points it at a directory. From that moment on, the PC should act as an exact copy of the RTV archived.


2. Real PC Server

Here, we have to write a smarter ReplayPC that extracts programs by name and adds them to a channel guide database. Then we write a channel guide generator.


Anyway, I'm going to keep focusing on the server for a short while. I'll post my guide knowledge next.


dan


----------



## TechieJB

Just tried to move a PPV program off the replay 4k.. I get the guide fine, it looks as though the show transferrs but takes like 1/2 sec.. recording cops now to test a (somewhat) normal show..

running off win2k server.. local ip range etc...


----------



## toots

Mega Kewl.


Yanked a babs-5 ep (medium quality) off my 4040. Came off faster than an hour (maybe the previously quoted 15 minutes).


My mediaplayer doesn't seem to have the right codecs to play the MPEG file, but the DVD player software on my PC handled it just fine.


Now that's cute.


----------



## Dallben

Quote:

_Originally posted by TechieJB_
*Just tried to move a PPV program off the replay 4k.. I get the guide fine, it looks as though the show transferrs but takes like 1/2 sec.. recording cops now to test a (somewhat) normal show..

running off win2k server.. local ip range etc...*
I'm having that same problem, and I'm only trying to copy network shows. Running both WinXP Pro, & Win2K Pro. I can pull the stuff down with netcat, but it's awfully ugly as it's got all the http stuff in with it.


----------



## genearch

Since I'm not a programmer type...


This is great stuff folks! I'll be sitting here on the sidelines cheering for a executable that will allow me to browse the Replay file system and allows me to drag off shows to my PC as needed. Streaming from Replay to PC isn't much of a priority, but I'd love to archive shows long term to DVD.


Way to go!!!


----------



## mlinehan

If you try to pull a xxxx.mpg file, and it completes in seconds, I guarantee it didn't work. Minimum file size for a 30min show is about 500MB of data.


Try renaming the xxxxx.mpg file to xxxxx.txt and open it with notepad. I bet you see somthing like


80020024


This appears to be some sort of "Access Denied" or "File not Found" error. Are you sure you have the file name correct in the execution ReplayPC? ReplayPC does not deal with error conditions well at all just yet. That will come later


===============================

On another note:


Well damn! I didn't notice that this forum supported attached files! It would have been a lot easer for me to attach the file had I known. I spent quite a while trying to get the source to come through complete with formatting.


----------



## agattas

this is too cool...


i've gotten the guide to download and i've also got a results.dat with the MPG files listed. is there any easy way to tell which .MPG file is associated with which guide entry??? is there a windows utility that will reverse translate the timestamp data?


----------



## dfrumin

Attached is an excel spreadsheet I started to fill in with guide data definitions.


Some notes:


The guide is surrounded by response headers and headers defining an RTV attachment. These are obvious if you open with a binary editor. The below assumes you've stripped all those headers from the top and bottom.


The guide starts with a block of 808 bytes that change a surprising amount from just adding or deleting a show. I've not done too much with this section yet.


A replay channel is defined by a 624 byte block. This one I have pretty well understood and the info is in the spreadsheet.


A replay show is defined by a 444 byte block. I haven't had a chance to do too much with this one.


I haven't nailed down the exact ordering in the data file (e.g. channel followed by all its shows, time based, etc.) so that's open too.


The more we fill in to this matrix, the easier it will be to write a guide viewer on the PC that will then extract a particular file on cue, on a time basis, etc.


Ok, looks like I can't attach excel, so I posted it (temporarily) to:

http://206.124.140.12/guidedef.xls 


more to come (I'm about 1/3 of the way thru rewriting the server)


----------



## Dallben

Quote:

_Originally posted by agattas_
*this is too cool...


i've gotten the guide to download and i've also got a results.dat with the MPG files listed. is there any easy way to tell which .MPG file is associated with which guide entry??? is there a windows utility that will reverse translate the timestamp data?*
I don't know if there's a windows program that does, mktime in C should do it... if you have perl installed on your pc, the following command line will do it as well:


perl -e 'print localtime(1009934997)."\

";'


This will give you: Tue Jan 1 20:29:57 2002


I'm on my way out... I'll try to throw something together later or tomorrow that will do it for you (Unless someone else would like to beat me to it  )


----------



## plazma75

I found this cool java program, just load it in to your browser.


Remember to minus time for your time zone.


-plazma75

 

convert.zip 1.3017578125k . file


----------



## mlinehan

I can extract mpg files from my 4080 just fine. But Windows Media Player bombs out complaing that it does not have an apropriat codec.


I let media player update itself but the mpg files still won't play.

Has anyone been able to make windows media player work yet?


----------



## plazma75

I have pulled off about 4 shows. 3 Played just fine in WMP 8, video and audio. On one the Video played, but there was no sound.

I was also able to play them in the Creative DVD player, back out to my TV...looked just like the Replay.. 


-plazma75


----------



## Montezuma58

I couldn't get MediaPlayer 7.1 on Win2K to work either. I'm using

Zoom Player. You can get it here http://www.inmatrix.com/ This is freeware and won't limit playback time like demo versions of other players.


----------



## King Of Bayonne

Quote:

_Originally posted by mlinehan_
*I can extract mpg files from my 4080 just fine. But Windows Media Player bombs out complaing that it does not have an apropriat codec.


I let media player update itself but the mpg files still won't play.

Has anyone been able to make windows media player work yet?*
You just need the right codecs...


I heartily recommend the Nimo Codec Pack, the mother of all codec bundles.  You can find it using your favorite search engine...


...or you can just go to http://users.chartertn.net/bpearson/Nimo433.exe 



KOB


----------



## mlinehan

>> The appropriate codec is not installed on your computer


----------



## Dallben

Quote:

_Originally posted by plazma75_
*I found this cool java program, just load it in to your browser.


Remember to minus time for your time zone.


-plazma75*
Easier than having everyone install perl.


----------



## TechieJB

Still no good.. i have 1 string of numbers that i can identify as the filename. upon download the resulting mpeg file is 0 bytes..

with 2 shows I only see one filename, the name/number did change upon adding the second one .. almost as if the second was added to the first.. not that makes a difference but this is a 4160 model..??..I'm not much of a programer myself either.. much better with hardware than software..


additionally, if i try the "send" option on the 4k unit it does say you can't send PPV shows..


----------



## barmar

Quote:

_Originally posted by King Of Bayonne_
*Excellent, excellent work! 


I too have been fiddling with the UPnP angle, and like mlinehan found that the RTV4K is *not* in compliance with the UPnP spec. Don't know if that's intentional or if they just haven't finished with the code yet... maybe in a future build...?*
I suspect it's intentional. Their only goal was interoperability between RTV units, not with other devices. They used the parts of the UPnP protocol that were useful to them, just to avoid having to design their own protocol. But they ignored the aspects of the protocol that didn't further their needs.


----------



## TanRanger

1. What can I do to help? I'm a EE major with some C and C++ (though not as much as most of you). I have a 4080 but I'm not willing to break the sticker just yet. I have been playing with sniffers etc. but I've come to discover how far ahead of me you all are (I'd only managed to find my Photo partition).


2. I imagine channel guide info could be sucked off of TvGuide.com or similar if SonicBlue were going to take away any of our features. (ie. we could firewall the RTVs from the internet to prevent their OSs from being overwritten). Does this seem like it's potentially feasible?


3. Are we working on two projects here? One which lets us use a PC to extract mpegs and burn to DVD or archive or whatever. And another which lets our PCs masquerade as RTV4ks and thus serve as a TV jukebox using a big ol RAID server or NAS box.


(If so,) How are things progressing with the latter? I'm not trying to be a leech. I mean, I'd like to contribute if I knew how I could best do so.


4. Does anyone think it would be a good idea to put this project on sourceforge.com ? I'd be happy to do some of the legwork. Any particular reason why we shouldn't have a presence there?


Keep up the good work, folks.


----------



## dfrumin

I'm personally working on the latter (PC Server to RTV for unlimited size). I figure between that and the extraction code I may never have to open up an RTV again. 


Earlier today I had that working, but since then I've been working on a much more scalable architecture which (hopefully) will be done in a few hours.


I think one piece of both projects that could use some work is the guide data file format. This will help extract video from the RTV (select by name instead of file name) as well as serve video to the RTV (generate a guide on the fly.)


I posted an earlier post on my current knowledge of this file and would love all the help I can get on that one.


----------



## barmar

Quote:

_Originally posted by King Of Bayonne_
*I too have been fiddling with the UPnP angle, and like mlinehan found that the RTV4K is *not* in compliance with the UPnP spec. Don't know if that's intentional or if they just haven't finished with the code yet... maybe in a future build...?


Anyway, I was using the universal control point app from the UPnP SDK and found the non-compliance. Too bad; I was hoping that the 4K advertised a control page so that you could actually control it from a browser...*
I suspect it's somewhat intentional. They're probably using just as much of the UPnP spec to allow the kinds of operations they intend, such as being able to access the photo partition from a PC. But other operations are just supposed to be accessible from another RTV; they may have piggy-backed this stuff on the UPnP protocol, but exact compliance is not an issue because they control both ends of the connection and can ensure that they're compatible with each other even though they don't follow the spec.


----------



## Dallben

Of Course, I deleted a show I hadn't watched yet...


replaypc n.n.n.n -c "/httpfs-del?name="/Video/1009934997.mpg"


Will delete a show. Although the file is gone, the entry is still in the replay guide, and when you attempt to view the show, the "Show Stopped" screen pops up. Selecting "Delete Show" will remove the entry from the replay guide. Deleting the NDX file has no effect on whether the entry in the guide is deleted or not.


----------



## Rich A

How are you guys finding the xxxxxx.mpgs to download using the ReplayPC program? I'm pretty familiar with the "Extract_RTV" program. Am I correct in understanding the only "pipes" are -e, -g, and -c ??


What would be the syntax needed to use with the -c to simply get a listing of the *.mpg files?


At this point I'm not worried about which mpg is which show, etc. I just want to get the three versions of the mpeg onto my pc for analysis. I've been doing a lot of "mini-dvd" creation with the series 3000 units.


----------



## King Of Bayonne

Quote:

_Originally posted by Rich A_
*Am I correct in understanding the only "pipes" are -e, -g, and -c ??*
That's all the options that are implemented so far.

Quote:

*

What would be the syntax needed to use with the -c to simply get a listing of the *.mpg files?*
You can use


replaypc ww.xx.yy.zz -c /httpfs-ls?name=/Video


where ww.xx.yy.zz is the IP address of your RTV4K. This will list the files in the Video folder, which you can then retrieve using the -e option.



KOB


----------



## Rich A

Ah I was just coming back to say "never mind". I figured it out. Works great. Thanks


I'll post a note here (with new thread) all about what the Mpg files are as soon as I get a few mpegs off the Replay.


Thanks again.


----------



## dkan24

I've been gone all day, and I come home to this! A HUGE thank you to everyone involved and working on this. I thought it might take a few months but this is just incredible! Again Thank you!


----------



## TechieJB

the..

replaypc ww.xx.yy.zz -c /httpfs-ls?name=/Video

option worked... currently pulling the PPV file off the 4k

Is it possible that the 4k model needs to be parsed correctly for the "source" unit ??.. I'd be happy to try it if theres not another 4160 out there being R-engineered.. i just don't have a compiler..

one more thing is it posible to get file sizes? would hate to x-fer something and run out of room on the last 5 bytes


----------



## dkan24

so I spoke slightly too soon...


I downloaded replayPC.exe and can't figure out how to work it. I have no programming/hacking/DOS knowledge.


When I run the program, a DOS windows opens for 1 second then disapears.


What do I need to do? Do I need a copy of extract_rtv of my PC?


Do I need to know how to work DOS?


I am running windows 98.


Thanks again!!


----------



## Rich A

The ReplayPC works fine. Speed is about as good as you can get with a 100 mips LAN.


First off load I tried was a "Low quality" Mpeg. Looks to be similar to the older Replay mpegs. The video is Mpeg-2, at VBR with an average Video Bit rate of about 182000. Actually it's almost CBR as the low over-all bit rate can't give much of a "swing" GOP seq. is 15/3. The frame size is standard 1/2 D1 at 352x480.


It plays with all my players, including an ATI File Player.


However, the most peculiar thing is that although it plays fine with both video and audio, any attempt to De-multiplex or further examine the elementary streams results in a video only file extraction. Nothing I've got will properly de-mux the file without just throwing out the audio. ??


I notice in the source code there is reference to some Mpeg re-configure or something. Is it possible to get an executable of that (I can't compile it) without the Mpeg mods ??


It's very strange. I've got a ton of video editors and only a few will edit the video. But the finished edits are all missing the audio stream. I'd love to be able to get the "raw" mpeg before any manipulation is done.


----------



## dfrumin

I needed the same feature (raw extract) for getting at ndx files. Here's a quick modified version of ReplayPC (0.2) with two flags:


-e: raw extract for mpg, ndx, etc.

-m: mpg extract with mpg munging

http://206.124.140.12/rtv/ReplayPC.exe 
http://206.124.140.12/rtv/ReplayPC.cpp


----------



## honus87

I've created a java version. You can download it at http://www.forbesfield.com/replayer.jar . (it was too big to attach).


Download it (save it to your harddrive). Open a command prompt and type "java -cp replayer.jar Downloader"


So if you download it to c:\

eplayer.jar, then you'd type "java -cp c:\

eplayer.jar Downloader"


Note: I have modified the jar so on Windows you can now double-click it to run the app. Just click on the above link and save the file (don't open it, save it). Then once it is downloaded, double-click on it and away you go.


It will then ask you for the address of your ReplayTV 4000. It will show you a list of dates of all the files (translated from the seconds to a date string). Pick the one you want and click "get file."


As we figure out the format for the guide data, I hope to add that information in. I also want to make it easier to launch under windows but for now I'm going to sleep.


You can e-mail me with bugs ([email protected]) or ask here if you have questions about how to get it running, I'm sure someone can help.


-Tom


(for those wondering about speed, it took me around 2.75 minutes to download a half-hour standard quality (423 MB) file)


----------



## RandyRazor

I've been trying to use the recently released ReplayPC application and have had no success in producing anything. When I execute the application, it seems to "hang" forever. It produces an empty "guide.dat" file when I execute:


replaypc.exe 192.168.1.103 -g


I'm quite sure that I've got my IP address correct, since I can see that a connection is established between my PC and the ReplayTV unit when I do a netstat:


Active Connections


Proto Local Address Foreign Address State

TCP ripley:4340 192.168.1.103:http ESTABLISHED


Could this have anything to do with the fact that the source code is using an address of "192.168.0.4" in the HTTP GET command?:

"GET /http_replay_guide-get_snapshot?guide_file_name=0&serial_no=RTV4080K0000000000 HTTP/1.1\

\

"

"Host: 192.168.0.4:80\

\

"

"Accept-Encoding: gzip\

\

"

"\

\

"


My PC and the ReplayTV are on the 192.168.1 class-C network and the "host" address in the GET command is on the 192.168.0 class-C network. I can't recompile the code from home, so I can't try changing the address to see if this is the reason.


Any suggestions?


----------



## dfrumin

Hey folks...


Time for bed on my end too. I just created a page on one of my sites (temp) at:

http://206.124.140.12/rtv 


This page contains everything I'm working on and some stuff that I'm not.


It also contains the v0.1 ReplayServer executable that will serve video from the PC to an RTV (quite fun since I have an RTV and TV right by my PC for testing )


I would LOVE LOVE LOVE for one or more folks to push forward on the ReplayGuide decoding. I posted my excel spreadsheet which has all the major fields of a ReplayChannel deciphered. I'm missing the ReplayShow and the Header. If folks can start to fill those in, I can write the ReplayGuide database, parser and generator.


----------



## dfrumin

So much for sleep... 


I downloaded zoom and the codec pack discussed earlier with no luck. On a whim, I downloaded the trial version of PowerDVD and it works like a charm, even on completely unmodified RTV MPG files.


Anyone have any idea exactly which codec is required to run these MPGs?


Also, on PowerDVD, I get a narrow black border on the left and bottom. It smoothly extends from the video. Any idea what that is?


thx.


----------



## centaur

Is it possible that the decodes with no sound, just need a different codec? Fraunhoffer?


If and when this wonderful collective effort results in a TV Server, is it possible to save as MPeg4 instead of 2? (much more efficient)


I'd caution ppl to be a little circumspect, to hopefully avoid a legal warning letter from the mothership.


Honus87, thaaank you for the Java version. I run BSD.


----------



## FlipFlop

Quote:

However, the most peculiar thing is that although it plays fine with both video and audio, any attempt to De-multiplex or further examine the elementary streams results in a video only file extraction. Nothing I've got will properly de-mux the file without just throwing out the audio. ??
I noticed in the source that it adds the MPEG header at the beginning of the file, but doesn't add the program stream end code at the end of the file. Maybe this is why the demux doesn't work right?


Also, what happens if you demux only the audio? The dumux tools might extract video first, then audio, and if the program stream end code is missing it might error out at the end of the video dumux before trying to demux the audio.


----------



## abaduck

Centaur sez...


I'd caution ppl to be a little circumspect, to hopefully avoid a legal warning letter from the mothership.



I really don't think this is a concern... there's no decrypting going on, DMCA is not relevant, all we're doing is the *precise* equivalent of taking a tape out of the front room VCR and watching it on the bedroom VCR - this is *exactly* as per Betamax. Unquestionable fair use.


Hopefully this weekend I'll have http://www.softreplay.com (.org) (.tv) online to act as another location for distribution. I'll also be doing some of my own hacking and doc writing, perhaps starting to build a GUI frontend to this stuff.


Kudos to you folks, this has been a first-class effort!


Mike
http://www.corestore.org


----------



## toots

Quote:

_Originally posted by RandyRazor_
*Could this have anything to do with the fact that the source code is using an address of "192.168.0.4" in the HTTP GET command?:

"GET /http_replay_guide-get_snapshot?guide_file_name=0&serial_no=RTV4080K0000000000 HTTP/1.1\

\

"

"Host: 192.168.0.4:80\

\

"

"Accept-Encoding: gzip\

\

"

"\

\

"


My PC and the ReplayTV are on the 192.168.1 class-C network and the "host" address in the GET command is on the 192.168.0 class-C network. I can't recompile the code from home, so I can't try changing the address to see if this is the reason.


Any suggestions?*
Change your netmasks to 255.255.254.0?


----------



## Cynicor

Hey mlinehan -


It compiles great and runs for me, but it gives me a timeout in the connect() routine. I can't seem to get to the ReplayTV at all on port 80. (I've done some Winsock programming in the past, too.) Do I need to set up the uPnP file and send out a broadcast message before I try to get stuff back from port 80?


I can't telnet into the unit at port 80 or 4000 either (connection failed), but it's still able to get out and get the program guide. (It's connected at 192.168.1.44 to a Linksys hub, which is connected to a Linksys router/firewall; the PC I'm using is connected right to the router at 192.168.1.49.) Am I just being an idiot or something?


Josh


PS: Great work! I used to do stuff like this until I got fat and lazy.


----------



## Dallben

Quote:

_Originally posted by Cynicor_
*

I can't telnet into the unit at port 80 or 4000 either (connection failed), but it's still able to get out and get the program guide. (It's connected at 192.168.1.44 to a Linksys hub, which is connected to a Linksys router/firewall; the PC I'm using is connected right to the router at 192.168.1.49.) Am I just being an idiot or something?

*
If I portscan the replay, it does not show port 80 as open, and if I try to telnet to it, I can connect either. But the port IS open. Try using netcat. You can get it here The command line to use netcat to connect with your replay on port 80 would be: _nc n.n.n.n 80_ Once your connected (it should just leave the cursor at a blank line), type: _HEAD / HTTP/1.0_ and then press the Enter key twice. This should come back with:


HTTP/1.1 404 Not Found

Date: Sat, 10 Jan 1970 00:53:39 GMT

Server: Unknown/0.0 UPnP/1.0 Virata-EmWeb/R6_0_1


if nc drops you back to a command prompt before you type the first two letters of HEAD, then you're most likely having network/connection problems.


----------



## King Of Bayonne

I figured out how to get MPEG file sizes using ReplayPC...


For a video file named 1010019597.mpg, I used


replaypc ww.xx.yy.zz -c "/httpfs-fstat?name=/Video/1010019597.mpg"


This resulted in the following info:


type=f

size=1920139264

ctime=1010019597388

perm=rw


Clearly, this is a plain file with read/write permissions and a file size of 1920139264 bytes. I verified this by d/ling the file and checking the length.



KOB


----------



## honus87

I've updated the jar file for the java program so that on Windows you can just double-click the jar file to launch the program. Just click on this and save the file (don't open it, save it). Then double-click on it.


You need to install a recent version of a jre or jdk ( http://java.sun.com ) for it to work, of course.


-Tom


----------



## Lee Thompson

Quote:

_Originally posted by dfrumin_
*I would LOVE LOVE LOVE for one or more folks to push forward on the ReplayGuide decoding. I posted my excel spreadsheet which has all the major fields of a ReplayChannel deciphered. I'm missing the ReplayShow and the Header. If folks can start to fill those in, I can write the ReplayGuide database, parser and generator.*
I'm working on a guide parser at present. What would be *extremely* helpful to me is if others can send me their guide.dat file. The more varied the examples, the faster this will go.


Keep in mind this does have a list of what shows you have on your replay and what categories you have so if you're not comfortable sending that out, don't


----------



## dkan24

honus87,


I can't download your java file. The website does not come up.


Also, my replaypc.exe file still just opens for 1 second then closes itself. I tried a soft reset on my 4000 (which enabled the photo transfer again!) but that still didn't work. What should I do? Anyone?


----------



## King Of Bayonne

Quote:

_Originally posted by dkan24_
*Also, my replaypc.exe file still just opens for 1 second then closes itself. I tried a soft reset on my 4000 (which enabled the photo transfer again!) but that still didn't work. What should I do? Anyone?*
This smells like a network problem...


Make sure that the subnet masks on your Replay box and your PC match. Also, try moving one/both connections to a different port on your hub.



KOB


----------



## abaduck

dkan24,


Run your replay.exe at an MSDOS prompt, not by double-clicking it!


Mike


----------



## King Of Bayonne

More Guide info...


I pulled apart the Guide into separate chunks, using the size information from Dan's wonderful spreadsheet. I saved the separate pieces in separate files for easier analysis. I have a total of five channels defined and two shows stored, and the files are named appropriately. They are attached for your hacking pleasure.










Next, I started looking at channel/program pairs (in particular, the Enterprise episode I have stored). I can now verify that the per-program data block starts with a four-byte channel ID followed by a four-byte program ID. The channel ID appears in the corresponding channel data block at the correct offset. More importantly, the program ID, when converted to ASCII, yields the file name for the .MPG and .NDX files associated with that program!


Viola! (A large violin!)


So this is the way that the selection of a particular entry in the guide is associated with its corresponding data files.


I couldn't find the file sizes for the given data files encoded in the program data block, but I'm not surprised by this... and now we know how to retrieve the size of a particular file given its name...


Now I *REALLY* have to get back to work.





















But sometime in the next day or so, I hope to put together a little utility prog that will relieve the tedium of all of the "replaypc -c" business.



KOB

 

guidefiles.zip 3.5234375k . file


----------



## dfrumin

My recommend (this is where I started) is to zero out your replay (if you can) and just start adding/removing your own shows. The 808 bytes header was a ***** with a whole lot of changes when I didn't expect them...


-dan

Quote:

_Originally posted by Lee Thompson_
*


I'm working on a guide parser at present. What would be *extremely* helpful to me is if others can send me their guide.dat file. The more varied the examples, the faster this will go.


Keep in mind this does have a list of what shows you have on your replay and what categories you have so if you're not comfortable sending that out, don't *


----------



## dfrumin

Hmm.... I just realized what I'd like to code (will get to it after working on some work stuff for a couple...)


Rather than hard code lots of guide format stuff in a class library (yuck). I'm going to write a generic byteformat specifier language. That way, folks can download the known bytespecifier, tweak it, and see what comes on the other end.


The intent is to end up with a text file like this:


BLOCK Channel 624

#OFFSET,SIZE,FORMAT,PropName

000B,0001,INT1,ChannelCount

...


Then, I'll make a loader of some kind for that.


I think this will make all the replay parsers easier since the java folks can just implement the same type of loader. It will also make it easier on the next binary file that I need to parse 


Hmm... I'll have to think of moded stuff somehow too, but that should be doable...


Any other suggestions on the file format or other stuff?


Also, if folks have confirmed particular locations and sizes and want to send me updated guidedef.xls sheets, just mark your changes in a different color than grey and I'll add them in and post them. That way I can keep a master copy accessible.


thx.

Quote:

_Originally posted by King Of Bayonne_
*More Guide info...


I pulled apart the Guide into separate chunks, using the size information from Dan's wonderful spreadsheet. I saved the separate pieces in separate files for easier analysis. I have a total of five channels defined and two shows stored, and the files are named appropriately. They are attached for your hacking pleasure. 


Next, I started looking at channel/program pairs (in particular, the Enterprise episode I have stored). I can now verify that the per-program data block starts with a four-byte channel ID followed by a four-byte program ID. The channel ID appears in the corresponding channel data block at the correct offset. More importantly, the program ID, when converted to ASCII, yields the file name for the .MPG and .NDX files associated with that program!


Viola! (A large violin!)


So this is the way that the selection of a particular entry in the guide is associated with its corresponding data files.


I couldn't find the file sizes for the given data files encoded in the program data block, but I'm not surprised by this... and now we know how to retrieve the size of a particular file given its name...


Now I *REALLY* have to get back to work.    But sometime in the next day or so, I hope to put together a little utility prog that will relieve the tedium of all of the "replaypc -c" business.



KOB*


----------



## dfrumin

Anyone have any luck making the MPG work with non-commercial software? As I posted last night, I got it to work with PowerDVD, but am hoping some freeware + codec will do it...


thx.


----------



## honus87

Quote:

_Originally posted by dkan24_
*honus87,


I can't download your java file. The website does not come up.
*
I seem to have screwed up the URL in one of my edits. It is fixed now. And here it is again http://www.forbesfield.com/replayer.jar


----------



## firefighter

Quote:

_Originally posted by honus87_
*

I seem to have screwed up the URL in one of my edits. It is fixed now. And here it is again http://www.forbesfield.com/replayer.jar *
First of all, all of this talk makes me wish I had a 4000. Anyways, honus87 a quick bug report when you run your Java program and press cancel while it's asking for your IP address, it still takes you to the next window. I don't know if that is what you had in mind.


-Mike


----------



## FlipFlop

Here is some format info for the replay guide data used on the 30xx units, as decoded by sdurgin a year or so ago. The program description stuff in extract_rtv is based on this info and works for the 30xx units, but evidently not for the 40xx units. I'm posting this here because maybe seeing what they did in the 30xx units will shed some light on the structures used in the 40xx units.


See also the extract_rtv source code for some C structures and code to pull this info off of a 30xx drive.


----------------------------------------------------------


/user/ReplayChannels/2/ReplayChannelSet.File , record size = 560 bytes

Each record is for one channel in the guide, which may have multiple shows recorded.
Code:


Code:


[offset,length] in bytes

[0, 4] Type
        1 = Single record show
        2 = Zone ?
        3 = Repeat show
[4, 4] quality
        0 = high
        1 = med
        2 = standard
[8, 8] size 64-bit
        size in bytes of guaranteed space reserved
        if > 0 then it's a guaranteed channel
[16, 4] keep episodes
        0 = single record channel
        1+  = keep #n episodes
[20, 4] current # of episodes
[44, 4] create time (secs since 1/1/70)
[48, ??] Channel name (unknown field length. using 48)
..END..

There are other things in each record, but their use is not understood and some could be garbage. The above records are the only verified records that I have decoded so far.


Next, open /user/ReplayChannels/2/ReplayChannels/[create time secs].FiledArray


This file has a record for each show in the channel.

record size = 404 (variable+)
Code:


Code:


[8, 4] number of records (in first record only)
[16, 4] create time secs
        if 0, look at 20, 24, 32, etc until non-zero.  keep track of offset.
        if create time is found @ 56, off = 40 below.
[off+20, 4] file name of MPEG file on part 2 (secs since 1/1/70)
[off+24, 4] type as above
[off+28, 4] quality as above
[off+36, 4] exists? 1 = exists
[off+148, 4] start of record time
[off+172, ??] show title/episode/desc
                sometimes @ 176, 180...
                Check @ 172 if byte is


----------



## dkan24

java program works great. I just grabbed a file. Now figuring out how to play it...


----------



## Round Eye

honus87,


Can you supply the source code for the java replayer program?


Thanks


----------



## dkan24

after opening the file in Womble, the video had black edges along the sides. I edited out commercials, and then saved as a PS mpeg2 file. It didn't take that long to save, maybe a few minutes. The resultant mpeg2 file opens up in windows medial player 7. The black edges are gone, and the video plays perfectly.


A half hour simpsons show (Lisa The Tree-Hugger) was cut down to 20 minutes. It was 660 mb- small enough to fit onto a CD-R.


edit: I just realized that the black edges are not gone. So I went back into Womble, and now when I save the file, I cut it down to 640 width from 720. The black edges seem to be all gone now.


----------



## Griffon

Jeez I go away on vacation for a couple weeks and things swing into high gear and then some. Nice work folks! This is really starting to come together.


----------



## dkan24

converting the pixel size in Womble takes a very, very long time. Is anyone else experiencing the black edges? What do people do using extract_rtv? Is there any way to correct this in replayPC program?


----------



## Rich A

Quote:

_Originally posted by dfrumin_
*Anyone have any luck making the MPG work with non-commercial software? As I posted last night, I got it to work with PowerDVD, but am hoping some freeware + codec will do it...


thx.*
I've only tried the low quality (352x480) and Windows Media Player as well as the ATI File Player (with an ATI All In Wonder card) play them fine. The big problem I have with it is editing. Any cut, multiplex or anything else and you loose the sound stream. Still have to do more investigating and have a couple other fires that need to get put out first, if you know what I mean. I have mpeg-2 editors and utilities galore, so I'm sure there's some Mpeg-2 codec that has attached itself to my system that makes it work.


I don't understand why anyone needs to fool with the screen size etc. It's all standard stuff. Low is 1/2 D1 DVD at very low bit rate (around 1.8 Mb/s) Medium is 720x480 and if I remember was 4 Mb/s and high was also 720x480 at 8 mb/s. This is all standard DVD frame size. You may have trouble playing back a 1/2 D1 frame with a non-dvd pc based player as it might not be able to handle that frame size. (may try to play it as an SVCD which is 480x480).


My question is has anyone been able to parse it through Womble and still retain the audio ??


----------



## honus87

Windows Media Player played it for you because you had the right codec installed and I don't think it is one of the standard ones. It didn't work with me on a fairly fresh install of XP. I did eventually find a codec, but it isn't free, overlays a ghost in the corner and everything looks squished left-to-right.


Can you do File/Properties when you are watching something in WMP and see what video codec it claims to be using?


I've tried everything that has been suggested on here and haven't been able to find the right thing. I'm not an expert on all this Divx and DVD stuff though.


I don't have a DVD drive so I wonder if that is part of the reason why I don't seem to have the right codec installed.


-H


----------



## dkan24

Rich,


I have cut out the commercials using Womble and the audio is unaffected. I am working with medium quality files.


The one problem I am having is that the video has black edges along the sides. Sometimes very thin lines at the top or bottom. Have you seen this? When I cut the video (using Womble) down to 640x480, the black edges go away.


----------



## mlinehan

Well, here it is: ReplayPC V0.2 source and exe in zip.


Changes since version 0.1:


* I have formaly licensed this code under the GPL 2.0 and I have applied for project hosting at Source Forge!


* King of Bayonne submitted code for the -c feature. This has been merged into the source.


* implemented a new -d directory command. This will list all of the files in the /Video directory. And if the filename appears to be a Unix Timestamp, it also convert the timestamp to an ascii string and print it. This string should match the "Recorded on data/time" for the program the file is a recording of.


* implemented a new -s print file status command


* adjusted GetReplayGuide() to strip the header junk from the output file. This should help thoes who are working on reverse engineering the guide file. It will break any other utilities that were reliant on the header stuff being there. ReplayServer???


* changed exit(1) to exit(-1) throughout the program.


* adjusted the calls to perror(), to make the output more user friendly.


* implemented the new -er extract named file RAW. This is for debugging, and also to support ReplayServer. You can use the -er option to extract ndx files as well.


I measured extraction speed today, and it worked out to be exactly 1MB/s on my system. That would mean that ReplayPC should extract a 30min medium quality program (1GB) in about 17 minutes. I have mixed feeling about trying to speed this up. It might cause the ReplayTV to screw up if you extract a file and record at the same time. But if you want to speed this up, the obvious things to mess with would be the char Buffer[1500] in GetMpgFile(); Hint - make it about 32768 bytes! The HHTP helper function at the end of the source file could probably be improved quite a bit.


For others who are having problems playing the extracted mpg files. I could not, and can not playback with Windows Media Player 7.1 myself. But I can playback with the trial version of PowerDVD. Guess Santa will be dropping me a gift a bit late this year! 


   Happy Hunting!


----------



## mlinehan

ReplayPC V0.2 Source and EXE

 

replaypc_v02.zip 49.861328125k . file


----------



## Dogbert

dkan24, The black edges you see are from the NTSC overscan area. This area used for by TVs to align the picture. this is also where the closed caption information is sent. These areas are masked out of sight on the TV by the picture tube.


Some mpeg2 codecs will mask these out for you. As you now know some will not by design. If you have DVD drive and player in your computer you probably will play the video without the black edges because the player is designed to crop out the areas that are usually masked by the TV picture tube. Some of the codecs are designed for video editing will not do this.


The reason video might look distorted in WMP is mpeg 2 video uses rectangle shaped pixels like standard broadcast TV and PCs. Most AVI formats use square pixels (because digital video stared on the Macintosh and it uses square pixels). WMP will assume if the codec does not tell him otherwise, to us square pixels. this will make the video look stretched out and distorted.


The audio problems I think are related to the sample rate. Standard DVD is 48K. I think the Replay uses 32K. depending on what you use to edit the file you will have to play with the settings. It could be that the Mpeg codec you are using does not support exporting at the 32K rate.


If you plan to archive the video you might want to convert it to Mpeg4. This would let you put at least a hour on a CD. There are at least 2 free versions of Mpeg codecs that go under the DIVX name (not to be confused with the failed DVD format). There are several version of a encoder program called Flask (I think) that would let you crop the black borders. I do not know if the replay will ever play mpeg4 so this would be a one way street.


Hope this is enough to get you started. All of this information is generalizations. One of my jobs was to support-non linear edit stations a few years ago so this is a little fuzzy (like my spelling).


----------



## dkan24

maybe we could get a working list together of what codecs work, with what programs. How can I tell which codec I am using?


----------



## mcvideo

Quote:

_Originally posted by Dogbert_
*dkan24,

The audio problems I think are related to the sample rate. Standard DVD is 48K. I think the Replay uses 32K. depending on what you use to edit the file you will have to play with the settings. It could be that the Mpeg codec you are using does not support exporting at the 32K rate.

*
Ulead Movie Factory is reporting that the medium quality Mpeg 2's I've gotten off my 4080 are of several different audio samplings. A episode of Buffy off FX was at 32000hz and 320 Kbs mono, and an episode of Justice League had 48000hz and 224 Kbs stereo. Both were recorded as medium quality.


----------



## Ed Rempalski

WOW - This is the dream thread. Thank you for sharing such cool work!!


I tried the Java app in XPpro. It opened, I entered my fixed IP to a 4040. Got a nice list of dates/times. Pulled off several shows. Takes about 6 1/2 minutes for a 30 minute show (all recorded at medium or about 1 gig per 30 minute show).


I tried giving them .mpg and .mp2 file extensions and both behaved the same. Does anyone know what is the correct way to name them?


I opened them in XP's media player (8.0) and they played with no problem. I checked properties and got Bitrate=Unknown, Ligos MPEG Audio Decoder, Ligos MPEG Video Decoder.


I opened them in PowerDVD 3.0 and they played fine.


I imported them into Adobe Premiere (I'm just getting into DV editing and have a Pinnacle DV-500 setup and just setting things up). Adobe choked on the .mp2 extension, would load the file with a .mpg extension but played black screen video with OK sound when using the Pinnacle NTSC DV Template. Maybe an experienced Adobe user could make it work.


I tried importing them into DVDit PE and they played fine (both .mpg and .mp2 extensions). DVDit is a good quality DVD creator. I tried to create a DVD with a 3 minute Replay clip. It took a Long Long time to "transcode" the file (17 minutes) and about 1 minute to create the DVD. This would mean that it would take almost 6 hours to make a 1 hour DVD. My friend uses DVDit alot and it seems that it is capable of accepting many formats and converting them as needed (but transcoding is with software). It is much faster if the content is already DVD ready. The normal editing process is done with DV from camcorder, to Adobe for Editing (Adobe uses the Pinnacle PCI MPEG Card to Render faster in hardware), then to DVDit for DVD Menu Structuring and burning.


Would sure like to know if there is any way to format/extract the Replay files DVD ready. Then DVD archiving would be a snap...


Thank You all again for your work!


Oh, I also tried Ulead Video Studio 5. It would not accept the files, gave a "wrong format" error. Maybe some fiddling with the project properties may work, I tried several with no luck.


----------



## mrwilson

Doesn't Womble's MpegVCR2 upsampling the 32k sound to 48k?


----------



## Krelnik

We had a snow day here in Atlanta yesterday, so I spent the afternoon hacking on the guide file format (GUIDE.DAT) that ReplayPC.exe fetches. With lots of fooling around and some of the hints that were posted by *dfrumin*, I've got a little C program here that will dump most of it out.


Will post it later today, I still have a few anomalies to work out.


----------



## FlipFlop

I use FlasKMPEG 0.6 with the included bbMPEG encoder to crop and convert the files to MPEG1 (VCD) format. I can then write these to CD using VCDEasy, and they play on my DVD player.


It is somewhat confusing because you have to configure Flask to the VCD profile to get the proper audio sample rate and video size and framerate AND configure bbMPEG to get the proper output (VCD) format. Flask will resample the audio to 44.1kHz or 48kHz. Once you get all of the settings right it works quite well


I've also used TMPGenc to multiplex/demultiplex and to cut and merge sections of video together. It works, although the program sometimes goes away and thinks for long periods of time with no feedback.


----------



## centaur

Tried the java proggie in BSD and no joy.


# /usr/lib/Sun_jdk1.1.8/bin/java replayer.jar

Can't find class replayer.jar

# /usr/lib/Sun_jdk1.1.8/bin/java ./replayer.jar

Invalid class name: ./replayer.jar

# /usr/lib/IBM_java1.3/bin/java replayer.jar

Exception in thread "main" java.lang.NoClassDefFoundError: replayer/jar

# /usr/lib/Sun_jdk1.3.1/bin/java replayer.jar

Exception in thread "main" java.lang.NoClassDefFoundError: replayer/jar


Probably a classpath prob. Will check.


----------



## Round Eye

Has anyone started modifying the ReplayPC code to compile and run under both UNIX and Windows?


Seeing as I don't use Windows I'm up for this task if no one has started it yet.


----------



## honus87

You're not giving the right command line. As per my first post about it, the command line is "java -cp replayer.jar Downloader"


----------



## madSkeelz

So, I finally got around to giving Honus' Java-based replaySucker a whirl. Worked as expected on my Win2k box, but the real excitement was when it "Just Worked" under Mac OS X. Weee-hah. I am a happy camper.


Now if only Apple would release their long-promised MPEG-2 support for QuickTime.


btw...Honus, can we download the source to your app anywhere?


--

-mS


----------



## honus87

Quote:

_Originally posted by madSkeelz_
*

btw...Honus, can we download the source to your app anywhere?
*
Not yet, it is kind of ugly in there. I might have a chance to clean it up over the weekend.


-H


----------



## BaysideBas

Quote:

_Originally posted by madSkeelz_
*

Now if only Apple would release their long-promised MPEG-2 support for QuickTime.


--

-mS*
Aww... madSkeelz, give them some slack. The MPEG-2 syntax has been frozen only since 1993


----------



## jbarr

I must say, this is some _really_ cool progress! Now, I just wosh I had a couple 4000 boxes!!!


Great work...keep it up!!!


----------



## toots

Yah, and Apple is still expecting QuickTime to really take off, Any Day Now!


----------



## dfrumin

Hey guys,


Another user (Lee) has been hacking at the guide file and has most of it nailed down into nice C structures and sample code. He and I have been exchanging guides to throw at it and its' doing well. He's working on a mini-extractor program and I'm working on a super-duper ReplayClient to match the ReplayServer.


I recommend waiting for his findings on the guide format, which I'm sure he'll post up here asap.


On a personal note, I'm hung up on some work stuff but hope to have the ReplayServer source ready to post in its current incarnation in the next day or two. There are still a couple of things it needs to do before it's super-useful (like rebroadcast itself every half hour) but once that's done it should be ship shape.


more asap...

Quote:

_Originally posted by Krelnik_
*We had a snow day here in Atlanta yesterday, so I spent the afternoon hacking on the guide file format (GUIDE.DAT) that ReplayPC.exe fetches. With lots of fooling around and some of the hints that were posted by dfrumin, I've got a little C program here that will dump most of it out.


Will post it later today, I still have a few anomalies to work out.*


----------



## scochran666

Now that we have the Replay Client in production, we need someone with the XBox software development kit to start looking at porting it over - voila, a relatively inexpensive Replay playback device.


----------



## toots

Hey, I'll be glad to field test that!


My X-Box has already proven useful as an emergency backup replacement for an aging DVD player, as well as an excuse to put off buying a new PC for another year (I was just going to buy it to play games).


If we could make it a Replay client as well, well, that'd just be cool.


----------



## King Of Bayonne

OK, here's another little utility you might find useful...


"rtv4kexplore" connects to a 4K and displays properties of the channels and shows currently stored on the device. With a little fiddling (and MAJOR props to dfrumin's Guide spreadsheet and mlinehan's ReplayPC source code), I was able to correlate data in the guide with the actual show files stored in the /video folder.


Usage is pretty simple: "rtv4kexplore ww.xx.yy.zz". Source code and a Windows binary are attached. Here's some sample output:


C:\\>rtv4kexplore ww.xx.yy.zz



Exploring ReplayTV 4000 at IP ww.xx.yy.zz


Retrieving ReplayGuide file...done


Number of channels found = 5


Channel 1:

channel name = "Sacramento Kings"

quality = high


Channel 2:

channel name = "More!:Skating"

quality = high


Channel 3:

channel name = "Enterprise"

quality = medium


Channel 4:

channel name = "Outer Limits"

quality = medium


Channel 5:

channel name = "Justice League"

quality = medium



Show 1:

Station ID = "WNYT"

Show title = "Brian BoitanoÆs Skating Spectacular"

Episode = ""

Details = "From Vegas."

Cast information = ""

Time/date recorded = Tue Jan 01 16:00:00 2002

Show filename = 1009918797.MPG

Show file size = 3840245760 bytes


Show 2:

Station ID = "UPN4 (EDGETV)"

Show title = "Enterprise"

Episode = "The Andorian Incident"

Details = "The crew visits an ancient Vulcan spiritual sanctuary occupied by a ..."

Cast information = "Scott Bakula, Connor Trinneer, Jolene Blalock"

Time/date recorded = Wed Jan 02 20:00:00 2002

Show filename = 1010019597.MPG

Show file size = 1920139264 bytes


Show 3:

Station ID = "Sci-Fi Channel"

Show title = "Outer Limits"

Episode = "The Hundred Days of the Dragon"

Details = "To create an impostor for the U.S. president, an Asian uses a serum that alters human form."

Cast information = ""

Time/date recorded = Thu Jan 03 14:00:00 2002

Show filename = 1010084397.MPG

Show file size = 1921318912 bytes


Show 4:

Station ID = "Sci-Fi Channel"

Show title = "Outer Limits"

Episode = "The Architects of Fear"

Details = "Scientists plan to save Earth from nuclear war by uniting it against a manufactured alien foe."

Cast information = ""

Time/date recorded = Fri Jan 04 14:00:00 2002

Show filename = 1010170797.MPG

Show file size = 1920827392 bytes



To those working on channel guide decoding: I have no idea if I have the exact lengths correct for the Station ID and show information fields... but what I have seems to work. In particular, it looks like the show information field consists of . As a result, these four "fields within a field" can be parsed as strings. In some instances, the substrings may be of zero length (for example, some shows don't offer cast information), but the null terminator is still there so that you can parse it correctly as a string. Also note the anomoly that the apostrophe (') in the title of "Brian Boitano's Skating Spectacular" was stored in the guide as a hex 92... maybe apostrophes can't be stored in strings in the guide...?


mlinehan, if you want to take this code and fold it back into your ReplayPC app, be my guest.



KOB

 

rtv4kexplore.zip 51.638671875k . file


----------



## King Of Bayonne

Quote:

_Originally posted by scochran666_
*Now that we have the Replay Client in production, we need someone with the XBox software development kit to start looking at porting it over - voila, a relatively inexpensive Replay playback device.*
If anyone out there in television land DOES have access to the XBox SDK and is willing to share, I will sign up to develop the client.



KOB


----------



## toots

Probably not an apostrophe in the "single quote" sense, but more of an apostrophe in the "comma way up too high" sense, with a different ASCII code than the generic single quote.


----------



## Dallben

Quote:

_Originally posted by King Of Bayonne_
*OK, here's another little utility you might find useful...


KOB*
Er, it blew up in winXP Pro, but this is what it displayed... Did I do something wrong?


GetFileSizeAsString: ReplayTV returned error code 80820005.


Show 1:

Station ID = ""

Show title = "☺"

Episode = ""

Details = ""

Cast information = "☺"

Time/date recorded = Fri Aug 06 09:01:00 1971

Show filename = 50331648.MPG

Show file size = Â¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨TÂ¨T Fri Aug 06 09:01:00 1971


----------



## markus98

What am I doing wrong?

D:\

tv>java -cp replayer.jar Downloader

count = 0, total = 97

Exception in thread "main" java.lang.NoClassDefFoundError: Downloader


The same error with "downloader" also...

The same error under JRE1.3.0,1.3.1,1.4b3.


The same error set on 2 different Wink2SP2

systems.


Help?


M


----------



## markus98

I had right-clicked on the .jar file with NS

and save-link-as... but apparently that was corrupt.


Using IE6, right-click and save-target got me

a similarly sized file that DID work.


Nice utility!


M

p.s. WD replaced my 120 in under 2 weeks

including shipping time! Now that's

RMA service!


----------



## RandyRazor

Quote:

_Originally posted by King Of Bayonne_
*OK, here's another little utility you might find useful...

KOB*
Thanks for the utility. I'm having a little trouble, though; it crashes on my WinXP Pro machine with the following output:


...


Show 8:

Station ID = ""

Show title = "Â*"

Episode = ""

Details = ""

Cast information = ""

Time/date recorded = Wed Dec 31 16:00:00 1969

Show filename = 0.MPG

Show file size = ════════════════════Wed Dec 31 16:00:00 1969

bytes

GetFileSizeAsString: ReplayTV returned error code 80820005.


Show 9:

Station ID = ""

Show title = ""

Episode = ""

Details = ""

Cast information = ""

Time/date recorded = Sat Jun 05 02:18:00 2032

Show filename = 1970039905.MPG

Show file size = ════════════════════Sat Jun 05 02:18:00 2032

bytes


Any suggestions?


Thanks!


----------



## King Of Bayonne

Quote:

_Originally posted by Dallben_
*

Er, it blew up in winXP Pro, but this is what it displayed... Did I do something wrong?
*
Well, it works on MY system...
























Obviously a bug... please try the attached and see if it gives you better results.



KOB

 

rtv4kexplore.zip 51.638671875k . file


----------



## Dallben

Quote:

_Originally posted by King Of Bayonne_
*


Well, it works on MY system...   


Obviously a bug... please try the attached and see if it gives you better results.



KOB*
Nope... Same result... I'll try it on win2k.


----------



## RSaunders

King,


With respect to hex 92, I believe

that is a right-curly-quote code instead

of the "normal" single-quote = ' .


----------



## RandyRazor

Quote:

_Originally posted by King Of Bayonne_
*


Well, it works on MY system...   


Obviously a bug... please try the attached and see if it gives you better results.



KOB*
Same results as before.


Thanks.


----------



## FlipFlop

The character displayed for hex 92 (decimal 146) will depend on your character set selection. The windows "oem fixed pitch" font (which is probably the default in the command prompt window) will display the AE character, but most (if not all?) truetype fonts will show a â€™ character.


Here is a link that shows what the standard windows character set is:

http://titus.fkidg1.uni-frankfurt.de...9/iso8859a.htm


----------



## impatient

Quote:

_Originally posted by King Of Bayonne_
*


Well, it works on MY system...   


Obviously a bug... please try the attached and see if it gives you better results.



KOB*
Well, from Win95, I get a "required DLL file WS2_32.DLL was not found". I looked at the source and saw that you were using Winsock 2 instead of Winsock. Eventually, you may want to consider downgrading to provide a larger comaptibility range. I checked a Win98 box, and Winsock 2 is installed there.

PS. Thanks for the work.


----------



## King Of Bayonne

Quote:

_Originally posted by RandyRazor_
*


Same results as before.


Thanks.*
Allright, let's try it one more time...


And I apologize for cluttering up the board with non-working utilities.







I have but a lone RTV4080 against which to test, and the app is working fine on my end... appreciate your collective patience while the bugs get worked out, and appreciate the testing and feedback.



KOB

 

rtv4kexplore.zip 51.638671875k . file


----------



## Griffon

Quote:

_Originally posted by Ed Rempalski_
*

Would sure like to know if there is any way to format/extract the Replay files DVD ready. Then DVD archiving would be a snap...
*
Short answer is no. All the DVD builder programs will have to convert the format just like if you where making VCD or SVCD disks and it takes a very long time even on a high end system .


----------



## Rich A

That is my first test test using the latest version of ReplayPC and the "raw" mpeg extraction. (no mpeg adjustments)


No problem anywhere. All the audio and video are fine. I think my original problem with the low 1/2 D1 Resolution mpegs might have been caused by my using a very early version of the ReplayPC. Since downloading and using the latest (vs .02 ??) it's been fine.


Took three short recordings for test of Low, Medium, and High Mpegs.


Extracted with -er option in ReplayPC


Dumped into Womble. Cut it and pasted it just to test.


Used the cuts directly from Womble as imported assets in my DVD authoring. (SpruceUp)


Burned a DVD Title Set to a CDR disk using all three flavors of the Replay Mpegs.


Stuck it in my DVD player and presto! Plays perfectly. No more re-encoding audio. It just drops right in as is.


Also I noticed those bars when in the PC environment. I had seen these before but always knew it to be a situation of the square pixel in the PC CRT vs rectangle pixels generated for TV viewing. The bars do not show up when the mpeg is viewed/played in a TV aspect ratio environment.


Mr. King of Bayone .. I would give you my first born .. BUT she's probably older than you. Your application has made one guy REALLY happy. Thank you ..


Now I gotta find a multiple disc DVD set top changer/player that can read DVD compatible source files burned to CDR media. My single disc Sampo works fine but this application has made DVD authoring a breeze and for the cost of a few 29 cent CDRs I can archive my favorite shows over two or three CDR discs. The last stumbling block to really inexpensive high quality "mini-dvd" authoring is going to be finding that DVD changer, so I don't have to get up off the couch every 20 minutes to change a disc.


All is in "sync" with the universe again.


----------



## mchurchm

Rich A, I would venture to guess that the same disc you burned does not play in other DVD players? Is the disc you burned a "miniDVD", and should play in any dvd player that will play miniDVD? I remember reading that the Sampo dvd players could read a disc with a replay mpg on it in which the video was not re-encoded (only the audio was re-encoded). Is this the case with the disc you burned? Or will it work in any miniDVD-compatible dvd player? I guess what I am asking is that since the audio specs have changed with the 4k units, have the video specs changed? Or with the exception of the difference in audio, should I expect the mpg's to behave identical to mpg's extracted from my 3k unit?


Not that it will help me much either way, since my apex doesn't seem to play miniDVD, and I don't have a Sampo or a replay 4k.


I am only asking to quench my curiosity, and hopefully to store that knowledge away in case I might need it sometime in the future (i.e. if I can afford a 4k unit).


----------



## Lee Thompson

This is pretty much for win32 but I suspect it could be ported to *nix without any trouble.


It's a bit ugly in places but works fairly well. The one part I haven't figured out yet is the category lookups. (It appears to be a bitmask but the order that they are stored in does not match so there's some bit of information that hasn't been tracked down yet







)


A compiled binary is included for those of you without a C++ compiler.




Coming up next, the GUI ReplayTV downloader thing that should make this even cooler... and.. one step!





Usage: guideparser pathname


Where pathname is the complete path to your Replay Guide file (usually guide.dat).


In most cases you'll want to pipe the output to a text file; e.g. *guideparser guide.dat > list.txt*




NOTE: This does require Winsock2 although it doesn't make any connections, the byte order conversion functions are being used.

 

guideparser04.zip 26.8203125k . file


----------



## Revwillie

cool stuff. I'm getting a stretched out video display using the Ravisent Cineplayer Basic DVD software XP pack.


Update....that problem didn't even show up when I loaded up the 'King of Queens' rerun from tonight. This is soooooo cool!.


----------



## Rich A

Quote:

_Originally posted by mchurchm_
*Rich A, I would venture to guess that the same disc you burned does not play in other DVD players? Is the disc you burned a "miniDVD", and should play in any dvd player that will play miniDVD? I remember reading that the Sampo dvd players could read a disc with a replay mpg on it in which the video was not re-encoded (only the audio was re-encoded). Is this the case with the disc you burned? Or will it work in any miniDVD-compatible dvd player? I guess what I am asking is that since the audio specs have changed with the 4k units, have the video specs changed? Or with the exception of the difference in audio, should I expect the mpg's to behave identical to mpg's extracted from my 3k unit?


Not that it will help me much either way, since my apex doesn't seem to play miniDVD, and I don't have a Sampo or a replay 4k.


I am only asking to quench my curiosity, and hopefully to store that knowledge away in case I might need it sometime in the future (i.e. if I can afford a 4k unit).*
Well there's a lot to be said about reading DVD title sets on CDR media in a stand alone DVD player. Too much to get into here. But I can say, I've been there and done that. Many of the new generation DVD set tops are now coming with "dual" laser pickups. This is the biggest deal in finding a DVD player that will decode CDR discs. It's a "media" thing. Commercial DVDs, and even commercial (S)VCDs do not reflect at the same wavelength as our consumer CDR discs. With a dual pickup they optimize one for commercial disc media and the other for consumer disc media. This gives it more of a chance to work with home made MP3 audio discs and (S)VCDs.


DVD reading on a CDR disc is even harder. Some DVD firmware when presented with DVD content on a CDR disc thinks it's something else and tries to decode it as an SVCD or VCD. Some firmware (like the Sampo DVD units) use a firmware set that is more in tune with the PC environment. Instead of trying to find out what "kind" of media is being use, they concentrate on the file content and use DVD discs drives that are more broad in their wavelength (like pc dvd drives). But I have to be honest. The Sampo I have (viewing quality wise) is not as good as other DVD set tops I've used and seen.


The guys at the local Tweeters and other electronics store run for cover when they see me coming. I visit them often with a few "test" discs to see what works and doesn't. Hey .. I even bought something from them once too!



I haven't yet compared the 2/3000 series mpeg to the 4000 yet as far as quality etc. But the only outwardly visible difference seems to be that they now have 48 Khz audio. It should also be noted that although I've done several dozen "mini-dvds" with the old 3000 series mpeg, I did often have trouble with joined areas and such, and often had to do some additional editing to make it right. This was more with the low quality than the medium or high. I mostly used the low. From what little I've seen so far, I'm optimistic that I'm going to have less trouble with the 4K source. I think that some of my trouble may have been caused when I was working to correct the 32 Kha audio with the old system. Time will tell.


----------



## King Of Bayonne

Lee, this is a very nice piece of work! And you even put COMMENTS in your code!!! 


I guess this obviates the need for me to work on rtv4kexplore any more...


Looking forward to the GUI-enhanced version.



KOB


----------



## brotheralwyn

First off, my thanks to everyone who is working on extracting data from the 4000! This is the reason I bought one!


Now, I have some issues with the extracted files and was wondering if anyone had some suggestions.


I've extracted some programs (Simpson's episodes) off of my 4K using both the Java and Win32 programs. Looks like it worked fine, but when I play the files (with either Media Player or Zoom) it plays for a few seconds, then locks up.


Looking at the files with FlaskMPEG, it looks like everything is there. Could this be a problem with my PC? It seems to play other files ok (though they are much smaller in size).


Anyone have any thoughts or experienced this?


----------



## RandyRazor

Quote:

_Originally posted by Lee Thompson_
*This is pretty much for win32 but I suspect it could be ported to *nix without any trouble.
*
Lee,


Thanks for your work and generosity in posting this tool. I tried it out on my system and I'm not getting the results I think I should be. I've attached the guide.dat (renamed to guide.txt) with the hope that you'll be willing to try it out and see if you get the same results as I. Here's what guideparser.exe produces:

ReplayTV 4000 GuideParser v0.04

(C) 2002 Lee Thompson


This is extremely alpha... but less alpha than yesterday.


Reading guide.dat

Reading ReplayTV Guide Header

You have 2148943528 channels and 13 shows.


Reading Channels

Channel #1:

Show: ³Äô


----------



## brotheralwyn

Ok, thinking that I needed an upgraded "codec" thingy, I installed this so-called "Nimo" codec pack. Well that just made things worse. Now when I try to play *.mpg files, I just get a blank screen. So I un-installed this Nimo thing, and now all I get is error messages!!!!


With Media Player I get: "No combination of filters could be found to render this stream." and the zoom player says: "Unable to create filters for [filename]".


Can anyone explain how I can get mpg video files to play again on my PC? Why is this so difficult? (it must have something to do with Microsoft!  )


Again, thanks for any help!


----------



## Lee Thompson

Quote:

_Originally posted by RandyRazor_
*


Lee,


Thanks for your work and generosity in posting this tool. I tried it out on my system and I'm not getting the results I think I should be. I've attached the guide.dat (renamed to guide.txt) with the hope that you'll be willing to try it out and see if you get the same results as I. Here's what guideparser.exe produces:


ReplayTV 4000 GuideParser v0.04

(C) 2002 Lee Thompson 


This is extremely alpha... but less alpha than yesterday.


Reading guide.dat

Reading ReplayTV Guide Header

You have 2148943528 channels and 13 shows.
*

Your guide data file is missing some important bytes at the start of the header section. It appears that around 20-40 bytes are missing.


If removing the ASCII header the first four bytes are:


0x00 0x03 0x00 0x01 Which I think is a version # (3.1)


The next four DWORDs are the number of shows and channels (each one of these is repeated for some reason) followed by the offset for the start of Channel data -- this is probably 0x00000328 in most cases.


The categories follow shortly thereafter but there's still a lot of unknowns.


Those of you writing downloaders, please be careful with this file! The ASCII header is expendable (a quick trick is to read until you hit a null then back up the file pointer by one...).


ReplayPC 02 appears to be cutting off the header as well so I've made a fix and posted "ReplayPC02b".

_Edit_:

Just a quick note; I've added detection for damaged guide files for GuideParser .05


----------



## Lee Thompson

I've fixed a bug in ReplayPC 02 which caused corrupt guide files to be created.


Source and binary included.

 

replaypc02b.zip 94.9775390625k . file


----------



## RandyRazor

Quote:

_Originally posted by Lee Thompson_
*I've fixed a bug in ReplayPC 02 which caused corrupt guide files to be created.


Source and binary included.*
Lee,


This new executable did the trick! Thanks again!


Randy.


----------



## Rich A




> _Originally posted by Lee Thompson_
> 
> *This is pretty much for win32 but I suspect it could be ported to *nix without any trouble.
> 
> 
> 
> 
> Usage: guideparser pathname
> 
> 
> Where pathname is the complete path to your Replay Guide file (usually guide.dat).
> 
> 
> Lee,
> 
> 
> I know this sounds stupid but how do I find the "path" to my Replay Guide?
> 
> 
> I tried "guideparser guide.dat" but I'm sure I need more than just the "file name" (guide.dat?) It keeps telling me it can't find the file.*


----------



## Lee Thompson

*Quote:*

_Originally posted by Rich A_


I know this sounds stupid but how do I find the "path" to my Replay Guide?


I tried "guideparser guide.dat" but I'm sure I need more than just the "file name" (guide.dat?) It keeps telling me it can't find the file.


1. Download the guide.dat in the directory of you choice using ReplayPC with the -g option. _replaypc IPADDRESS -g_.


2. Run GuideParser at a command prompt with a complete pathname to the guide.dat file downloaded in step 1. If it's in the same directory, you can omit the drive/directory.




Example:

_C:\\Temp> replaypc 192.168.0.7 -g
*Retrieving ReplayGuide file......

Done, ReplayGuide written to [guide.dat].
*


C:\\Temp> guideparser guide.dat > listofshows.txt

C:\\Temp>
_


(then open listofshows.txt in notepad)



If you just want to view the list onscreen:

_guideparser guide.dat | more_


----------



## Rich A

Thanks Lee.


Now I understand. I didn't realize that it wasn't a "stand alone" program. I shudda taken a hint by it's name "guide ... PARSER". I stupidly didn't run the ReplayPC first to "get" the guide to parse !!


Sorry about that. On an off topic note .. I have software I've spent hundreds of dollars for, and don't get "service" like this!! You guys are top shelf. Thanks ..


----------



## Lee Thompson

The fancier programs are coming


----------



## Lee Thompson

Here is an updated version of GuideParser, still no categories but many fixes/improvements.


Windows Binary (Windows 98/ME/NT/2K/XP should work) and source included.

 

guideparser05.zip 73.44921875k . file


----------



## nystratton

I am going to start ordering part for my video server. I am going to use a Linux based system with a Promise SX1600 in RAID 5 mode with 6 160 Gig drives. This should give me a 800 Gig video partition (you can't count the parity drive). My question is once I get that done if I had the system full of video would do the Replay 4000 units even have enough horsepower to run look at that much video in the guide data.


P.S. Before anyone asks why I need 800 gigs of video, my gool is to move all my VHS taps, DVDs, and things like every episode of my favorite programs in high resolution mode.


-Nathan
http://www.robotics.net/replay


----------



## SmokeBringer

Quote:

_Originally posted by nystratton_
*I am going to start ordering part for my video server. I am going to use a Linux based system with a Promise SX1600 in RAID 5 mode with 6 160 Gig drives. This should give me a 800 Gig video partition (you can't count the parity drive). My question is once I get that done if I had the system full of video would do the Replay 4000 units even have enough horsepower to run look at that much video in the guide data.
*
That's a good question. One feature that I might suggest for those of you working on the PC Server software would be "Video Sets" or "Views". Say you have an 800 GB server with 100s of movies and episodes. But perhaps you are only interested in exporting all of your Star Trek NG episodes. It would be nice to create a "View" of the total database that has only STNG episodes. Just a thought.


----------



## SmokeBringer

There are many of us who have Replays on order but don't have hardware yet. I'm wondering if 2 computers could run a ReplayPC server program and essentially operate with each other as if they were Replay4000 boxes. This would allow folks like myself to jump in and help with development.


Also thinking out loud. I wonder if ReplayPC server could be intergrated with a GnuTella app (e.g. Gnucleus) to provide a way of pushing content out to more clients on the Internet. Just thinking...


----------



## Lee Thompson

Quote:

_Originally posted by SmokeBringer_
*There are many of us who have Replays on order but don't have hardware yet. I'm wondering if 2 computers could run a ReplayPC server program and essentially operate with each other as if they were Replay4000 boxes. This would allow folks like myself to jump in and help with development.


Also thinking out loud. I wonder if ReplayPC server could be intergrated with a GnuTella app (e.g. Gnucleus) to provide a way of pushing content out to more clients on the Internet. Just thinking...*
The server 'emulator' I'm sure someone is working on -- as for internet sharing ala GnuTella -- I don't think it's that practical (unless you're on a T3 or better  ) as the files are from 400 - 1600MB per half hour.


----------



## FlipFlop

Quote:

_Originally posted by nystratton_
*My question is once I get that done if I had the system full of video would do the Replay 4000 units even have enough horsepower to run look at that much video in the guide data.
*
If this proves to be a problem, an option would be to use IP aliasing and have multiple ReplayPC server programs running, one for each IP address you give the PC.


If each instance of the server program has its own IP address and configuration and video files, then that one machine will appear as several different replaytv machines to the ReplayTV. Each replaypc server can then store a separate set of video files, and all of them would share the same 800GB storage space.


----------



## SmokeBringer

Quote:

_Originally posted by Lee Thompson_
*


The server 'emulator' I'm sure someone is working on -- as for internet sharing ala GnuTella -- I don't think it's that practical (unless you're on a T3 or better  ) as the files are from 400 - 1600MB per half hour.*
I've download some very large files via Gnucleus. I just let it run overnight. I have cable modem though, so I understand this wouldn't be viable on a dialup connection.


I guess the bottom line is that if you can share via Replay4000 peer-to-peer you can do it via GnuTella Network as well. I'm sure they both consume the same bandwidth.


----------



## Axlrod

I was just looking at my drive, and I found a file called Circular.mpg


The neat thing about this file is that it as the live buffer.


I dumped it to my pc, and guess what ...


Instant saved live buffer.


neat little way to save that show you decided you wish you had thought to tape 20 minutes after you started watching.


BYW I love what everyone is doing with this project.


OUT


----------



## dfrumin

Sorry I've been quiet. Got sidetracked into actual work and had to do a bunch of coding for that which ate all my time. I'm hoping to post the ReplayServer 0.01 code by monday.


As some of you know, I have a working ReplayServer that serves to RTVs. To answer the question on the 800GB of video stuff, I'm already seeing slowdowns across my two RTVs with 40 channels and 20 shows.


ReplayServer supports multiple instances right now, so there's no reason not to run multiple servers pointing at different subdirs fro this very reason (a Pinky and the Brain server with nothing but, a Star Trek server, etc.)


I've also been considering adding an IP filter to the server so you could say that some servers only answer to certain RTVs. That will help if you archive a bunch of shows/movies on the PC that you don't want the kids to see in their room.


My eventual goal? Have a 4040 in every room and 800GB of space on a server to handle them all. Then never have to open another RTV for upgrades again.


- dan

Quote:

_Originally posted by FlipFlop_
*


If this proves to be a problem, an option would be to use IP aliasing and have multiple ReplayPC server programs running, one for each IP address you give the PC.


If each instance of the server program has its own IP address and configuration and video files, then that one machine will appear as several different replaytv machines to the ReplayTV. Each replaypc server can then store a separate set of video files, and all of them would share the same 800GB storage space.*


----------



## dfrumin

Be very careful with this file. In my old RTV2k series box, I had this file get corrupt and it showed as being larger than the drive size. The result? The whole RTV broke b/c it couldn't display live tv (no space in drive for the circular file) and wouldn't play any shows either.


The only way to fix at the time was to take the drive out and go in and fix the directory partition by hand.


I'm not saying httpfs-readfile can cause that, but it certainly wasn't meant for it, so be careful.

Quote:

_Originally posted by Axlrod_
*I was just looking at my drive, and I found a file called Circular.mpg


The neat thing about this file is that it as the live buffer.


I dumped it to my pc, and guess what ...


Instant saved live buffer.


neat little way to save that show you decided you wish you had thought to tape 20 minutes after you started watching.


BYW I love what everyone is doing with this project.


OUT*


----------



## honus87

Just posted Replayer V0.2. This adds the first bit of guide parsing. Instead of seeing a list of dates, you'll now see also see the show, episode title, and description for each show.


Note one small change from pervious version, the class to run is now replayer.Downloader, so you run it by saying "java -cp replayer.jar replayer.Downloader" or just double-click the jar file if you're running Windows.

http://www.forbesfield.com/replayer.jar 


Thanks, of course, to all the people figuring this stuff out. I figured some of it out but didn't have time to get it all. I pretty much cribbed all the guide parsing stuff from Lee's program.


-Tom


----------



## mlinehan

 We are LIVE on SourceForge! 


The ReplayPC project has been accepted for hosting on SourceForge dot net, so:


If you would like to contribute to the ReplayPC project, contact [email protected] We will get you setup with a SourceForge account, and Project ReplayPC membership.


Working on a related but seperate tool? Come on down! Project ReplayPC has plenty of MegaBytes to spare and we are willing to share! We will get you setup as a Project ReplayPC team member, and create a seperate package to host your code! Together we WILL make ReplayTV the best damn PVR ever!


We got www, fileservers, forums for users and developers, mail lists, news and surveys! But act quickly, project hosting services are selling fast, and there is no telling how long we can keep this up!


I therefore thow open the gates to any and all who would join us in the wonderous adventure that is sure to come, and may God have mercy on our Souls! One Project to rule them all, One Project to find them, One Project to bring them all and in the darkness bind them... Oh... I though you had gone... I sometimes mutter to myself a bit... Let it bother you not.

http://replaypc.sourceforge.net 

*ReplayPC - Watching TV not only WHEN you want, but WHERE you want!*


----------



## Ed Rempalski

Tom, I tried Replayer v0.2. It runs, I give it the IP and it returns with an empty dialog box, no data at all.


v0.1 works fine, returns with 21 shows.


----------



## honus87

Hey Ed,


Are you running it by double-clicking or in a shell? I'm just wondering if there is any text output, an exception being tossed or something. A window with no data in it makes me think a thread may have died because of an exception.


I'll have to add an option to suck data down (unless you are running a PC and can use ReplayPC to get it). Having more datafiles to test against would be helpful.


-Tom


----------



## Sharky

Quote:

_Originally posted by Ed Rempalski_
*Tom, I tried Replayer v0.2. It runs, I give it the IP and it returns with an empty dialog box, no data at all.
*
Same thing happens for me. I'm using Java 1.4.0-beta3-b84 on a WinNT PC. The exception is shown below.


By the way, will this program work against remote Replay boxes, or does it rely on Multicast or something similar that would prevent it?


java -cp replayer.jar replayer.Downloader

Major is: 3, minor is: 1

Replays shows: 33, ReplayChannels: 32, Offset: 808

java.lang.ArrayIndexOutOfBoundsException

at replayer.Downloader.readDescription(Downloader.java:377)

at replayer.Downloader.readChannel(Downloader.java:446)

at replayer.Downloader.getGuideData(Downloader.java:538)

at replayer.Downloader.jbInit(Downloader.java:261)

at replayer.Downloader.(Downloader.java:195)

at replayer.Downloader.main(Downloader.java:726)


----------



## Ed Rempalski

Tom, I ran it by double clicking in WinXPpro. Using Sun Java. It opens the initial dialog, enter IP, Opens an empty result box. No errors reported. v0.1 runs fine.


I did have an incident when the 4040 had lost it's ability to connect, both 243 zones and your app. Soft boot restored all comms. When this was happening you apps accept the IP and then just go away when there is no connect, all without errors reported.


----------



## honus87

yeah, right now all error reporting is done by text output, so if you run by double clicking you won't see it. Better error reporting is on the list of things to work on.


----------



## Revwillie

I'm getting almost the same error as sharky:



C:\

eplay>java -cp replayer.jar replayer.Downloader

Major is: 3, minor is: 1

Replays shows: 33, ReplayChannels: 15, Offset: 808

java.lang.ArrayIndexOutOfBoundsException

at replayer.Downloader.readDescription(Downloader.java:377)

at replayer.Downloader.readChannel(Downloader.java:446)

at replayer.Downloader.getGuideData(Downloader.java:538)

at replayer.Downloader.jbInit(Downloader.java:261)

at replayer.Downloader.(Downloader.java:195)

at replayer.Downloader.main(Downloader.java:726)



Does it have anything to do with the fact that I'm currently transferring a show over the internet to someone?


----------



## honus87

Ok, I took a guess at what the problem might be and uploaded a quick patch. I'll have something that should help debug a little better later tonight, but you can try 0.2a if you'd like.


It is at the same place http://www.forbesfield.com/replayer.jar 


It should work with remote machines without a problem, I'm not doing any multicast, but putting a Replay 4000 on the net with its port 80 open to the world is a VERY BAD IDEA. You can send delete commands over this connection.


-Tom


----------



## Revwillie

Same result with 2a


C:\

eplay>java -cp replayer.jar replayer.Downloader

Major is: 3, minor is: 1

Replays shows: 33, ReplayChannels: 15, Offset: 808

java.lang.ArrayIndexOutOfBoundsException

at replayer.Downloader.readDescription(Downloader.java:358)

at replayer.Downloader.readChannel(Downloader.java:428)

at replayer.Downloader.parseGuideData(Downloader.java:537)

at replayer.Downloader.getGuideData(Downloader.java:511)

at replayer.Downloader.jbInit(Downloader.java:228)

at replayer.Downloader.(Downloader.java:162)

at replayer.Downloader.main(Downloader.java:726)


----------



## Ed Rempalski

v0.2a same result with double click as well. Empty Result


----------



## honus87

I just put v0.2c up. This has a debug menu that lets you save your guide data. (Don't ask about v0.2b)


But, you don't actually get far enough to use the debug menu because of the exception, so you need to tell it to skip the inital read. To do this, you have to run it from a command line like this:


java -cp replayer.jar -Dreplayer.skipdata=true replayer.Downloader


If one of you would be willing to do that and then either post your data or email it to me at [email protected] I could try to track down the problem.

http://www.forbesfield.com/replayer.jar 


-Tom


----------



## Sharky

Same result with version 0.2c:


java -cp replayer.jar -Dreplayer.skipdata=true replayer.Downloader

Major is: 3, minor is: 1

Replays shows: 33, ReplayChannels: 32, Offset: 808

java.lang.ArrayIndexOutOfBoundsException

at replayer.Downloader.readDescription(Downloader.java:358)

at replayer.Downloader.readChannel(Downloader.java:428)

at replayer.Downloader.parseGuideData(Downloader.java:537)

at replayer.Downloader.getGuideData(Downloader.java:511)

at replayer.Downloader.jbInit(Downloader.java:228)

at replayer.Downloader.(Downloader.java:162)

at replayer.Downloader.main(Downloader.java:726)


----------



## honus87

I've uploaded Replayer V0.3. This now does a tree display showing you your channels and the shows in them.

It is at http://www.forbesfield.com/replayer.jar 



Well it does if it works for you. I suspect that I have bugs related to theme channels since I don't have any on my machine right now.


First, let me apologize, I didn't actually upload v0.2c. I uploaded a jar file but it was the old one. Sorry. So if you're getting the exception, please download the latest one and run it like this:


java -cp replayer.jar -Dreplayer.skipdata=true replayer.Downloader


Pick "Save guide data" from the debug menu and e-mail it ([email protected]) or post it. (And I double checked to make sure I have the right one up there).



Here's a screen shot. I probably shouldn't include it since it reveals a horrible secret.
http://www.forbesfield.com/replayer0_3.png 

Yes, I record almost everything at standard quality.


Well I hope it works for someone else, and if it doesn't work for you, please send me the guide data if you can, and I'll see if I can figure out what the problem is.


----------



## Dallben

Honus,


cool! It works almost perfectly.... the title of the show under one of the channels (not a theme channel) is all corrupted.... It's been e-mailed to you...


----------



## honus87

v0.3a fixes the bug some of you were seeing. Thanks to Sharky (it was Sharky wasn't it?) for sending me the guide data.


Turns out I assumed that channel descriptions were never all nulls, which is a bad assumption. Not that I realized I was assuming that.


Also, he pointed out that from the command line you don't have to specify the class to run, you can just type "java -jar replayer.jar"


Thanks!


On to the next problem


----------



## Ed Rempalski

Tom, Much better!


1st try same problem, I dumped the largest theme (10 shows).

2nd try it worked!

3rd and subsequent, only theme folders show, no way to expand them..


I mailed my guide data to you.


----------



## Ed Rempalski

v0.3a works every time! I created a theme with 0 shows and it seems to show that too. I notice that there's no date/time stamps for shows. Is that a do-able option?


Getting late, off to sleep. Thanks so much!!!


----------



## Dallben

Quote:

_Originally posted by Dallben_
*Honus,


cool! It works almost perfectly.... the title of the show under one of the channels (not a theme channel) is all corrupted.... It's been e-mailed to you...*
Still having the same problem... emailed you a screenshot as well...


tks


----------



## honus87

Quote:

_Originally posted by Ed Rempalski_
*I notice that there's no date/time stamps for shows. Is that a do-able option?*
Ooops, that was just an oversite on my part. Will get those in there.


As for the problem Dallben is seeing, I also see it when I use his guide data. There is this strangeness in shows that they description doesn't always start at the same place. Right now we kind of guess, and the way we're guessing doesn't work for that show. I suspect that somewhere there is an offset that we haven't realized yet, but this one isn't going to be a quick fix that happens tonight, cause I'm about to go to sleep. 


-Tom


----------



## honus87

Ok, one last update for tonight, which adds the dates into the show description.

http://www.forbesfield.com/replayer.jar 


Enjoy


-H


----------



## whirly

Here is a little bit of nostalgia for those who have fogotten DOS completely ... or never booted up to the A:> DOS Command Prompt:


Add a redirect (> filename.ext) to the command line for those DOS porgrams that have screen output and you can save the data to a file. Examlpe:


..\\RTV4explore www.xxx.yyy.zzz 


will output your directory listing with all sorts of additional data. However, if you add the redirect to a file, like this


..\\RTV4explore ww.xx.yy.zz > dirlist.txt


You will get the whole list saved to disk for future reference.


Same thing works for ..\

eplaypc www.xxx.yyy.zzz -d


I know the codesmiths are doing this but many of us observers may not remember the little tricks we used with DOS 1.0. BTW this works with both DOS prompts in Win 95/98/Me and Win2k/NT Command Prompts .... Win XP folks you'll just have to try it, I haven't the foggiest if it works for you ..


----------



## Dallben

Quote:

_Originally posted by whirly_
*Win XP folks you'll just have to try it, I haven't the foggiest if it works for you ..*
Yes. it still works... it'll also work for any flavor of *NIX that I've ever used.


----------



## Sharky

Here's a shareware DVD player that seems to work with the Replay MPEG files:

http://www.moonlight.co.il/download/index.shtml 


Download the one called "Elecard MPEG2 Player v. 1.35"


I was also able to get the Mediamatics "DVD Express" program to play the files, but I don't think it's shareware.


----------



## Dallben

Quote:

_Originally posted by Sharky_
*Here's a shareware DVD player that seems to work with the Replay MPEG files:

http://www.moonlight.co.il/download/index.shtml 


Download the one called "Elecard MPEG2 Player v. 1.35"


I was also able to get the Mediamatics "DVD Express" program to play the files, but I don't think it's shareware.*
Works Great! wonder if that little overlay in the upper-right corner goes away if it's registered.... probably...


----------



## Sharky

Quote:

_Originally posted by Dallben_
*Works Great! wonder if that little overlay in the upper-right corner goes away if it's registered.... probably...*
At least that little logo or whatever it is doesn't show up in the bitmap frame-capture files.


I've only tried standard and medium files so far. My old 500 MHz P-III can barely keep up with the medium resolution files. I'm guessing high resolution files will require a faster CPU (maybe a good reason to upgrade, at last!)


BTW, will it eventually be possible to write the video files back to the Replay box, instead of (or in addition to) using the upcoming server application?


----------



## Dallben

Quote:

_Originally posted by Sharky_
*



I've only tried standard and medium files so far. My old 500 MHz P-III can barely keep up with the medium resolution files. I'm guessing high resolution files will require a faster CPU (maybe a good reason to upgrade, at last!)
*
High Qualities work great (Athlon 900mhz) and the plus is the elecard mpeg player installed the codec, so now it works with media player as well!


----------



## plazma75

Does anyone else have any problems with MPG's coming of their replay and the sound is slowed down to like half the video rate? If so, do you think there is anyway to fix this?


I noticed this though, most of my Hour long Standard recordings are 865MB, the ones that come through that play weird are 906MB.


Thanks for any input.


-plazma75


----------



## Revwillie

replayer v0.3b works great for me....Thanks loads honus....


----------



## KenL

Quote:

_Originally posted by honus87_
*Here's a screen shot. I probably shouldn't include it since it reveals a horrible secret.
http://www.magicalcheese.com/uploads...player0_3_.jpg 
*
honus87 I thought you were gonna say you shouldn't include it because we might discover your horrible indulgence... that recurring Friends channel?? Some around here don't have "Friends" or watch "Friends".

(You know who you are) 
Quote:

_Originally posted by honus87_
*Yes, I record almost everything at standard quality.
*
Oh that's all it is. Yes with a reasonable signal to feed it standard quality is better on this one. Since we can easily export you might be able to bump it up a notch? ...medium quality?


Thanks ALL for the efforts here!! Poor TiVo doesn't stand a chance!


----------



## toots

Hmm. Castrovalva. I really liked that episode.


----------



## Kirkster

Honus is my hero!


Suggestions (push these way way way back on the list)


Config file or command line option for IP address.

Push app window to the foreground when it is executed.


----------



## toots

Ok, it's time for me to display just total ignorance.


I've had no problems making all the command line ditties work, and work they do well.


I just can't figure out how to launch that java app. I give the "Java" command to my command prompt, and it tells me no such command. I double click the .jar file, and it brings up that dialog asking what program I want to use to execute the file.


Two different systems, both running standard/full W2K installs.


----------



## centaur

Hey Honus, it works great in BSD and Linux as well! Thanks.


OT: is it possible to change the ugly theme of Java apps to something like Acqua with antialiasing?


----------



## madSkeelz

Quote:

_Originally posted by centaur_
*OT: is it possible to change the ugly theme of Java apps to something like Acqua with antialiasing?*
Sure, just use OSX! 


Actually, it's dependent on the Swing libraries, right? I know that Apple uses their own *******ized Swing libs so that everything looks pretty. I would assume you could *******ize your own Swing libs to make 'em look pretty.


--

-mS


----------



## madSkeelz

Quote:

_Originally posted by madSkeelz_
*


Sure, just use OSX! 


Actually, it's dependent on the Swing libraries, right? I know that Apple uses their own *******ized Swing libs so that everything looks pretty. I would assume you could *******ize your own Swing libs to make 'em look pretty.
*
apparently b-a-s-t-a-r-d is in the No No Dictionary. In which case, I meant "skankified".


and yes, I'll stop quoting myself right now.


--

-mS


----------



## agattas

Quote:

_Originally posted by toots_
*Ok, it's time for me to display just total ignorance.


I've had no problems making all the command line ditties work, and work they do well.


I just can't figure out how to launch that java app. I give the "Java" command to my command prompt, and it tells me no such command. I double click the .jar file, and it brings up that dialog asking what program I want to use to execute the file.


Two different systems, both running standard/full W2K installs.*
toots, i had the same problem until i realized i had to get the java runtime environment from java.sun.com - find your way thru their downloads until you find j2re-1_3_1_02-win.exe. then you can do the java thing with honus' jar file...


----------



## MasterK

Quote:

_Originally posted by toots_
*Ok, it's time for me to display just total ignorance.


I've had no problems making all the command line ditties work, and work they do well.


I just can't figure out how to launch that java app. I give the "Java" command to my command prompt, and it tells me no such command. I double click the .jar file, and it brings up that dialog asking what program I want to use to execute the file.


Two different systems, both running standard/full W2K installs.*
Sounds like you do not have Java installed. I am on win XP and I had to go to http://java.sun.com/getjava/installer.html and install the Java plug-in. Now it runs fine. Oh also be carefull if you use any Ad filtering or firewall software.


----------



## toots

Thanks muchly.


----------



## honus87

Quote:

_Originally posted by toots_
*Hmm. Castrovalva. I really liked that episode.*
The worse part is the local PBS station seems to have changed from showing two episodes a week to just one! How can I be expected to get by on only half-an-hour of Dr. Who a week?


At least they are showing the Peter David episodes, and hopefully will continue with the other doctors after him. I know people didn't like them as much but I haven't gotten to see many of the post Peter David episodes. I've only seen most Peter David ones once, and I've seen the Tom Baker one a zillion times each, so I'm glad to finally have something that is almost new.


Maybe I need to start looking for other people getting Dr. Who to send me episodes.


----------



## dfrumin

ReplayServer v0.1 is live on my site ( http://206.124.140.12/rtv ).


This program allows the PC to act as an RTV in your RTV network and serve video. It now correctly broadcasts itself every 29mins to make sure the RTVs continue to see it.


Source is included, though it's limited in license to you and your mucking with it. It's not ready to be GPL'ed out, but hopefully by next rev it will be (don't ask, I just haven't cleaned up, put copyrights, etc.) But, since folks have been asking for it, I thought I'd put it up.


Object Model:

I favor programs that do everything through object classes so people can put their own GUIs on it independent of the lower level functionality. The intent was to write an object oriented ReplayServer that could be launched from command line, windowed app, integrated with web servers, etc. I didn't succeed in this pass, so I'm rewriting the whole thing from scratch (yay ). If you have suggestions on the objmodel after looking at what I put there, let me know.


Web Server:

The source for this includes a mini-web server that I wrote. It is possible to hook my code into Apache or other web servers, but not easily right now. The code for the web server and RTV server merged a little too closely. That's part of the rewrite I need to do.


Features:

4700 missing. If you have ideas, send them my way. I'll try and get them in by the next rev which should be soon.


Porting to *nix:

I wrote this code in a 12hr binge. I know there are 100 windows specific things in there that normally I would encapsulate in classes that are separately portable (e.g. file stuff). If you look at the code and start to port it, send me your changes and I'll try and make the next rev more portable with your help.


After a bit more mucking with ReplayServer I'll write the guide generator with all the great work Lee's put in to the guide format. That should allow the individual addition and removal of programs from an RTV to the RTV server.


Comments (as always) are welcome.


dan


----------



## TanRanger

Ok... Peering into my magic 8-ball I will now divine the future.


I see... I see... a file server with a big ol' stripe set in it that serves up shows that are all recorded in High quality (yay!).


I see... a replay PC utility that runs on the server and performs nightly extractions of all the shows on the RTV 4XXX(s) on the network.


I see... after the nightly backup, the server will delete the shows off of the RTV 4XXX(s) to save space. Perhaps it will exclude specific "My Favorite" folders from this automatic deletion.


I see... clients which turn any (fast) pc into a playback device. And especially those PCs with RCA or S-video out ports for playback on other TVs.


I see... SonicBLUE might push us software upgrades that will attempt to defeat our replay PCs and replay servers. Yuck.


I see... all you cool hackers/developers getting free ReplayTV 4320s because of shipping errors or something because you all deserve them. Thanks immensely, friends. Please open source all of your RTV projects.


----------



## Lee Thompson

No no it's not quite done yet but it will be soon.


This is a screenshot from it, the bar at the bottom is the download progress bar which isn't completely coded yet 

http://stargate.logh.net/replayxferpreview.jpg 



This is for Windows 98/ME/NT/2K/XP although I'll only be testing it on the latter two platforms.


You'll also be able to sort on any of the column headings (and they are resizable).


"Rename MPEGs" will store the MPEG on your hard drive as "Showname - Episode Title.mpg" instead of the timestamp filename (e.g. 10073941940.mpg).


Comments, suggestions, and feature requests are welcome.


----------



## RandyRazor

Quote:

_Originally posted by dfrumin_
*ReplayServer v0.1 is live on my site ( http://206.124.140.12/rtv ).


This program allows the PC to act as an RTV in your RTV network and serve video. It now correctly broadcasts itself every 29mins to make sure the RTVs continue to see it.

*
Dan,


Sorry if this is a stupid question, but how does this thing work? I've gotten it to run (I think) but I don't know how to communicate with it. I've edited the replayserver.cfg file to reflect something other than my real ReplayTV but I can figure out how to get it to "send" my ReplayTV a show. Nothing appears in the "received" category. Do I need to do something in addition to starting the server?


Thanks for all your work!


Randy.


----------



## dfrumin

No problem Randy, the docs on this are somewhat sparse ;-)


The ReplayServer doesn't work by sending the RTV shows. It behaves as another RTV would inside your home network.


Here's a few simple steps to get it up and running before more complex docs:

- get the guide from your existing rtv using ReplayPC. Name it ##########.rgd

- get one or more mpg/ndx files (known ones preferably or it will crash) from your RTV and put them in the folder. Be sure to use -er for raw extract.

- run the server


Now, wait a minute or so and go to your RTV:

- go to replay guide

- click "jump" until you get to the rtv selector (top right)

- click right / left until you see your server (mine is Server 6)

- it should read the guide that you put in there

- scroll down to the show you uploaded to your PC

- click play


Hopefully everything works from that moment on.


- dan

Quote:

_Originally posted by RandyRazor_
*


Dan,


Sorry if this is a stupid question, but how does this thing work? I've gotten it to run (I think) but I don't know how to communicate with it. I've edited the replayserver.cfg file to reflect something other than my real ReplayTV but I can figure out how to get it to "send" my ReplayTV a show. Nothing appears in the "received" category. Do I need to do something in addition to starting the server?


Thanks for all your work!


Randy.*


----------



## Dallben

Quote:

_Originally posted by dfrumin_
*No problem Randy, the docs on this are somewhat sparse ;-)


The ReplayServer doesn't work by sending the RTV shows. It behaves as another RTV would inside your home network.


Here's a few simple steps to get it up and running before more complex docs:

- get the guide from your existing rtv using ReplayPC. Name it ##########.rgd

- get one or more mpg/ndx files (known ones preferably or it will crash) from your RTV and put them in the folder. Be sure to use -er for raw extract.

- run the server

- dan

*
Dan,


Still can't see the replayserver in my replayguide on my 4080. I've tried running it on 2K Pro & XP Pro... The server IS running, but the 4080 doesn't see it (I've tried changing the name and also rebooting... no success) Any thoughts?


----------



## dfrumin

Let's start with a few simple tests:


In a browser, you should be able to type:
http:// [YOURIP]/Device_Descr.xml


It should come back with the same IP that's in the cfg file and all the right config info. Also, be sure that the server name doesn't include anything other than alphanumerics and space.


Assuming that works, try and use ReplayPC to get the guide:


ReplayPC YOURIP -g


And then compare it binary (fc /b) to the rgd file in the ReplayServer folder.


Let me know if those both worked.

Quote:

_Originally posted by Dallben_
*


Dan,


Still can't see the replayserver in my replayguide on my 4080. I've tried running it on 2K Pro & XP Pro... The server IS running, but the 4080 doesn't see it (I've tried changing the name and also rebooting... no success) Any thoughts?*


----------



## Sharky

What's the story with the SerialNumber and UUID fields in the ReplayServer.cfg file? Should they just be left alone? Does the Replay software do any validation on those values?


The UUID is hard-coded in CRTVServer::bcastState(), which seems to conflict with the idea of having the value in the config file.


----------



## dfrumin

I don't know that the Replay does anything with them right now but I changed them from my own RTVs in case it does (initial mapping or who knows what). Safe bet is to randomly put stuff there or find your existing ones ( http://replayip/device_descr.xml ) and change those.

Quote:

_Originally posted by Sharky_
*What's the story with the SerialNumber and UUID fields in the ReplayServer.cfg file? Should they just be left alone? Does the Replay software do any validation on those values?*


----------



## Dallben

Quote:

_Originally posted by dfrumin_
*


Let me know if those both worked.

*
Yep.. both worked.. FC said no differences encountered, and the device_descr.xml came up and looked fine.


----------



## dfrumin

Hmm...


One quick thing that was pointed out to me just now - the IP Address in the cfg file should point to your PC, not the RTV. Not sure if that was obvious or not.


Assuming that's correct, let's try ending the server "correctly" so it sends the UDP packets and then restarting a minute later.

http://PCIP/end and refresh a couple of times. If you use task manager, the ReplayServer should not be running.


Try that and we'll go from there.


Ah, I love debugging 

Quote:

_Originally posted by Dallben_
*


Yep.. both worked.. FC said no differences encountered, and the device_descr.xml came up and looked fine.*


----------



## Sharky

Can someone explain the reason for the "modified" vs. "raw" MPEG files?


It sounds like the raw files are needed for the server application, but they need to be modified in order to be played back on a PC. Is that right? If so, is it possible yet to convert a raw file to a modified one without having to download it again?


----------



## Lee Thompson

Quote:

_Originally posted by Sharky_
*Can someone explain the reason for the "modified" vs. "raw" MPEG files?


It sounds like the raw files are needed for the server application, but they need to be modified in order to be played back on a PC. Is that right? If so, is it possible yet to convert a raw file to a modified one without having to download it again?*
It would be trivial to write a modifier program that could be used an already downloaded file.


I have also been able to play unmodified files on my system so it probably depends on your MPEG2 codec and playback software.


----------



## dfrumin

So far I've only been able to play RTV MPG files with PowerDVD (trial ver) and it will play mod or unmod. So short of finding a freeware codec that will actually play these things, I'm going to have to buy powerdvd, in which case - no issue...


dan

Quote:

_Originally posted by Sharky_
*Can someone explain the reason for the "modified" vs. "raw" MPEG files?


It sounds like the raw files are needed for the server application, but they need to be modified in order to be played back on a PC. Is that right? If so, is it possible yet to convert a raw file to a modified one without having to download it again?*


----------



## Dallben

Quote:

_Originally posted by dfrumin_
*Hmm...


One quick thing that was pointed out to me just now - the IP Address in the cfg file should point to your PC, not the RTV. Not sure if that was obvious or not.*
It was. 

*Quote:*

Assuming that's correct, let's try ending the server "correctly" so it sends the UDP packets and then restarting a minute later.

http://PCIP/end and refresh a couple of times. If you use task manager, the ReplayServer should not be running.


Try that and we'll go from there.


Ah, I love debugging 

Been there. Done that.  I've also run a sniffer... my pc is broadcasting to 255.255.255.250, just in case you wanted to know... though I don't see anywhere to change that option (unless I look in the source, which to be honest, I havn't.)


Tks!


----------



## dfrumin

Hmm... What sniffer are you using? I'm using ethereal and here's what you should see:


2 sets (to be safe) of SSDP packets being broadcast on 239.255.255.250 port 1900.

An HTTP GET request from your RTV to your PC asking for Device_Descr.xml


Can you check that that happened?


thx.

Quote:

_Originally posted by Dallben_
*


Been there. Done that.  I've also run a sniffer... my pc is broadcasting to 255.255.255.250, just in case you wanted to know... though I don't see anywhere to change that option (unless I look in the source, which to be honest, I havn't.)


Tks!*


----------



## lister

I'd like to thank the programmers and debugging users for their work on the ReplayTV 4000 so far. Since both SonicBlue and TiVo consider us as non-customers I've been itching to get a unit like this but without guide data it largely is only a dumb VCR on steroids. Should complete support of uploading guide data from sites like tvguide.ca or zap2it.com become available, I may get an American friend to purchase a unit for me. 


I really like the idea of archiving and serving out video from a PC.


SonicBlue: Don't you dare issue an update solely to screw them up!


----------



## Dallben

Quote:

_Originally posted by dfrumin_
*Hmm... What sniffer are you using? I'm using ethereal and here's what you should see:


2 sets (to be safe) of SSDP packets being broadcast on 239.255.255.250 port 1900.

An HTTP GET request from your RTV to your PC asking for Device_Descr.xml


Can you check that that happened?


thx.

*
OK, the SSDP packets are going out from my pc just fine... But I don't get anything back from the replay.


Doh!!! Wait a minute, this sniffing isn't gonna work, I just put a switch in!  I'll replace it with a hub and be back in a minute.


----------



## Sharky

Quote:

_Originally posted by dfrumin_
*So far I've only been able to play RTV MPG files with PowerDVD (trial ver) and it will play mod or unmod. So short of finding a freeware codec that will actually play these things, I'm going to have to buy powerdvd, in which case - no issue...
*
Have you tried the Elecard shareware player and codec that I mentioned in an earlier post? I haven't tried it on the raw files yet, though.


----------



## klaatu

Are there any unix users out there? I wrote a tool to fetch content from my replay tv and pipe it to MPlayer v0.60. MPlayer happily detects the data as a MPEG-PS (program stream), however the video is filled with what looks like motion compensation errors and the audio is about 5-10 second ahead of the video. After playing for 60-90 seconds the audo stops with a demux error. The file I was playing was recorded in high quality.


Has anyone tried a similar experiment?


BTW, when I stream to a file, I get about 2450kB/s (the replay was recording at the time).


----------



## Dallben

Quote:

_Originally posted by dfrumin_
*Hmm... What sniffer are you using? I'm using ethereal and here's what you should see:


2 sets (to be safe) of SSDP packets being broadcast on 239.255.255.250 port 1900.

An HTTP GET request from your RTV to your PC asking for Device_Descr.xml


Can you check that that happened?


thx.

*
Okay, no more switch 


I still don't see the replay hitting my PC for anything... I see 6 SSDP packets on UDP 1900, but the replay doesn't do anything.


----------



## Dallben

Quote:

_Originally posted by Sharky_
*


Have you tried the Elecard shareware player and codec that I mentioned in an earlier post? I haven't tried it on the raw files yet, though.*
Even with the Elecard codec, you still need to register it 'cause there's a little graphic in the upper-right hand corner. (Which for the moment, I'm perfectly happy to live with.)


----------



## RandyRazor

Quote:

_Originally posted by Dallben_
*


Okay, no more switch 


I still don't see the replay hitting my PC for anything... I see 6 SSDP packets on UDP 1900, but the replay doesn't do anything.*
Well,


What do ya know... I just left tit alone for a while and the ReplayServer appeared! I think the ReplayTV just has a schedule for doing things. Just try waiting for a while and let it happen.


I'm going to try pulling some more content of the ReplayTV and serve them. I'll post my findings...


Thanks again, Dan - this is potentially a great tool!


Randy.


----------



## dfrumin

Glad to hear it worked. It can take up to a minute or so to respond.


FYI folks, I decided this might be a good reason to learn Apache/PHP programming. That way there are no more portability issues and the configuration of multiple servers is (hehe) out of my domain. That said, this is very dependent on apache/php perf which is what I'm running into now.


I now have the code to serve video through PHP though it hangs after about 30secs (not sure if apache gets unhappy with the stream or what yet).


So...


If anyone is an apache master/mistress, send me an email to [email protected] if you want to / can help.


thx.


p.s. I don't have apache doing the broadcast yet, I may write a separate exe for that, but that's later...

Quote:

_Originally posted by RandyRazor_
*


Well,


What do ya know... I just left tit alone for a while and the ReplayServer appeared! I think the ReplayTV just has a schedule for doing things. Just try waiting for a while and let it happen.


I'm going to try pulling some more content of the ReplayTV and serve them. I'll post my findings...


Thanks again, Dan - this is potentially a great tool!


Randy.*


----------



## Dallben

Quote:

_Originally posted by RandyRazor_
*


Well,


What do ya know... I just left tit alone for a while and the ReplayServer appeared! I think the ReplayTV just has a schedule for doing things. Just try waiting for a while and let it happen.


I'm going to try pulling some more content of the ReplayTV and serve them. I'll post my findings...


Thanks again, Dan - this is potentially a great tool!


Randy.*
Mine's been up for almost an hour. Still nothing.


----------



## dfrumin

Ok, I recommend people hold off until I get this apache thing figured out. I just found out apache has a max execution time of 30 seconds.


As soon as I can disable that, the whole server will run through apache which will take a whole lot of code out of my hacked code and into apache. At that point we should be able to better debug the discovery piece.


more shortly...

Quote:

_Originally posted by Dallben_
*


Mine's been up for almost an hour. Still nothing. *


----------



## Dallben

Quote:

_Originally posted by dfrumin_
*Ok, I recommend people hold off until I get this apache thing figured out. I just found out apache has a max execution time of 30 seconds.


*
 (humming jeopardy tune) No, Seriously, take your time, I'm gonna putz around with my network & firewalls and see if the problem might be on my end (there's a good posibility of this)


----------



## dfrumin

Alright, 90% of the way there. An Apache/PHP version of ReplayServer is posted to http://206.124.140.12/rtv. The broadcasting portion is still done manually (coding that next.)


I'm going to add the standard readme / license / copyright crap in a bit. For the time being, just respect it 


In order to speed things up, I'm at my computer now. If you're playing with the apache version and are having problems, mail me at [email protected] . Hopefully we can debug it all faster through email.


Also, my page lists a few things I could use a hand with when it comes to apache + documenting this tool. I'd love to just focus on code and work on the guide generator piece. If you can help me out with those pieces, I'd love it.


thx.


dan

Quote:

_Originally posted by Dallben_
*


 (humming jeopardy tune) No, Seriously, take your time, I'm gonna putz around with my network & firewalls and see if the problem might be on my end (there's a good posibility of this)*


----------



## dfrumin

Hey folks...


I just created a mailing list ([email protected]). I'm hoping that anyone who's going to install replayserver in the next couple of days will allow me to put them on that list. That way, as we all figure out the issues, we can help each other out.


So, if you can help debug the installation process for replayserver apache and (maybe even) help with docs and stuff, let me know and I'll put you on that list.


thx.


----------



## dchilders

I used the java replayer.jar and was able to download an episode of the simpsons. When I play it back with ELECARD MPEG2 Player Version 1.35 its upside down. Did I miss something?


----------



## Montezuma58

Quote:

_Originally posted by dchilders_
*I used the java replayer.jar and was able to download an episode of the simpsons. When I play it back with ELECARD MPEG2 Player Version 1.35 its upside down. Did I miss something?*
Have you installed the Nimo codec pack? I had the same problem. So I figured that I would start uninstalling stuff. The Nimo codec pack was the first thing I got rid off. After that everything was right side up. Then I uninstalled ELECARD and my Zoom Player quit working. I had the Zoom Player working before I had installed ELECARD or Nimo. Screwy stuf!


----------



## dfrumin

ReplayServer Update...


I just updated the ReplayServer distrib with a better version of the broadcaster called RTVNotify. This one can actually keep the server alive by rebroadcasting (Sleeps 29min in between).


Source for RTVNotify is also posted for any who want to help by porting it to *nix. If you send me the modified code, I'll post it in my page.

http://206.124.140.12/rtv 


I'm working with a couple of folks to debug running ReplayServer, so hopefully we'll know more soon. Sad thing is it runs like a champ on my box (sigh)


thx.


----------



## acourvil

Wow, I just got ReplayServer working and you've already got an improved version? I hope you know how much everyone outhere in RTV4k land appreciate the work!


I do have one suggestion: a utility (or function in ReplayServer) that would parse the mpg and ndx files in the directory and generate a guide. W/o this, you might have a good show archived, but the RTV4k wouldn't see it unless you had previously saved an archive that contained it.


----------



## Lee Thompson

Quote:

_Originally posted by acourvil_
*Wow, I just got ReplayServer working and you've already got an improved version? I hope you know how much everyone outhere in RTV4k land appreciate the work!


I do have one suggestion: a utility (or function in ReplayServer) that would parse the mpg and ndx files in the directory and generate a guide. W/o this, you might have a good show archived, but the RTV4k wouldn't see it unless you had previously saved an archive that contained it.*
This is the goal of course but the guide format is only about 60-70% understood at this point -- good enough to read but...


----------



## dfrumin

Quick question: which server do you have running? Apache or C++?


This is why I'd love the help with the config of the apache version and the docs. I'm going to start working on a version of the client which extracts mpg/ndx AND guide info onto the server guide.


Problem 1:

The mpg/ndx don't include the info. So you either extract it at the time of mpg grabbing or have to type it in by hand.


Problem 2:

As Lee says, the guide format is only about 60-70% understood. We know enough of the fields to read everything but are unsure if it will work for writing back out. That's my main project next (yeeha).


And the next project after that is a batch file version that will extract multiple shows by regexp/time. That will allow you to run it nightly and archive all your westwing to your westwing server, etc.


so, more to come...



Quote:

_Originally posted by Lee Thompson_
*


This is the goal of course but the guide format is only about 60-70% understood at this point -- good enough to read but...*


----------



## mlinehan

dfrumin


might I make a sugestion.

When the ReplayTV first starts, it transmits SSDP:UPnP:GoodBye packets to clear cached entries in all other ReplayTV's on the network.


Then the ReplayTV transmits SSDP:UPnP:Alive packets every 5 minutes. Not every 30 minutes. The Device_Descr.xml file instructs the ReplayTV's to age out cached data in 1800seconds (30min) but the alive packets come much faster.


----------



## dfrumin

Hi Mike,


I didn't have a problem with 30mins, but am testing it with apache and my new RTVNotify. I'll know more in a couple of hours. If it doesn't work I'll bring it down to 5mins or less.


Right now the broadcast is done "manually" through RTVNotify since I'll have to figure out how the skippy to build a recurring event into apache.


dan

Quote:

_Originally posted by mlinehan_
*dfrumin


might I make a sugestion.

When the ReplayTV first starts, it transmits SSDP:UPnP:GoodBye packets to clear cached entries in all other ReplayTV's on the network.


Then the ReplayTV transmits SSDP:UPnP:Alive packets every 5 minutes. Not every 30 minutes. The Device_Descr.xml file instructs the ReplayTV's to age out cached data in 1800seconds (30min) but the alive packets come much faster.*


----------



## mlinehan

Quote:

_Originally posted by Sharky_
*Can someone explain the reason for the "modified" vs. "raw" MPEG files?


It sounds like the raw files are needed for the server application, but they need to be modified in order to be played back on a PC. Is that right? If so, is it possible yet to convert a raw file to a modified one without having to download it again?*
To tell the truth, I'm not certain if performing the mpg fixup is the right thing to do or not.


I got the mpg fixup code from extract_rtv, here is the comment in extract_rtv explaining what's up:


// Write a small pack that includes a system header and a program stream map

// This fixes incompatibility issues with Womble MPEG-2 VCR and MProbe and

// makes the MPEG-2 files much more MPEG-2 compliant which apparently they

// don't need to be for the ReplayTV box to play them back.


The mpg fixup not only changes bytes in the mpg header, it inserts sections that are not present in the raw file from the ReplayTV making the file larger by a few tens of bytes.


I've never tried it, but if you stream a "fixed" mpg back to the ReplayTV, I bet it gets very confused. Has anyone worked out what the contents of the ndx file is?


I have a theory: I think that the ndx file contains offset to keyframes in the mgp file. It's my beliefe that the ReplayTV uses this info for fast forward, revers play, and jump to time index type operations.


L8tr

mlinehan


----------



## dfrumin

BTW, one thing ReplayServer / RTVNotify don't do yet is respond to the adding of a new RTV to the network. When a new box is added, I should detect the alive packets and say "oh, new box" and rebroadcast the ReplayServer alive packets.


For now, you'll have to do that manually if you add a box


----------



## dchilders

Uninstalling the NIMO Codecs corrected the upside down mpg playback.


----------



## RoJo

Quote:

_Originally posted by plazma75_
*Does anyone else have any problems with MPG's coming of their replay and the sound is slowed down to like half the video rate? If so, do you think there is anyway to fix this?


I noticed this though, most of my Hour long Standard recordings are 865MB, the ones that come through that play weird are 906MB.


Thanks for any input.


-plazma75*
My experience was almost identical on my first (& only so far) try. I sucessfully used Replaypc to pull off a 1/2 hour show. But when I went to play it, the whole show was slow. About 2/3rds speed (about 10 seconds of play time took about 15 seconds to play). The audio & video seemed to be sync'd correctly, but the whole thing played slow. It played slow in both MediaPlayer and the DVDPlayer that Compaq shipped in my laptop. Because it is independant of the player, I would have to guess that it is a codec problem, but I have not looked into it.


On a different note, some people were reporting "invalid media type" from MediaPlayer. I also get this on my desktop system. I believe the key to this one is the lack of a MPEG-2 decoder. I have a DVD drive on this box, but it has a hardware decoder (not software), When I upgraded the box to Win2k, I lost my DVD player since the company does not have a Win2k update to the card's drivers, and I never bothered to buy another player app or a software decoder.


-- Rob


----------



## nystratton

Ok, so when my server is up (still trying to get notify working on linux) I will put save say all of Frasier shows on it that I have. Well lets say I don't have all the old ones and I want replay to grab them. Well replay will grab ALL Frasier shows because it does not know that I have say 80% of them.


So is there a way to say put back a .ndx file and 2 min of mpg so it will not take up much space, but will not suck files I have on my server.


-nathan


----------



## Montezuma58

I wanted to check to see if anyone else has experienced this before I start moving machines around to check my network or reset my replay.


For me transferring files with ReplayPC has become very slow, approximately 30 min to transfer 200 Meg of data. The other day it was taking about 10 - 15 minutes to transfer a 30 min medium qualitiy program. Now I can sit here and count the activity lights blinking on my switch and sometime activity will pause for 20-30 secs.


I have rebooted the Replay and my PC. I've tried Win2k and 98 (separte installations on a multiboot system). I have ran replayserver with Win2K but I'm not sure if this is a factor. Other than the suddenly slower transfer everything else seems to be fine with the Replay4k.


----------



## dfrumin

You are in super-advanced user land. 


Might be a while before we get there, but hopefully we will...


- dan

Quote:

_Originally posted by nystratton_
*Ok, so when my server is up (still trying to get notify working on linux) I will put save say all of Frasier shows on it that I have. Well lets say I don't have all the old ones and I want replay to grab them. Well replay will grab ALL Frasier shows because it does not know that I have say 80% of them.


So is there a way to say put back a .ndx file and 2 min of mpg so it will not take up much space, but will not suck files I have on my server.


-nathan*


----------



## dfrumin

Just posted to http://206.124.140.12/rtv 


I had a bug where it would not actually rebroadcast at 30mins (fixed).


I also added a command line option to change the last three digits of the UUID. These should match the ones in your INI file. For some reason, if things go wrong, a byebye won't clear RTV's cache. In working with Lee to debug this, we found that changing the UUID had a positive effect. So, change the .ini file (or .cfg if using the older PC client) and use the last three digits in RTVNotify.


0.4 will read from the ini, but I have to run out for a few.


dan


----------



## Revwillie

I thought I'd offer a cheap alternative to PowerDVD for windowsXP users. You can get a DVD XP package for $15 from Ravisent.com. It includes the codec stuff to play dvds or MPEG2 in mediaplayer and it also has a DVD only player. On my machine, Media player will play the replaytv files which are medium or high quality very well. However, standard quality recordings get squashed horizontally. I guess the standard quality MPEGs use the rectangular pixels?


----------



## acourvil

Quote:

_Originally posted by dfrumin_
*Quick question: which server do you have running? Apache or C++?


This is why I'd love the help with the config of the apache version and the docs. I'm going to start working on a version of the client which extracts mpg/ndx AND guide info onto the server guide.

*
Hmm . . . not sure if this was directed at me, but if it was, I am currently running the C++ version; I had to play around with my firewall software a little the RTV4K talk w/ my PC.


I did watch 2 shows served off of my PC. My son is pretty impressed, but my wife just gave me the usual "yes dear, that's nice" look. : )


----------



## Sharky

Quote:

_Originally posted by mlinehan_
*To tell the truth, I'm not certain if performing the mpg fixup is the right thing to do or not.*
It sounds like the fixed-up files may be needed for certain editors or codecs. However, the Elecard codec plays back the raw files just fine. And since raw files are also needed for the server application, I'm not planning to use the fixed-up files at all.


----------



## Dallben

Okay, I know this has something to do with my setup of apache/php... Havn't done it on a windows box in quite a while... 


When I try to pull Device_Descr.xml down, this is what I see:

*The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

XML document must have a top level element. Error processing resource ' http://192.168.3.2/Device_Descr.xml '.*


So, I obviously can't pull down the guide or anything from the PC (nevermind the replay seeing it) -- It comes up with a 500 (internal server error) This is what my apache error log is full of:

*[Mon Jan 07 00:58:13 2002] [error] [client 192.168.3.2] Premature end of script headers: h:/program files/apache group/php/php.exe*


Anybody?


----------



## honus87

Replayer v0.4 is up at http://www.forbesfield.com/replayer.jar 


Lots of changes (which I already typed once before IE locked up when I clicked "Spell Check", sigh).


* No longer prompts for Replay address at startup


* New item "Add Replay..." in File menu. Select this and you will be prompted for the address of your Replay which will then be added to the list of displayed guides. Note that you can add more than one Replay (or even read in guide data files using "Read Guide Data from File..." in the Debug menu if you really want).


* New item "Remove Replay" in the File menu. Select a Replay in the list, pick "Remove Replay" and that Replay will be removed from the list of Replays


* New menu: Options


* New items "Use Look and Feel" in the Options menu. Select from Java's metal (the default), your system's, or the Motif look and feel.


* New item "fixup MPEGs" in the Options menu. On by default, does the patching of headers as the MPEG is saved. If off, no changes are made to the MPEG data as it is read off the Replay


* New item "Save Options" in the Options menu. This will cause all of your current options and the list of Replays to be saved to disk. They are stored in a file called .replayer.opt in your home directory. The home directory is the usual place on Unix. On Windows 2000 and XP it is usually "C:\\Documents and Settings\\" On Mac and other versions of Windows, I have no idea. When you restart the program, all the Replays that were listed when you exited will have their guide data loaded.


* New item "Auto Save Options on Exit" in Options menu. Off by default, causes options to be saved as if you selected "Save Options" whenever you exit the program.


Please send bug reports, questions, comments to [email protected] .


I wonder if anyone has an opinion on the following: Currently everything is displayed in a tree. Would you prefer to see 3 tables? The first table listing all the Replays. The 2nd table listing the channels on the Replay selected in the first table, and the 3rd table listing all the shows in the channel selected in the 2nd table.


Or any other ideas on how to present the data?


-Tom


----------



## honus87

Quote:

_Originally posted by centaur_
*Hey Honus, it works great in BSD and Linux as well! Thanks.


OT: is it possible to change the ugly theme of Java apps to something like Acqua with antialiasing?*
So I added options to pick from the standard look and feels. In theory you should be able to change the look and feel to just about anything you want, though I don't know if anyone has done this for Java on various platforms.


Sun distributes the metal look (the one I've been using), the Motif look, and your system's look, but the documentation says they don't distribute one system's look on other systems (with the exception of Motif).


If anyone finds other look and feels and wants to try them, it would be easy to add support for them.


-Tom


----------



## nystratton

I have replayserver runing on linux (still using my windoz box to notify) and I can see it in my 4k, but I don't get a guide. If I check the logs on my linux box I see:


64.93.90.2 - - [07/Jan/2002:02:22:23 -0500] "GET /http_replay_guide-get_snapshot?guide_file_name=1010387979&serial_no=RTV4160L1A A5000119 HTTP/1.1" 200 46 "-" "-"


If I put that URL in netscape and hit the replayserver I get:


00000000 guide_file_name=upToDate

But if I hit any of my other 3 replay 4Ks I get the guide. I have tried the other guide files with no luck. I know it is at least looking at the guide file because if I remove it or don't put the guide file name part after snapshot it works.


Any ideas?


----------



## honus87

Replayer v0.4a is a small patch so that "Fixup MPEG" really is on by default.


I also added a new option "Use User Specified Look and Feel" If you know about Java look and feel stuff you can specify a string here to be used as the look and feel.


-Honus


----------



## Dallben

Quote:

_Originally posted by honus87_
*Replayer v0.4 is up at http://www.forbesfield.com/replayer.jar 


I wonder if anyone has an opinion on the following: Currently everything is displayed in a tree. Would you prefer to see 3 tables? The first table listing all the Replays. The 2nd table listing the channels on the Replay selected in the first table, and the 3rd table listing all the shows in the channel selected in the 2nd table.


Or any other ideas on how to present the data?


-Tom*
I like the tree.


How easy/hard would it be for you to add something in that pulls down the .NDX file along with (or seperately from) the mpg?


----------



## KenL

Quote:

_Originally posted by honus87_
*I wonder if anyone has an opinion on the following: Currently everything is displayed in a tree. Would you prefer to see 3 tables? The first table listing all the Replays. The 2nd table listing the channels on the Replay selected in the first table, and the 3rd table listing all the shows in the channel selected in the 2nd table.


Or any other ideas on how to present the data?


-Tom*
Tom I say tree also.


----------



## Dallben

Quote:

_Originally posted by dfrumin_
*Hmm... What sniffer are you using? I'm using ethereal and here's what you should see:


2 sets (to be safe) of SSDP packets being broadcast on 239.255.255.250 port 1900.

An HTTP GET request from your RTV to your PC asking for Device_Descr.xml


Can you check that that happened?


thx.

*
Bloody hell, it works! (The C++ Version)


Problem was all with my firewall... You wouldn't believe what I had to do to the stupid thing. Frickin' Watchguard!!!!


Now I've just got to see what's up with the apache version.


----------



## Sharky

Quote:

_Originally posted by honus87_
*Or any other ideas on how to present the data?
*
I like the tree. Here's a few ideas for enhancements:


-- sort the tree view by show name

-- add a tabbed pane, with two tabs. In the first tab, have the existing JTree. In the 2nd tab, have a JTable, containing the same data. Click on the table column headings to sort by that column. There should be columns for all available data (show name, description, date, recording quality, etc), and rows for each recorded show.

-- Options setting to omit show names for which there are no recordings

-- Display the Replay internal filename (nnnnnnnn.mpg)

-- Set the default filename for extracts to be the internal name

-- Options setting to establish a default extract directory

-- Options setting to always extract using the Replay internal filename, into the default directory, without prompting

-- Multiple file selects, so that you can highlight all of the shows you're interested in, click once, and walk away

-- Check to make sure there's enough available disk space, before transferring the file


We're also going to need a solution for files larger than 2GB. My suggestion is to automatically split them into multiple files as they are being read in, with some standard naming convention, like "-001", "-002", etc. at the end of the name. This won't work for transparent PC playback, of course, but it could be made compatible with the Server application.


Thanks!


----------



## dfrumin

Yea, some people just don't appreciate technical entertainment value. 


I haven't decided how much I'm going to push the ReplayServer C++ code forward yet or not. On the one hand, it's a nice item for users to run a single exe. On the other hand, I can't exactly vouch for the code. Plus, portability would be less than fun for the average person. So that's where the apache version came in. Zero porting issues, easy to configure multiple servers, etc.


If folks have preferences or ideas about which codebase I shoudl invest in, let me know.


dan

Quote:

_Originally posted by acourvil_
*


Hmm . . . not sure if this was directed at me, but if it was, I am currently running the C++ version; I had to play around with my firewall software a little the RTV4K talk w/ my PC.


I did watch 2 shows served off of my PC. My son is pretty impressed, but my wife just gave me the usual "yes dear, that's nice" look. : )*


----------



## dfrumin

Oops, sorry about that...


You need to change the DefaultType to php (as the docs say) to handle all the commands -except- for device_descr.xml. So, add another entry to the form of:


AddType application/php .xml (or something close to it). That should let the xml file be parsed php as well.


Sooner or late I'll figure out how to use aliases to route commands with no names and the local xml file to php files so the rest of your apache stuff doesn't get affected. Any apache gurus?


thx.

Quote:

_Originally posted by Dallben_
*Okay, I know this has something to do with my setup of apache/php... Havn't done it on a windows box in quite a while... 


When I try to pull Device_Descr.xml down, this is what I see:


The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

XML document must have a top level element. Error processing resource ' http://192.168.3.2/Device_Descr.xml '.


So, I obviously can't pull down the guide or anything from the PC (nevermind the replay seeing it) -- It comes up with a 500 (internal server error) This is what my apache error log is full of:


[Mon Jan 07 00:58:13 2002] [error] [client 192.168.3.2] Premature end of script headers: h:/program files/apache group/php/php.exe


Anybody?*


----------



## dfrumin

Would you mind writing a mini-article for me that I'll put on the site to help other users?


thanks!


dan

Quote:

_Originally posted by Dallben_
*


Bloody hell, it works! (The C++ Version)


Problem was all with my firewall... You wouldn't believe what I had to do to the stupid thing. Frickin' Watchguard!!!!


Now I've just got to see what's up with the apache version.*


----------



## dfrumin

For mlinehan: bug in ReplayPC, affects ReplayServer.


Hi there,


The latest version of ReplayPC does not correctly extract the guide. It still leaves the trailing definition of #####ATTACHED_FILE_END##### which needs to be removed. This can throw off the RTV and might be causing some of the problems with folks not seeing guides.


Interim solution: use the older ReplayPC from my site ( http://206.124.140.12/rtv ) which is known to get the guide correct.


mlinehan, if you can fix, that'd be great.


dan


----------



## Dallben

Quote:

_Originally posted by dfrumin_
*Would you mind writing a mini-article for me that I'll put on the site to help other users?


thanks!


dan

*
I'd be happy to... I've just got to work the bugs out & make sure that I'm not letting the world in. 


I'm using a watchguard soho, I don't know if too many people would have access to those for it to matter, I'm going to try it with a plain old linux firewall as well, 'cause I shouldn't have had these problems to begin with.


I'm still not seeing the guide from my pc in my replay (I've tried every version of replaypc that I've got to extract it) but it IS showing the pc in the replayguide.


----------



## dfrumin

Hi there...


I just posted a new version of RTVNotify on my server ( http://216.124.140.12/rtv ) which accepts a -i option to read the ReplayServer.ini file. This is important for one of the things that may fix your problem (changing the UUID).


I also just posted a small bit of debugging / testing info on my site.


My recommend:

- cold boot the RTV (hold power for 5secs)

- change the ReplayServer.ini file's UUID/ServerName

- Rerun ReplayServer

- Test ReplayServer per my page with PC utils first (let's make sure all is good)

- Then test on the RTV


Let me know.


thx.



Quote:

_Originally posted by Dallben_
*


I'd be happy to... I've just got to work the bugs out & make sure that I'm not letting the world in. 


I'm using a watchguard soho, I don't know if too many people would have access to those for it to matter, I'm going to try it with a plain old linux firewall as well, 'cause I shouldn't have had these problems to begin with.


I'm still not seeing the guide from my pc in my replay (I've tried every version of replaypc that I've got to extract it) but it IS showing the pc in the replayguide.*


----------



## dfrumin

BTW, I can't even imagine what a firewall would be doing short of blocking port 80 on your PC, so I guess it's important to make sure that opens up. Did you have any other weird config issues?


thx.

Quote:

_Originally posted by Dallben_
*


I'd be happy to... I've just got to work the bugs out & make sure that I'm not letting the world in. 


I'm using a watchguard soho, I don't know if too many people would have access to those for it to matter, I'm going to try it with a plain old linux firewall as well, 'cause I shouldn't have had these problems to begin with.


I'm still not seeing the guide from my pc in my replay (I've tried every version of replaypc that I've got to extract it) but it IS showing the pc in the replayguide.*


----------



## Dallben

Quote:

_Originally posted by dfrumin_
*BTW, I can't even imagine what a firewall would be doing short of blocking port 80 on your PC, so I guess it's important to make sure that opens up. Did you have any other weird config issues?


thx.

*
For starters, it wasn't allowing the SSDP broadcasts on UDP 1900 (in or out). Mind you, my pc and the replay are on the same side of the firewall, and on the same subnet.


Beats me.


----------



## dfrumin

Duly noted on my page 

Quote:

_Originally posted by Dallben_
*


For starters, it wasn't allowing the SSDP broadcasts on UDP 1900 (in or out). Mind you, my pc and the replay are on the same side of the firewall, and on the same subnet.


Beats me. *


----------



## Dallben

Anyone else have their boxes randomly hard reboot while playing with this stuff?


----------



## dfrumin

I had that happen a bunch of times while testing. Certain states / guides / files sent will cause the RTV to reboot. Generally that relates to a bad guide file. With video I've only seen it hang.




Quote:

_Originally posted by Dallben_
*Anyone else have there boxes randomly hard reboot while playing with this stuff?*


----------



## dfrumin

The good news:


I just fixed a bug in ReplayServer-Apache and posted a new zip on my site ( http://206.124.140.12/rtv ). This would cause it to send an uptodate to the RTV even after the guide.dat file changed (d'oh).




The bad news:


I just wrote a "guide builder" that split up the header (808 bytes), channels (624 * C), and shows (444 * S) then put them back together in the right order for a single channel/show combo.


Sadly, my RTV does not like this new guide :-(




Next steps:

There are basically two causes for this:


1. (easy) the channel/show is serialized with an ordering byte that we missed. Then it's just setting that byte.


2. (hard) the header isn't just full of random **** and is relevant to the contents. This implies reverse-engineering the header.


I'll see if Lee is up for continuing to help with the @#$ format of these files. But, the one thing I'm missing is a test RTV (started to fill mine with stuff). The best way to reverse engineer the header is to go thru a series of steps. So, if you have an RTV with no shows and don't mind doing a series of steps (and extracting guides along the way) I'll be a happy guy.




Use for now:


For the time being, if you want to use ReplayServer for archiving, you can do an all-out archive (copy guide.dat plus ALL the mpg/ndx you want.) Maybe the client guys can write an easy program for extracting all files.


You then setup multiple Apache servers (hopefully I'll figure out how soon) for each "archive".


Then, when we have the guide format figured out, you'll




Thanks all, more to come...


----------



## MANowell

I can't tell y'all how big a kick that I'm getting out of the work going on here. What I've always wanted to do since I got a ShowStopper was figure out a better way to keep shows that I like. I can now pull them over my network; I'm about to learn how to burn DVDs! [gulp!]


It occurs to me, however, that SonicBlue just has to send one little program "fix" down the wire with a channel guide and all this is lost, or has to be residcovered.


Has anyone looked at a way to back up the ReplayTV 4000 OS "over the wire"? A way to proxy channel guide updates and filter the content?


I have two Showstoppers, and only ordered a 4080 to take a "look see". If the stuff being worked on here isn't "broken" by SonicBlue, then the 4000 series is MUCH more valuable to me and I'll be ordering another one......


Ideas, comments?


----------



## centaur

Dfrumin, the Apache model makes the most sense to me.

Cross-platform, web-interface-based, php is proven (VBulletin), fewer bugs. Java is good too.


Honus, 0.4 works great on BSD & Linux, but there's really no difference between Cross-platform and System look&feel. If there are any Mac users out there running OSX, maybe you could locate the look&feel libraries for Java and post theme here? Preferably IBM Java, or maybe Sun? Can ya help a brotha?


----------



## honus87

Personally, I think anything that extracts the guide should leave the header and trailer in place.


Any program that needs to read the guide off of a Replay directly needs to deal with them, so if you strip them off then reading from a file becomes different than reading from a Replay.


----------



## Lee Thompson

Well I've finally completely figured out the category storage and lookup; there will be a revised GuideParser a little later today.


What would be VERY helpful to us working on the file format is if someone can take a fresh (preferably right after being 'reset' to factory with just the network setup) Replay4000 (no shows/categories/etc) and download the guide file and send it to me or post it.


----------



## FlipFlop

Rich,


Thanks for providing the sample files. I got an email from Rod Hewitt (the guy who added the MPEG header stuff to extract_rtv) this morning saying that he had checked out your samples, so you can remove them from your server. According to Rod the files work fine as-is and "appear to put a system header in the stream for every pack which would (along with the 48KHz) make these files directly compatible with DVD."


I guess this means there is no need to add the extra headers to the 4000 series mpeg files.


----------



## dfrumin

Well, it's a matter of opinion. That wrapper stuff is just that, standardized wrapper. The top of it is actually return codes followed by what I presume was going to be the standardized RTV attachment format for multiple files. My guess is they then figured out they didn't need multiple files and didn't want to deal with it after that.




Quote:

_Originally posted by honus87_
*Personally, I think anything that extracts the guide should leave the header and trailer in place.


Any program that needs to read the guide off of a Replay directly needs to deal with them, so if you strip them off then reading from a file becomes different than reading from a Replay.*


----------



## dfrumin

*Help the guide parsing effort*


Ok folks, here's your chance to help Lee and I out in a major way. The header of the guide file (a puny 808 bytes!) is doing crazy things. Until we understand it, we can't build it. We need a series of guides starting with a fresh RTV (777-zones) that we can compare to each other and across units.


Instructions are on http://206.124.140.12/rtv. 


Your help is highly appreciated.


dan


----------



## lizard_boy

Quote:

_Originally posted by dfrumin_
*Help the guide parsing effort


Instructions are on http://206.124.140.12/rtv. 


Your help is highly appreciated.


dan*


here is the correct link:

http://206.124.140.12/rtv/


----------



## dfrumin

d'oh! dang period. sorry about that.

Quote:

_Originally posted by lizard_boy_
*



here is the correct link:

http://206.124.140.12/rtv/ *


----------



## nystratton

Quote:

_Originally posted by Lee Thompson_

What would be VERY helpful to us working on the file format is if someone can take a fresh (preferably right after being 'reset' to factory with just the network setup) Replay4000 (no shows/categories/etc) and download the guide file and send it to me or post it. [/b]
 http://www.robotics.net/replay/virgin_guide.dat 


Hope that helps, let me know if you need anything more.


-nathan


----------



## dfrumin

Hi Nathan,


I hate to ask (no I don't ) but would you go through the full series of steps? Lee and I will use those to try and figure out the guide.


thx




Quote:

_Originally posted by nystratton_
*

http://www.robotics.net/replay/virgin_guide.dat 


Hope that helps, let me know if you need anything more.


-nathan*


----------



## nystratton

I just finished and sent them off to you. Has anyone noticed that the guide changes from the time you first enter a IP and when you finish the install setup?


-Nathan


----------



## mlinehan

Quote:

_Originally posted by dfrumin_
*For mlinehan: bug in ReplayPC, affects ReplayServer.

The latest version of ReplayPC does not correctly extract the guide. It still leaves the trailing definition of #####ATTACHED_FILE_END#####*
Noted: The next release of ReplayPC will fix this.


----------



## mlinehan

Team ReplayPC is pulling together on Source Forge.


Could ReplayPC users do me a favor, and stop by http://replaypc.sourceforge.net and fill out a short 4 question survey.


We want your input on how ReplayPC should develop.


mllinehan


----------



## dfrumin

ReplayServer v0.3 is posted.


Fixes:


In some Apache/php configs, the register_globals setting was off. This led to the variables not getting read. I now implicitly read the variables in.


Different platforms were returning different strings (quoted v. escaped quoted). This has been dealt with.


Other:


This distribution includes DFReplayPC.exe. Use that to extract the guide (and rename to guide.dat) to make sure it's correct.


thx.

http://206.124.140.12/rtv/


----------



## markus98

First, THANK YOU for all the hard work. There's no

doubt in my mind that you've been up half the week

working this.


SO, THANK YOU!!!!


That's all, really. ;-)


M

p.s. The real comment, born from frustration...


How about a comprehensive step-by-step-for-dummies

guide on how to set this up?


1. how to set up apache on w2k? or not, I don't care,

just tell me what to do to make this work? I want to

make it work, really!!!

2. how to install your files (see #1)

3. what to put in the config file. (see #1)

(no, "put ########" is not enough, explain what

the name means and what it can be and what it may

be...)

4. troubleshooting tips

(yes, I too watched ethereal spit one sided upnp hellos

with nary a reply from my 4k, and I didn't see anything

here that suggested what I could change to fix it.)


Thanks 


Markus

"I am today." - Jarod


----------



## dfrumin

Hi markus,


I appreciate your position, but you have to understand that this is not ready-for-dummies yet. I've been working with DallBen for 2hrs over IM to figure out what silly little twit things are not working on his config (I only have one.)


As I learn more about different configs, I'm putting up mini-testers on my site. I also hope that as people get it set up they can help with better step by step guides. I'm focusing a stupid amount of time trying to figure out how to construct a guide so we can all get what we want (custom PC servers).


Someday, when this is ready for dummies, we'll have that there. Until then, this forum is as good as it gets.


- dan

Quote:

_Originally posted by markus98_
*First, THANK YOU for all the hard work. There's no

doubt in my mind that you've been up half the week

working this.


SO, THANK YOU!!!!


That's all, really. ;-)


M

p.s. The real comment, born from frustration...


How about a comprehensive step-by-step-for-dummies

guide on how to set this up?


1. how to set up apache on w2k? or not, I don't care,

just tell me what to do to make this work? I want to

make it work, really!!!

2. how to install your files (see #1)

3. what to put in the config file. (see #1)

(no, "put ########" is not enough, explain what

the name means and what it can be and what it may

be...)

4. troubleshooting tips

(yes, I too watched ethereal spit one sided upnp hellos

with nary a reply from my 4k, and I didn't see anything

here that suggested what I could change to fix it.)


Thanks 


Markus

"I am today." - Jarod*


----------



## Dallben

Quote:

_Originally posted by markus98_
*How about a comprehensive step-by-step-for-dummies

guide on how to set this up?


1. how to set up apache on w2k? or not, I don't care,

just tell me what to do to make this work? I want to

make it work, really!!!

2. how to install your files (see #1)

3. what to put in the config file. (see #1)

(no, "put ########" is not enough, explain what

the name means and what it can be and what it may

be...)

4. troubleshooting tips

(yes, I too watched ethereal spit one sided upnp hellos

with nary a reply from my 4k, and I didn't see anything

here that suggested what I could change to fix it.)


Thanks 


Markus*
Okay, I'm working on the doc for this now...


I don't think right now I'm going to get into how to make apache/PHP run on win2k, that's been done by more qualified persons than I.


I will put in any specifics that need to be changed/added/deleted with the apache/php configs. etc etc etc.


----------



## Dallben

Boy, one other thing that I havn't seen anybody mention is that when you're sucking a big file off the replay at 100mpbs, the damn box just about chokes if you try to access a menu, the channel guide, the replay guide, the hud, etc....


----------



## ijprest

Quote:

_Originally posted by FlipFlop_
*I don't know why the records are not all exactly 404 bytes. Something weird going on. The show title doesn't always start at 172. Sometimes it has weird data there. Not sure of it's use.
*
FlipFlop,


Are the records with strange sizes movies? In the nightly download channel-guide format (which, admittedly, is very different) movies have an extra eight bytes of data. This is used for specifying year of release, MPAA rating, etc. There are other shows with strange sizes; I haven't verified this yet, but I suspect they are shows in parts (i.e., "Part 1 of 2").


----------



## dfrumin

In the channel guide data, the sizes of the structures have held consistent across the board: header = 808, channel = 624, show = 444. Not sure about the MyReplayTV stuff.

Quote:

_Originally posted by ijprest_
*


FlipFlop,


Are the records with strange sizes movies? In the nightly download channel-guide format (which, admittedly, is very different) movies have an extra eight bytes of data. This is used for specifying year of release, MPAA rating, etc. There are other shows with strange sizes; I haven't verified this yet, but I suspect they are shows in parts (i.e., "Part 1 of 2").*


----------



## TanRanger

Dan -


One of the key features of the C++ version of RServer was that you could run multiple instances with great ease. Probably many many instances, right?


So, um... How many instances of Apache can the average Joe run simultaneously on a single machine? Is it comprable?


If Apache uses much more resources than the C++ guy does, then maybe we should consider redirecting attention to the original version.


But, of course, if it's not big deal to run a dozen or more Apaches (ram is what... $100 a GB these days?)... then by all means, let's go that route instead!


Thanks again for being such a cool dude. :c)


----------



## dfrumin

I'll tell you, I'm assuming Apache doesn't use that much memory / CPU power, so I wasn't worried about it. Though you're right that inherently it will use more of both. My ReplayServer used a honking 1MB of memory (ooooo!)


On the other hand, I'd probably trade off the memory issues for someone else's multi-threading implementation. As you increase the servers, this becomes more of an issue. And I tell you what - I _hate_ debugging multi-threading. The HTTP Server code I wrote was writting fairly quickly (6hrs) so I'm not all that secure in it 


So then you have the MAJOR C++ project advanage of easy install + running (install the binary, change the ini, and you're off). But, the cross platform portability more than outweighs that in my eyes, since folks have asked for unix versions, etc.


Dallben is writing up some stuff on installing Apache / PHP, so that should make things easier.


Net? Probably happy using Apache for now until we figure out some of the other problems (the guide, extractor, etc) and then I can go back to thinking about a C++ version again that's x-platform, smaller / faster, etc.


how's that sound? 

Quote:

_Originally posted by TanRanger_
*Dan -


One of the key features of the C++ version of RServer was that you could run multiple instances with great ease. Probably many many instances, right?


So, um... How many instances of Apache can the average Joe run simultaneously on a single machine? Is it comprable?


If Apache uses much more resources than the C++ guy does, then maybe we should consider redirecting attention to the original version.


But, of course, if it's not big deal to run a dozen or more Apaches (ram is what... $100 a GB these days?)... then by all means, let's go that route instead!


Thanks again for being such a cool dude. :c)*


----------



## Rafiki

Quote:

_Originally posted by Dallben_
*Boy, one other thing that I havn't seen anybody mention is that when you're sucking a big file off the replay at 100mpbs, the damn box just about chokes if you try to access a menu, the channel guide, the replay guide, the hud, etc....*
If you pull it down more slowly, is the RPTV box snappier?

It might be good to put a throttle in the program if so (though it should've been handled on the RPTV side w/execution priorities)...


----------



## centaur

Thank you Dfrumin, for thinking of us Unix weenies. THANK you.


If you can write the C source so as not to depend on Winduhs-specific libraries, it should compile in *nix.


PS - I have never been able to get in to your site http://206.124.140.12/rtv/ . Just hangs with a blank screen and times out. Using any special Javascript? I can't get into the Replay FAQ either.


----------



## jmaver

I have used several versions of the Replayer java app to grab video from my 4040. All shows were 30 min standard quality. I am playing them with the freeware Zoom player and the Elecard player. In every case, the video is upside down. Am I the only one experiencing this?


I have not tried the ReplayPC program, so I don't know if that will produce the same effect.


Any ideas?


Thanks,

John


----------



## Thenollyon

Quote:

_Originally posted by jmaver_
*I have used several versions of the Replayer java app to grab video from my 4040. All shows were 30 min standard quality. I am playing them with the freeware Zoom player and the Elecard player. In every case, the video is upside down. Am I the only one experiencing this?


Thanks,

John*
I have not been able to get the latest Replayer java app to work correctly. When I enter the IP and choose add, all I get is what I guess is supposed to be the replay labled as None. I don't see any shows, guide or replay information from the device. An earlier version of the Replayer still works.


Is there something I should try to resolve this?


----------



## TanRanger

Dan -


It sounds like you're thinking along the most sensible lines. Apache is certainly a preferable route for many reasons. I'd be surprised if many people intend to try to keep Windows based ReplayServers running indefinately. I imagine most folks will opt for Linux or BSD (or maybe win2k... maybe) so they will have an hands off box they can "set and forget" (to coin a phrase).


I haven't installed PHP yet, so I haven't been able to try out the Apache version. I'm wondering, though, if multiple ReplayServers will actually require multiple instances of Apache to be running? I mean, can one instance of Apache serve up multiple "servers?" I'm asking mostly because of inexperience with how PHP does what it does. It looks (to my initial glance) like multiple ReplayServer PHP scripts could run simultaneously on one instance of Apache. The problem is then assigning a different IP to each script (akin to multiple webpages on one website * )? To have multiple IPs assigned to one machine, you need to use aliasing? And this can only be done by having multiple Apaches running on multiple different ports? Or can separate PHP scripts have their own aliased IPs?


Pardon my newbie-ness with regards to PHP (and Apache too, I'm sure).


Also... what directory do we put your ApacheReplayServer files in?


- Matt


* Yes, I know... multiple wepages on a single website do not all have uniqe IPs.


----------



## dfrumin

No problem centaur. There's a couple of unix weenies in my life too .


I know what you mean about C code and eventually I want to write a cross platform, light weight replayserver for those who don't want to install apache, php and all the other madness. But that's later. This will work for now.


Very very odd about my site, since it's a simple html page with nothing else in there. Can you download the zip directly from http://206.124.140.12/rtv/ReplayServer.zip ? Not as good as seeing the whole page, but a start...


thx

Quote:

_Originally posted by centaur_
*Thank you Dfrumin, for thinking of us Unix weenies. THANK you.


If you can write the C source so as not to depend on Winduhs-specific libraries, it should compile in *nix.


PS - I have never been able to get in to your site http://206.124.140.12/rtv/ . Just hangs with a blank screen and times out. Using any special Javascript? I can't get into the Replay FAQ either.*


----------



## NoFreakinWay

I need to put my two cents worth in here and vote for the C++ version. I for one will be running a Win2K Server to dish out the files. I also plan to implement a VB front end for nice and easy menu's. This is all provided I have the time  It would also be quite interesting to use .net later and play around with it's possibilities.



BTW: I should be getting my 4K in the next couple of days, I hope to be of some help when that time arrives.


----------



## jmaver

Are you sure you are using the right ip? I had the same problem using the ip of my Rio Receiver.

Quote:

_Originally posted by Thenollyon_
*


I have not been able to get the latest Replayer java app to work correctly. When I enter the IP and choose add, all I get is what I guess is supposed to be the replay labled as None. I don't see any shows, guide or replay information from the device. An earlier version of the Replayer still works.


Is there something I should try to resolve this?*


----------



## dfrumin

Matt -


Apache certainly makes a better long-term environment, though the reason I'd like to do something in C++ is for those users at home that don't want the pain of installing apache and php (not exactly the easiest thing to do as was pointed our here before.)


Regarding your particular questions...


Multiple ReplayServers work like this:

- Assign multiple IP addresses to a box

- Create a new ReplayServer folder for each IP (copy of the code + guide.dat + Video folder)

- Change the ReplayServer.ini to rename the Server and change its UUID (e.g. West Wing or PNTB for me)

- Add a VirtualHost to Apache so it treats that IP as a separate server (I'm still figuring out these settings precisely.)


So no, you don't mean more than one apache to run multiple servers.


But that's another advantage to the C++ project. When I set it up, I ran multiple servers just by running the exe from multiple folders on my hard drive. A bit easier 


BTW - if someone knows of or has light, extensible, portable, AND reliable web server code in C++, I'd be happy to code the C++ version in platform independent fashion (sockets are the main platform issue).


thanks.

Quote:

_Originally posted by TanRanger_
*Dan -


It sounds like you're thinking along the most sensible lines. Apache is certainly a preferable route for many reasons. I'd be surprised if many people intend to try to keep Windows based ReplayServers running indefinately. I imagine most folks will opt for Linux or BSD (or maybe win2k... maybe) so they will have an hands off box they can "set and forget" (to coin a phrase).


I haven't installed PHP yet, so I haven't been able to try out the Apache version. I'm wondering, though, if multiple ReplayServers will actually require multiple instances of Apache to be running? I

* Yes, I know... multiple wepages on a single website do not all have uniqe IPs.*


----------



## dfrumin

NFW - feel like doing an interesting test???


I specifically wrote the server in PHP because Win2k/IIS supports PHP as well. So you may not have to install Apache on your box, just PHP and then use IIS to manage the rest. But you'd have to convince IIS to pass everything through PHP, not just .php files.


Want to play with that? 


Note: Apache takes up a relatively meager 4MB of mem or so (or so reported by taskmgr). So it's not a big drain on the server.


dan

Quote:

_Originally posted by NoFreakinWay_
*I need to put my two cents worth in here and vote for the C++ version. I for one will be running a Win2K Server to dish out the files. I also plan to implement a VB front end for nice and easy menu's. This is all provided I have the time  It would also be quite interesting to use .net later and play around with it's possibilities.



BTW: I should be getting my 4K in the next couple of days, I hope to be of some help when that time arrives.*


----------



## Patrick Bennett

Quote:

BTW - if someone knows of or has light, extensible, portable, AND reliable web server code in C++, I'd be happy to code the C++ version in platform independent fashion (sockets are the main platform issue).
Writing cross-platform code with ACE http://www.cs.wustl.edu/~schmidt/ACE.html is a breeze. I really don't think the web server plug-in approach is the way to go. It's far too easy to have massive security problems with most web servers (particularly IIS), and even the good servers can be difficult for most users to truly lock-down.


I think a dedicated C++ server is the way to go. A full web server implementation isn't necessary, as Replay's HTTP usage appears to be quite simple. I'm not sure how much time I'll be able to devote to it, but I have extensive communication server experience and would be able to help quite a bit writing a multi-threaded 'replay server.'


I think any replay-server effort should be moved over to the sourceforge site though if we're going to get serious about it.


----------



## nystratton

Well anyone who cares about secuirty will not run any MS product let alone ISS.


-nathan


----------



## firefighter

nystratton:

If you're going to insult some software I'd sugest you spell it correctly so the whole class knows what you are talking about.


(It's IIS not ISS)


-Mike


----------



## jmaver

It was the codec from Eleplayer I think. I installed purchased the Ravisent codec, and it is right side up.


The video is a little squished sideways though.

Quote:

_Originally posted by jmaver_
*I have used several versions of the Replayer java app to grab video from my 4040. All shows were 30 min standard quality. I am playing them with the freeware Zoom player and the Elecard player. In every case, the video is upside down. Am I the only one experiencing this?


I have not tried the ReplayPC program, so I don't know if that will produce the same effect.


Any ideas?


Thanks,

John*


----------



## NoFreakinWay

Dan,


Yes I would love to try it. But I am a long way from getting things setup to do so. I just found out the 4040 arrived today WOW I ordered it yesterday around 10am my time and it arrived around 2pm today... I Like It!!! But I am also in the process of adding some things to my system, so its torn apart and must be re-assembled first.

However I will try it when I get my server system up and running. I know NOTHING about Apache, other than what it is, so I may need a few pointers.


Nathan,

Lets not turn this into a MS / *nix argument thread, we'll waste far to much time pointing out the hacking nature of UNIX and its weaknesses... big


----------



## dfrumin

In response to some of the comments made earlier...


Security

I think since this is going to be run in-house, security is not much of an issue. Anyone who doesn't have a firewall protecting their home network is fooling themselves. So I don't think that's much of an issue here.


Portability

This is important to me. Even though I'm an MS guy, I recognize the community wants to do neat things. I know of one person who's planning to set up a linux box with mucho raid space for all their VHS movie library and what not. So that's important.


Lite Web Server

Having written it, most everything is needed except for HTTP POST handling. A multithreaded listener, the ability to listen to multiple IPs as one or more processes, launching threaded handlers per request, chunked HTTP, HTTP headers, file system handling, blah blah blah. Of course, I have one written, but the code isn't what I want and I'm concerned about leaks and threading over long term use. That's where Apache comes in: known, tested, x-platform, yummy


SourceForge

Agreed. Time is the kicker and right now my time got sucked elsewhere. Specifically, a few of us are hard at work on the guide. Lee is farther than anyone else on this, so I recommend looking at his code b4 investing any time. Lee and I are trying to figure out the guide header (808 bytes never caused so much trouble.) There's a solid functional solution which will be good for a bit. I definitely want to do more in C++ for ease-of-install. v.next?


MS v. *Nix

I spent too much of my life (it was my job) dealing with this issue. I hope not to deal with it here.


Anyway, the net? All of these are good ideas and worth researching. From my current perspective, I'm interested in solving the end-to-end problem before making any one piece of it that much better. So that means figuring out how to create a guide from scratch so I can add shows to a ReplayServer and have it all working. This (btw) is a massive pain.





-dan


----------



## Lee Thompson

Quote:

_Originally posted by dfrumin_
*808 bytes never caused so much trouble.*
Amen...


----------



## Dallben

Quote:

_Originally posted by dfrumin_
*808 bytes never caused so much trouble.*
Well, actually there was a virus back in the early 1990's (91 or 92) that was 808 bytes... overwrote the starts of files...caused me all kinds of trouble


----------



## honus87

Quote:

_Originally posted by Lee Thompson_
*Well I've finally completely figured out the category storage and lookup; there will be a revised GuideParser a little later today.


What would be VERY helpful to us working on the file format is if someone can take a fresh (preferably right after being 'reset' to factory with just the network setup) Replay4000 (no shows/categories/etc) and download the guide file and send it to me or post it.*
Did this version of GuideParser ever get posted? I want to "borrow" your category info.


----------



## Lee Thompson

Quote:

_Originally posted by honus87_
*Did this version of GuideParser ever get posted? I want to "borrow" your category info.*
Nope, here it is







(I kept tinkering with it and Dan added some new features.)



.08 is underweigh...

_Usage Options:_

*ReplayGuide data file to use*

-f pathname

*Extract ReplayHeader*

-eh

*Extract ReplayShows*

-es

*Extract ReplayChannels*

-ec

*List ReplayChannels and ReplayShows*

-l



Examples:

1. guideparser -l -f guide.dat *Parse Guide to Screen*

2. guideparser -eh -es -ec -f guide.dat *Parse Guide and Extract to Files*


The original syntax also still works:

guideparser guide.dat *-l -f implied*


To send it all to a text file:

guideparser D:\\myguides\\guide.dat > myshows.txt




Binary and Source Included

 

guideparser07.zip 80.50390625k . file


----------



## Sharky

Does anyone have a net capture / trace showing what happens during discovery and the first part of a file transfer ("server mode") between two Replay boxes? If so, can you send it to me, or point me to a URL? Something like Ethereal or tcpdump output would be great.


Thanks.


----------



## jtl

Here's a slightly modified version of GuideParser that compiles & works on unix (well, 32-bit intel unix with compilers whose padding agrees with VC's). It should work on Windows too (with slight changes in output format), but I don't have any way of testing that.


Combined with a unixified slightly modified xine, and, well...


ReplayPC xxx.xxx.xxx.xxx -o -e 1010552397.mpg | xine stdin://mpeg1


is very very cool.


(the modified ReplayPC should be showing up on sourceforge soon)


----------



## jtl

Here's a slightly modified version of GuideParser that compiles & works on unix (well, 32-bit intel unix with compilers whose padding agrees with VC's). It should work on Windows too (with slight changes in output format), but I don't have any way of testing that.


Combined with a unixified slightly modified xine, and, well...


ReplayPC xxx.xxx.xxx.xxx -o -e 1010552397.mpg | xine stdin://mpeg1


is very very cool.


(the modified ReplayPC should be showing up on sourceforge soon)


(well, maybe not. I can't get the attach-file thing to work. If the author of GuideParser is interested, mail me at jtl-dated-1010993668.029417 at molehill.org_


----------



## dfrumin

Hi Sharky -


I don't have it handy (been through 18 zillion of those writing the server) but I can tell you exactly what happens at each step. You can also see it happen between an RTV and ReplayServer or just look at the ReplayServer code and extrapolate from there.


What are you looking for particularly?


thx.

Quote:

_Originally posted by Sharky_
*Does anyone have a net capture / trace showing what happens during discovery and the first part of a file transfer ("server mode") between two Replay boxes? If so, can you send it to me, or point me to a URL? Something like Ethereal or tcpdump output would be great.


Thanks.*


----------



## honus87

V0.5 is up. Adds a new tabbed view that shows the categories that are on your box that actually have something in them (i.e. it doesn't show empty categories). If you have more than one box, it shows the union of them, with each one showing up on the tree for the categories they have shows for.


I also fixed a lingering bug in guide parsing. If anyone still has problems with guide data please let me know (other than the fact that quotes don't get displayed correctly).


I also seem to have introduced a bug where if you add the same box twice, save your configuration, then restart their could be a hang. I think this worked before so I'm not sure what the problem is, but I'll look into it eventually. You can still add the same box twice if you really want to see what it looks like, just don't save the config that way.

http://www.forbesfield.com/replayer.jar 


Things I'm planning on adding:

*(as suggested)set default directory/auto download/get ndx file too.


*(also as suggested)additional tab with all shows in a table with as much info as I can get out of the guide.


*getting source up at Source Forge


-Tom


----------



## epete

It looks as if there is now a version of Apache that will work on Windows 95, Windows 98, and Windows NT 3.5.1.

http://download.cnet.com/downloads/0...108-39383.html 


Does this help resolve the issue of the replay server application running in windows?



Also has anyone speced out the minimum hardware platform needed to run the server? I would live to be able to add some hard drives to an old 150 MHz Pentium machine.


----------



## centaur

Quote:

_Originally posted by dfrumin_
*Very very odd about my site, since it's a simple html page with nothing else in there. Can you download the zip directly from http://206.124.140.12/rtv/ReplayServer.zip ? Not as good as seeing the whole page, but a start...


thx
*
OK, I can get in now. All along been running Suse7.3|KDE2.2.2|Konqueror, but am now Squidding. In Squid I set up fake_user_agent, so to you I look like Netscape6.1 on Winduhs2k, and it works now.


I validated your webpage (validator.w3.org) and got:
Fatal Error: no document type declaration; will parse without validation


I could not parse this document, because it uses a public identifier that is not in my catalog.


You should make the first line of your HTML document a DOCTYPE declaration, for example, for a typical HTML 4.01 document:





Title








Sorry, I can't validate this document.


----------



## Patrick Bennett

Quote:

Does this help resolve the issue of the replay server application running in windows?
I don't think so, since I still don't think a full-blown web server should be used. I would love to be able to open up a control port through my firewall to a replayserver process so that I could safely access content on my home replay (with the replayserver would fetch for me). I would never want to open up a port to a full webserver on one of my machines.


The replayserver would act as a dummy web server to other replays on my home (internal) network, but I would never want any of that exposed outside my firewall. The fact that I *do* want some functionality exposed outside my firewall limits the usefulness (IMO) of using a web server for the foundation of the replayserver. It's a great way to get things started, but I don't think it has as much of a future as I would like.


----------



## markus98

Centaur, the FAQ works for everyone else.

The problems you're having are entirely

the result of YOUR configuration and YOUR

choices.


Why, up until yesterday you thought the

FAQ site was down, and now you want the

HTML edited?


I suggest you reflect on the relative merit

of wasting effort so you can read the faq,

vs making the faq more useful to those who

can read it.


M


----------



## Cynicor

Since I'm not planning to install Apache to run this, I might be able to do something in IIS (or better yet, .NET, which supports socket streams through NetworkStream and makes URL retrieval and parsing absolutely trivial). If I find time, that is. I just had to write a program to retrieve basketball stats from the NBA.com site, and it was shockingly trivial to grab and parse. Completely unlike the old WinInet days, where you'd cross your fingers and pray that it would work THIS time.


Not to turn this into an MS vs. *nix flame war, but .NET RULES! WOOOO HOOOOOOOOOO!


Josh


----------



## dfrumin

Hi Patrick,


I'm curious to see if I understand your needs... where does the firewall sit with respect to your home network and RTV? Are you thinking you want to access your home RTV from outside your home network or do you have each of your individual machines firewalled?


In any case, I agree with you that an optimized, light weight non-web server would be nice in the future. I'll definitely keep that in mind. Believe me that I'll be happier about working on that after I get the end to end solution completed.





thx.

Quote:

_Originally posted by Patrick Bennett_
*


I don't think so, since I still don't think a full-blown web server should be used. I would love to be able to open up a control port through my firewall to a replayserver process so that I could safely access content on my home replay (with the replayserver would fetch for me). I would never want to open up a port to a full webserver on one of my machines.


The replayserver would act as a dummy web server to other replays on my home (internal) network, but I would never want any of that exposed outside my firewall. The fact that I *do* want some functionality exposed outside my firewall limits the usefulness (IMO) of using a web server for the foundation of the replayserver. It's a great way to get things started, but I don't think it has as much of a future as I would like.*


----------



## dfrumin

I was going to write this in ASP to start but didn't want to write an ISAPI extension and couldn't find an easy way to configure it to ASP'ize a file without an extension (e.g. httpfs-fstat) or a .xml file (e.g. DeviceDescr.xml).


If you can figure that out, an ASP version would be trivial. Alternatively, you can download PHP for IIS and if you can make IIS pass every file through PHP, the code will work as shipped (I'd like that since I run w2k at home, so I woudn't need apache.)


That's another piece of research I'll do after the end to end solution is done. But if someone wants to figure that out, that'd be great 

Quote:

_Originally posted by Cynicor_
*Since I'm not planning to install Apache to run this, I might be able to do something in IIS (or better yet, .NET, which supports socket streams through NetworkStream and makes URL retrieval and parsing absolutely trivial). If I find time, that is. I just had to write a program to retrieve basketball stats from the NBA.com site, and it was shockingly trivial to grab and parse. Completely unlike the old WinInet days, where you'd cross your fingers and pray that it would work THIS time.


Not to turn this into an MS vs. *nix flame war, but .NET RULES! WOOOO HOOOOOOOOOO!


Josh*


----------



## dfrumin

Well, every once in a while, you do something stupid and you feel like an idiot.


I spent an hour the first night figuring out if I could make IIS do this. Kept running into "extension required" issues for the script mappings. Hey, guess what? "*" as an extension will map to the empty file. DUH!!!!


Oh well, at least that made an apache/php version for the *nix folks. Later tonight I'll write up an ASP version of this stuff for those win folks like me.


Sigh... 

Quote:

_Originally posted by dfrumin_


If you can figure that out, an ASP version would be trivial. Alternatively, you can download PHP for IIS and if you can make IIS pass every file through PHP, the code will work as shipped (I'd like that since I run w2k at home, so I woudn't need apache.)


That's another piece of research I'll do after the end to end solution is done. But if someone wants to figure that out, that'd be great 


[/b]


----------



## Patrick Bennett

Quote:

Hi Patrick,


I'm curious to see if I understand your needs... where does the firewall sit with respect to your home network and RTV?
I've got a combination firewall/hub w/ NAT & a WAN port for my cable modem (DMZ). I can open specific ports if need be so they can be forwarded onto specific internal addresses. The only inpu

Quote:

Are you thinking you want to access your home RTV from outside your home network or do you have each of your individual machines firewalled?
Absolutely.. I'd want to have a ReplayServer/PC specific port opened up that a ReplayPC client could communicate (authenticated) with. The Client (say, that I ran at my office) would send a request to the Server piece, the server would then issue commands to the RTV inside my home net, and forward the requested file on to my 'client' at work. This way, I could keep my RTV from being exposed on the net (dangerous business as well all know ), but be able to 'securely' access it from work.

'Securely' being a fairly loose term - depending on how the client/server communication was handled.


----------



## dfrumin

Few notes on this...


- Understood and makes sense.


- For sheer experiment, I gave this a shot the other day. It didn't work (rebooted the RTV) but I haven't figured out why yet.


- The bandwidth required is obnoxious and likely not avail for all but the most absurdly connected people. 1GB/hr = 270KB/sec = 2.7Mbps upload (8+2 bits). Youch!


- I think we, as the hacking community, should be self conscious about which activities might upset the wrong people and self shield against them. Streaming from a remote RTV _might_ be one of those so we might keep an eye on that.


-dan

Quote:

_Originally posted by Patrick Bennett_
*


Absolutely.. I'd want to have a ReplayServer/PC specific port opened up that a ReplayPC client could communicate (authenticated) with. The Client (say, that I ran at my office) would send a request to the Server piece, the server would then issue commands to the RTV inside my home net, and forward the requested file on to my 'client' at work. This way, I could keep my RTV from being exposed on the net (dangerous business as well all know ), but be able to 'securely' access it from work.

'Securely' being a fairly loose term - depending on how the client/server communication was handled.*


----------



## markus98

2.2Mbps.


Synchronous links support 8-bit bytes,

with no start bit, and no stop bit.


M


(don't read any further. It was just

a technical nit...)


Now, if you really wanted to get technical,

you could assume that anyone with 2.2Mbps+

of "raw byte stream needs" has an Ethernet

connection to a router with a NxT1 or DS-3

connection.


Then you could suppose that for a maximum

of 1514 byte Ethernet frame, 14 is reserved

for header, and 1500 for payload. Of those

1500, 64 would be the IP and TCP headers,

and 1426 would be data. That means that

you need at most (1500/1426)*2.2Mbps to

get 2.2Mbps.


Then you put that on a link (NxT1, DS3)

that has an MTU of either 3000 (2xT1) or

4470 (DS3). You therefore find that you have

another set of headers reducing from the

3.088Mbps (2xT1) or 44.210Mbps (DS3).


For practical purposes you can presume

a 42Mbps maximal throughput on a DS-3

with PPP signaling, so eventually we get

that in order to carry a 2.2Mbps sustained

data byte stream, over an ethernet LAN

connecting to a T3 or 2xT1, we need

a total carrying capacity of 2.4Mbps

sustained.


M


----------



## nystratton

Trun on RFC 2507 and compress IP/TCP headers from 40 bytes to 2 bytes, then you just have the overhead of PPP.


If you want to streem you may want to go with RTP and then use RFC 2508 to compress a IP/UDP/RTP header.


-Nathan


----------



## Dallben

I'm going to put something together so that I can use RFC 1149 to send video to the guy down the block


----------



## BarryLawton

I have successfully used the replaypc and replay.jar to download files from my REPLAY 4040. However I had trouble viewing the files on my laptop and my desktop. I am using Media Player. Now my laptop works but I have no idea why! Does anyone know where I can get the proper Codec? My desktop only plays the sound no audio.


Thanks for the cool progies!


Barry


----------



## nystratton

I got my 9 160 gig drives today for my replay server. One drive is for / and the other 8 are going to hang off a 3ware excalade 7850 controller (I get it tomorrow).


I also have two replays full of video I need to grab. Is anyone working on a tool to grab .ndx and .mpg files from a repaly that will compile in unix?


Any plans do add bulk transfer of .ndx and .mpg files in replayer.jar?


-Nathan


----------



## honus87

Quote:

_Originally posted by nystratton_
*

Any plans do add bulk transfer of .ndx and .mpg files in replayer.jar?
*
Probably the next feature to go in, but might not make it in before the weekend, depends if I spend more time watching TV or writing programs.


-Tom


----------



## mlinehan

Quote:

_Originally posted by nystratton_
*Is anyone working on a tool to grab .ndx and .mpg files from a repaly that will compile in unix?*
Ask and ye shall receive!


ReplayPC V0.3 is nearing release with planned support for Windows, Linux, BSD, and Mac OS-X, all from the same source!


A new -o option allows fetching files from the ReplayTV, and piping them into other applications in real time. One of our crack ninja programmers (the one who developed the -o option) has all ready used this new feature to "stream" mpeg data directly from a ReplayTV to a mpeg viewer application on his Redhat Linux box.


V0.3 is being tested now, and if all goes well, this should be a good weekend indeed!


mlinehan out!


http://replaypc.sourceforge.net/ http://replaypc.sourceforge.net/rpclogo.gif 

*click to visit project ReplayPC*


----------



## nystratton

Are you guys going to add a bulk download option? It will speed things up when you have 200 files to grab off a unit.


-Nathan


----------



## DrVPN

Is it possible for one replay to request a show from another replay that is in the same network??


If so, this starts me thinking.


----------



## honus87

Quote:

_Originally posted by mlinehan_
*

A new -o option allows fetching files from the ReplayTV, and piping them into other applications in real time.*
Does this work in Windows? I've been wanting to stream current.mpg off of my Replay but I don't know how to work around that damn "File is already open" crap that Windows always complains about.


-Tom


----------



## Sharky

Quote:

_Originally posted by dfrumin_
*I don't have it handy (been through 18 zillion of those writing the server) but I can tell you exactly what happens at each step. You can also see it happen between an RTV and ReplayServer or just look at the ReplayServer code and extrapolate from there.


What are you looking for particularly?
*
I've read through the ReplayServer code in detail, and I saw a few things that didn't seem quite right. I'm trying to understand the protocol better, so that I can try to figure out why my setup isn't working as well as it should be (discovery works OK for me, but my video transfer is very jerky -- but that's only one issue).


----------



## centaur

Quote:

_Originally posted by markus98_
*Centaur, the FAQ works for everyone else.

The problems you're having are entirely

the result of YOUR configuration and YOUR

choices.


Why, up until yesterday you thought the

FAQ site was down, and now you want the

HTML edited?


I suggest you reflect on the relative merit

of wasting effort so you can read the faq,

vs making the faq more useful to those who

can read it.


M

p.s. As a Centaur, I know you won't be

offended by being told you're a horse's ass.*


Very insightful Markus. (snigger snigger)


Please read my post again. I was reporting success and how I achieved it. And what could possibly be done about it.


Though this may not be useful to *you*, it could be very useful to someone running *nix.


So if you can't say anything nice... (you know the rest)

And switch to decaf.



To the Mods: Wow, 17 pages and still cranking fast. Must be one heckuva server you got there.


----------



## Lee Thompson

Quote:

_Originally posted by honus87_
*


Does this work in Windows? I've been wanting to stream current.mpg off of my Replay but I don't know how to work around that damn "File is already open" crap that Windows always complains about.


-Tom*
Yes it works on Windows (confirmed on Windows XP anyway).


----------



## Les_D

Holy *CRAP* in only two weeks you folks have nearly cracked the Replay4k wide open!


I've been holding off on buying a PVR because I want _*THE*_ one. I think the 4k may be at the top of the heap now.


My only concern is the need to buy 2 units for recording conflicts.


This may be moot if I build a TeraByte ReplayServer, and just tell the wife that her show is sure to be SOMEWHERE in there.


----------



## jmaver

I am using the $15 Ravisent codec inside Media Player. It works very well.

http://www.ravisentdirect.com/xppaks/ 

Quote:

_Originally posted by BarryLawton_
*I have successfully used the replaypc and replay.jar to download files from my REPLAY 4040. However I had trouble viewing the files on my laptop and my desktop. I am using Media Player. Now my laptop works but I have no idea why! Does anyone know where I can get the proper Codec? My desktop only plays the sound no audio.


Thanks for the cool progies!


Barry*


----------



## dfrumin

Hi Sharky,


Dallben ran into the same problem running Apache on WinXP Pro. We fixed it by setting the SendBufferSize (I upgraded the page on my site) to 32467. Our speculation is that server OS'es set the buffer to higher expecting to send lots while client OS'es set it to lower.


Give that a shot and let me know if that works.


thx.

Quote:

_Originally posted by Sharky_
*


I've read through the ReplayServer code in detail, and I saw a few things that didn't seem quite right. I'm trying to understand the protocol better, so that I can try to figure out why my setup isn't working as well as it should be (discovery works OK for me, but my video transfer is very jerky -- but that's only one issue).*


----------



## djinni-ae

Quote:

_Originally posted by Les_D_
*Holy CRAP in only two weeks you folks have nearly cracked the Replay4k wide open!


I've been holding off on buying a PVR because I want THE one. I think the 4k may be at the top of the heap now.


My only concern is the need to buy 2 units for recording conflicts.


This may be moot if I build a TeraByte ReplayServer, and just tell the wife that her show is sure to be SOMEWHERE in there.*
You don't have to buy two... it's a networked machine! Just post your conflicts and see if anyone else has the same conflict. Then you send them what you record, and they send you the other half of the conflict... Wow! We'll probably need to start a usenet group or board to do this trading -- it really doesn't belong here now does it?


--Djinni


----------



## Patrick Bennett

Quote:

You don't have to buy two... it's a networked machine! Just post your conflicts and see if anyone else has the same conflict. Then you send them what you record, and they send you the other half of the conflict... Wow! We'll probably need to start a usenet group or board to do this trading -- it really doesn't belong here now does it?
Making it easy to send tons of people copies of our RTV shows is not the point of these products. It's this kind of activity that the networks are worried about (and in some cases for good reason). If we don't watch it, Replay will end up just outright turning the feature off (completely).


----------



## TanRanger

I'm glad to see folks with level heads on their shoulders.

We have to cover our rears as best we can.


The big media moguls panic whenever we figure out how to do something fun and harmless. They can't understand how "fair use" and "technology" can coexist (in the same sentence, even).


When TVs first started to arrive in small towns, dozens of neighbors might huddle around a single tube. Later Beta (and VHS) let us save shows and share them. That's perfectly legal, and all we've added is the internet. Clearly they are trying to take advantage of our using new methods to do old things. If it's new and exciting enough, the media giants want to scare the judicial system (old fogies in robes) into thinking we're hiding behind the words "fair use" whilst infringing on things left and right.


For what it's worth... The most recent arguement I've heard against MP3s is nonsensical... Namely, that sharing copyrighted material is not illegal (like recording off the radio). Instead, it is illegal when you are sharing EXACT DIGITAL copies. That is: perfect digital copies of the original.


Duh! MP3 is LOSSY compression. It is not an exact copy... BY DEFINITION! So sharing MP3s is (by that argument at least) not inherently illegal. Ditto DIVX rips of DVDs. That's also LOSSY compression (5 gigs onto a 650MB CD?! um... let me see). It's no different from recording a movie off of TV and giving a copy of the tape to a friend. Is that illegal? Should it be?


Anyway... let me check my list...

(1) compliment

(2) encourage defensive behaviour

(3) rant

(4) rant some more

(5) ... oh yeah


SonicBLUE won their lawsuits about the Diamond RIO. And won a bunch of free press in the process. Isn't it possible that their lawyers have picked another fight they are sure they can win? I mean... The RTV4Ks let us share shows with family in other states, right? That's an official intended use of that feature. So why should we assume that USING THAT FEATURE might anger the gods? I'm not saying that it wont... but would it? Or should it matter? If they DO get angry, then SonicBLUE gets more free press and stuff.


I'll be quiet now (for the moment ;c)


----------



## TanRanger

Anyone s'pose it would be possible to trick an RTV4K into playing audio files? MPEG2 audio streamed off of the server?


Hey.... I waited 10 whole minutes.


----------



## Patrick Bennett

I don't think anything 'harmless' about being an HBO subscriber, recording the show on your Replay, and sending it to all your friends. I think somebody like HBO has legitimate concerns here.


----------



## Jah-Wren Ryel

Please. before this thread turns into yada-yada (Yet Another Debate About...) the copyright industry, and destroys the original technical topicality, please take it to a brand new thread instead.


----------



## NoFreakinWay

That a good idea. Let's not concentrate on the legal stuff in this thread. Lets get back to the techie stuff..


Hey dfrumin


How's that ASP version for ReplayServer for IIS coming along???


----------



## mlinehan

Quote:

_Originally posted by nystratton_
*Are you guys going to add a bulk download option? It will speed things up when you have 200 files to grab off a unit.


-Nathan*
You can "bulk" download using V0.2b with a little work.


First retrieve the directory listing and redirect it to disk:

ReplayPC 192.168.0.4 -d > fetch.bat


Now the file fetch.bat contains a complete file listing for the video directory. Something like:


1234.mpg

1234.ndx

5678.mpg

5678.ndx


Now edit fetch.bat to insert the ReplayPC extract command. Thanks to cut and paste, this is an easy operation:


ReplayPC 192.168.0.4 -e 1234.mpg

ReplayPC 192.168.0.4 -e 1234.ndx

ReplayPC 192.168.0.4 -e 5678.mpg

ReplayPC 192.168.0.4 -e 5678.ndx


Then run the batch file. tada!


----------



## mlinehan

Quote:

_Originally posted by honus87_
*


Does this work in Windows? I've been wanting to stream current.mpg off of my Replay but I don't know how to work around that damn "File is already open" crap that Windows always complains about.


-Tom*
I don't know, in theory it should, does anyone know of a windows mpeg player that is willing to take input from stdin?


----------



## NoFreakinWay

I have a question about the directory(ls) listing I'm getting back from RTV.

The root has:


tmp

Video

Photo

??????

??????


I dont know why the tmp is there. Inside it is the same list

Video

Photo

?????


Can I get rid of it???

Then the next question would be how??


----------



## darkonejr

It seems replaypc and replayserver got a nod on slashdot (although through a slashback post), hope your webserver can handle it, dan! 


A couple of questions


1) We can't take non-rtv4k mpeg2s and serve them through ReplayServer yet, right? (Not until the guide is fully decoded?) Like maybe mpg2 files from an older replaytv extracted through extract_rtv, or, (since we're already out in the open now) unencrypted .vobs?


2) Is the Commercial Skip information preserved? (I'd guess it would be in the accompanying index file..) I'd like to edit existing mpegs to skip over a few minutes...



-Julian


----------



## RSaunders

DarkOneJr,


I don't know that the commercial skip is in the ndx. The file from a long CBS (= many commercials) show isn't much bigger than a short HBO one. It might be done in real time during playback, something like a 15/30/60 sec lookahead buffer. It made a mistake on a Futurama episode I recorded because there was a black scene frame 60 secs into the third segment of the show. It'll take some time with a VCR to figure it out.


/Randy


----------



## RSaunders

I can't remember who asked why downloading was taking a long time. However, I found something to check. I moved my ReplayTV today, out of the computer office and into the basement where the kids can watch it. Now it is hooked up through my house hub, a hop down from the office hub. It was taking 6-7 seconds per dot to download. I almost died.

A little fault isolation showed the ReplayTV is a 100baseT device. Not 10/100 auto switching like most other NICs. The house hub (which just ties in the kids PC) was 10baseT only. This shows it is old and I am cheap. No elegant fallback - yikes. Just $30 later and have a nicer house hub and things are back to normal.


/Randy


----------



## mcvideo

I've gotten replaypc working and want to user replayer.jar. I downloaded the java runtime from Sun and installed it and the app will see the replaytv after entering the replaytv's IP. It won't get files though. I've tried on two different w2k boxes and I get the same result.


I'm unsure of previous posts if the http://yourip/Device_Desc.xml substituting my workstations ip for "yourip", is for troubleshooting replayer.jar. If so, I can get the page from the replay, but nothing from my workstation.


What am I missing here?


----------



## mcvideo

Quote:

_Originally posted by mcvideo_
*I've gotten replaypc working and want to use replayer.jar. I downloaded the java runtime from Sun and installed it and the app will see the replaytv after entering the replaytv's IP. It won't get files though. I've tried on two different w2k boxes and I get the same result.


I'm unsure of previous posts if the http://yourip/Device_Desc.xml substituting my workstations ip for "yourip", is for troubleshooting replayer.jar. If so, I can get the page from the replay, but nothing from my workstation.


What am I missing here?*
Here is some additional information.


I am running 0.4a replayer.jar.


I can pull 1/2 epidodes off my replaytv with replayer.jar, but not anything longer.


When I try to pull anything longer than 1/2 hour I get the following message:


Error getting file: java.lang.NumberFormatException: 2825945088

java.lang.NumberFormatException: 2825945088

at java.lang.Integer.parseInt(Unknown Source)

at java.lang.Integer.parseInt(Unknown Source)

at replayer.Downloader$Replay.getVideo(Downloader.java:960)

at replayer.Downloader.getVideo(Downloader.java:554)

at replayer.GetFileThread.run(Downloader.java:39)


After the message I can go ahead and download another 1/2 show without problems.


Is the version of Sun's java runtime 1.3.1.02 the culprit or ?


----------



## honus87

No, I'm the culprit. If you get the latest version (v0.5b) that problem should be fixed (though I'm sure there are plenty of others). Thanks, btw, for mentioning the version number, it makes responding to bug reports MUCH easier.


-H


----------



## mcvideo

Quote:

_Originally posted by honus87_
*No, I'm the culprit. If you get the latest version (v0.5b) that problem should be fixed (though I'm sure there are plenty of others). Thanks, btw, for mentioning the version number, it makes responding to bug reports MUCH easier.


-H*
That fixed the issue!


----------



## sex0r

Ok, I followed Slashdot coverage over here, I don't have a 4k, but with these new developments, I'm very interested in getting one. In any event I have a ton of experience in the digital video arena, specifically involving MPEG1, MPEG2, & MPEG4. I skipped past a thread page or two, so I apologize in advance if I am providing any answers that have already been provided 


**How do I play these files in Windows Media Player?


These files all sound as though they are DVD standard compliant MPEG-2 files. Windows does NOT include codecs to play these files. The only way you will be able to play these files is if you install MPEG-2 codecs (via a software dvd-player or provided solution.) Franhauffer published some free DirectShow Mpeg2 based decoding solutions awhile ago (keep in mind these aren't a completely high quality solution, if you want the best quality its suggested you get Intervideo's WinDVD). You can find the free MPEG-2 codecs at Doom9's video page here: http://doom9.org/software2.htm, search the page for 'Fraunhofer video and audio codecs - allows DVD playback in WMP' I'm respecting Doom9's original request not to directly link to these files. So you'll have to find them with Control+F (or just scroll to the Support Utility section). You may find that aspect ratio issues will only be corrected in Software DVD players not via Windows Media Player + Directshow Codecs. Also, you will probably experience some interlacing problems with direct playback within Media Player.


**Why are these files X resolution? Are these burnable without re-encoding to DVD?


Supported DVD resolutions for MPEG-2 are 720 x 480, 704 x 480, & 352 x 480. The main reason MPEG-2 is used most often in PVR devices is the fact that it handles interlaced video natively. So you'll probably find that your video is in an interlaced form in these files. That's also the reason the vertical resolution is always 480 pixels (so that the video contains the field information for both fields). You can find out more information about interlacing here: http://168.144.91.167/nickyguides/interlace.htm (I will avoid going into a ton of specifics here). As far as I've read of this thread and the nature of these files, it IS possible to directly import these into a DVD authoring application, be warned that creating menus, etc is alot more involved for these files.


Authoring DVDs to CDRoms almost never works (referred to as Mini-DVDs) in standalone players. This is not necessarily because of lasers, but because of limitations of drives. Usually these drives are 1-2x, and they read cds at somewhere around 20x. 20x is equivalent to 3.0 MB/sec. DVD MPEG-2 bitrates are usually quite a bit higher than this (NOTE: This is also the reason SVCD video bitrates are limited to 2.6 MB/sec). MiniDVDs are playable in the Shinco player (and from what I've heard, only reliably when the drive is replaced).


So to play these in a standalones, you'll either need to author a DVD with MPEG files (I'd recommend recording in the highest quality mode) or you'll need to transcode to an alternate format. If your player supports SVCD this is the *most* recommended format because staying with MPEG-2 ensures that you can still natively deal with the interlacing issues (without introducing the problems of deinterlacing). If your player supports SVCDs, you can read about encoding SVCDs here: http://doom9.org/mpg/svcd-guides.htm , remember if you convert to SVCD, the new MPEG-2 file will *probably* not be playable on the 4k, (Although you may want to try) because of the resolution change to 480 x 480.


Well, I hope I cleared some stuff up.


----------



## Dallben

Quote:

_Originally posted by RSaunders_
*I can't remember who asked why downloading was taking a long time. However, I found something to check. I moved my ReplayTV today, out of the computer office and into the basement where the kids can watch it. Now it is hooked up through my house hub, a hop down from the office hub. It was taking 6-7 seconds per dot to download. I almost died.

A little fault isolation showed the ReplayTV is a 100baseT device. Not 10/100 auto switching like most other NICs. The house hub (which just ties in the kids PC) was 10baseT only. This shows it is old and I am cheap. No elegant fallback - yikes. Just $30 later and have a nicer house hub and things are back to normal.


/Randy*
I've got mine plugged into an old 10mb only hub 'cause it's the only hub that I own (everything else is 100/1000mb switches) so that I can constantly be sniffing traffic. (which can't be easily done with a switch) The 10mb hub is just dandy for copying files. Just not for streaming video. Make sure you're not having other issues (faulty cable, exceeding total cable length,crazy amounts of collisions, etc) You might also try plugging the cat 5 into different ports on the hubs. I've owned more than one hub with a bad port or two.


----------



## Smiling Bandit

Quote:

_Originally posted by Dallben_
*


I've got mine plugged into an old 10mb only hub 'cause it's the only hub that I own (everything else is 100/1000mb switches) so that I can constantly be sniffing traffic. (which can't be easily done with a switch) The 10mb hub is just dandy for copying files. Just not for streaming video. Make sure you're not having other issues (faulty cable, exceeding total cable length,crazy amounts of collisions, etc) You might also try plugging the cat 5 into different ports on the hubs. I've owned more than one hub with a bad port or two.*
You will find that most managed switches, which many 100/1000 are, allow you a monitor port option. This basically copies all the traffic from one port to another, allowing for troubleshooting and monitoring. If you have the extra ports this may speed you up some.


But I digress,

The Smiling Bandit


----------



## markus98

The RTV4K has a 10/100 card set to autosense

the speed and duplex (full, half.)


If your switch/hub is set to autosense, you're

in a crapshoot as to whether the two negotiate

correctly.


This is why one previous poster indicated at his

worksite they turned autonegotiate off.


In your home you may elect to have DEVICES

autonegotiate and SWITCHES AND HUBS AND ROUTERS

be stuck on 100/full or whatever they want.


Alternately you may wish to have switches, hubs,

and routers autonegotiate, but have devices

set to 100/full or whatever. In this case you

will need to get the RTV4K to negotiate anyway.


Fortunately the RTV4K does the negotiation of

duplex and media type ONCE at power up, and it

appears locked after that time.


I've gotten it to talk 10, and gotten it to talk

100, and haven't scrozzled with half dup (what's

the point when you have two pairs anyway and

a collapsed backbone ;-)


FYI if you are unsure, an easy way is to put

a PC with a crossover cable connected to it,

and set the PC to autonegotiate... watch how

long it takes _IF_ it gets a link. then set

for 100 hard full, 100 hard half, 10 hard full,

and 10 hard half, and see how quickly they

work. (RTV4K powerfails required in between

changes.)


Cheers


M

p.s. Hi JC


----------



## Dallben

Quote:

_Originally posted by Smiling Bandit_
*


You will find that most managed switches, which many 100/1000 are, allow you a monitor port option. This basically copies all the traffic from one port to another, allowing for troubleshooting and monitoring. If you have the extra ports this may speed you up some.


But I digress,

The Smiling Bandit*
Right. I said that switches couldn't be easily sniffed.  My three Cat 5500's are on racks in my basement, and I A) Don't want my replay plugged into one, and B) Do NOT want to carry one upstairs (Have you ever tried to carry one of those???) The $49.00 switch I have sitting in my living room I use for playing with this stuff isn't a managed one. So when I want to stream something, for the moment, I just switch the cat 5 from the hub to the el-cheapo switch.


----------



## Lee Thompson

New Command Line Switches:


-ls List ReplayShows

-lc List ReplayChannels



New Reporting:


Movie Release Year

Movie Star Rating

Movie MPAA Rating

TV Show Ratings

Guaranteed/Not Guaranteed

Text Wrapping on Description, Actors, Guests, Producers, Directors text.

Multi Part Episode Indicators



Additional:

Various bug fixes, a lot more unknowns mapped out in the various guide structures.





Coming Up Next (in no particular order):


1. Finish mapping out guide file

2. Support redirection from stdin

3. Search for Show/Title Option

4. Improve Word Wrapper

5. Make the source more unix friendly


*Includes Win32 Binary and Source*


For help just run guideparser in a DOS/Command Window without any parameters.

Download GuideParser .08


----------



## jtl

Quote:

_Originally posted by mlinehan_

*


You can "bulk" download using V0.2b with a little work.


First retrieve the directory listing and redirect it to disk:

ReplayPC 192.168.0.4 -d > fetch.bat


Now the file fetch.bat contains a complete file listing for the video directory. Something like:


1234.mpg

1234.ndx

5678.mpg

5678.ndx


Now edit fetch.bat to insert the ReplayPC extract command.


Thanks to cut and paste, this is an easy operation:*
*
if memory serves, the original question was from a Unix user, so...


ReplayPC 192.168.0.4 -d | egrep -v tmp | cut -f 1 -d ' ' | while read i ; do ReplayPC 192.168.0.4 -e $i ; done*


----------



## jtl

Quote:

_Originally posted by Dallben_
*


I've got mine plugged into an old 10mb only hub 'cause it's the only hub that I own (everything else is 100/1000mb switches) so that I can constantly be sniffing traffic. (which can't be easily done with a switch) The 10mb hub is just dandy for copying files. Just not for streaming video.*
My network is 10mb only still, and I'm streaming video just fine.


----------



## nystratton

Quote:

_Originally posted by jtl_
*

if memory serves, the original question was from a Unix user, so...


ReplayPC 192.168.0.4 -d | egrep -v tmp | cut -f 1 -d ' ' | while read i ; do ReplayPC 192.168.0.4 -e $i ; done*
Yep, I know how to use unix. The question was will the java app replayer.jar support bulk transfer. Right now I can't run replaypc on my unix box.


-Nathan


----------



## mlinehan

Quote:

_Originally posted by nystratton_
*


Yep, I know how to use unix. The question was will the java app replayer.jar support bulk transfer. Right now I can't run replaypc on my unix box.


-Nathan*
You can now! ReplayPC V0.3 has been released. Download the ReplayPC-0_03_tar.gz file. Extract the sourcecode and make file, and build your very on Unix ReplayPC


mlinehan out


----------



## mlinehan

ReplayPC Version 0.3 has been released in both Windows and Unix archives. You can compile the Unix version on Max OS-X by using "make CXX=C++"


Enjoy


You can download V0.3 from our project www site

replaypc.sourceforge.net


mlinehan out

http://replaypc.sourceforge.net/ http://replaypc.sourceforge.net/rpclogo.gif 

*click to visit project ReplayPC*


----------



## Dallben

Quote:

_Originally posted by jtl_
*


My network is 10mb only still, and I'm streaming video just fine.*
You can stream high quality over 10mb?


----------



## djinni-ae

Quote:

_Originally posted by jtl_
*

if memory serves, the original question was from a Unix user, so...


ReplayPC 192.168.0.4 -d | egrep -v tmp | cut -f 1 -d ' ' | while read i ; do ReplayPC 192.168.0.4 -e $i ; done*
I wrote this little perl script to help with downloading. I call it the Download Helper Script, or dhs for short.


Turn on your TV/RTV and use the guide on screen to browse to the show you want to download. Take note of the date and time the show was recorded. Then run the dhs.pl script, hitting return (default N) until you get to the correct date/time. Then press Y (yes, download please) and presto-chango, it starts downloading.


I'm going to incorporate a menu, switch, or option to allow the program to automatically create the data file, because right now you have to run replaypc.exe -c to get the file listing. But for now, it's all I've got.


Run dhs.pl without any arguments for usage instructions. I packaged the version of replayPC.exe I used/tested it with for convenience. Unix users will need to edit the first line of the file for it to work properly.


If you need perl, there are great installs at http://www.activestate.com 


--Djinni, an Air Elemental


Note: I updated the attachment with the changes I made today. Now it's all one step... type dhs.pl and you're off to the races. You need replaypc.exe in the same directory or in your search path. I've tested it, it works for me, ymmv. ;-)

 

dhs+.zip 20.9755859375k . file


----------



## dfrumin

Quote:

_Originally posted by NoFreakinWay_



Hey dfrumin


How's that ASP version for ReplayServer for IIS coming along??? [/b]
Sorry to have been quiet, but work-work (vs. fun-work? ) took over for a bit. I ran into two major problems with ASP, one of which I found a solution for, but the other I didn't.


For humor value...


ASP does not have an inherent way to read binary data from a file into a buffer so you can send it in binary form. Took me a while, but I found a hack using ADODB.Stream. If you're not an ASP person, don't ask.


The unsolved problem? I haven't found a way to trick IIS into not sending headers. The problem happens with the Device_Descr.xml file, where the RTV gets mighty unhappy about seeing certain headers. Short of finding some back trick to do that, a "pure" ASP version won't be possible and I'll need to write an ISAPI extension of some form.


I also tried just moving the PHP version over so those of us with w2k (like me ) could at least bypass installing apache, but it suffers from the latter as well (no way to clear the headers.)


So ASP is on the back burner for a bit. I went back to focusing on the guide.


I can now add and remove shows to existing channels in a guide and am only missing out on how to add/del channels from a guide.


Last (but not least) I've come up with the architecture for multiple ReplayServers within apache/php in a way that I feel happy about and offers some neat-o features. But that's after the guide stuff 


Phew, lots to do.


----------



## jtl

Quote:

_Originally posted by Dallben_
*


You can stream high quality over 10mb?*
It's at the limits of the network capacity, but yes, as long as the network is otherwise quiet.


I should mention that I'm getting artifacts at medium and high quality, worse at high, that I haven't seen before -- thin horizontal black bars on the right side of the window, denser the further right you look, and the smaller the window is. I get the same artifacts whether I'm streaming or watching a pre-downloaded file, though.


----------



## Rich A

ummm I thought this post would attach itself to the one I was quoting. Sorry it is "out of sequence". It's in response to "sex0r"

post a couple pages back which was very informative about Mpeg-2, DVD et al. Anyway ..



Some of the latest generation stand alone DVD players do indeed play DVD title set content burned to CDR media. While the list is short there are a few. The Sampo 620 DVD player is one. I have been using RPTV 3000 series mpegs to author 1/2 D1 title sets to CDR for some time. (ever since the first "Extract_RTV" utility came out. The smaller size frame and low bit rate enables one to fit about an hour show (minus the commercials) onto a 700 mb CDR. I went this route because the DVD authoring environment offers a lot more in features over SVCD or VCD. I've been very happy with the results to date.


The only problem with the 3000 and down series mpeg was the audio which which was 32 kHz. This required the re-encoding of the audio stream to 48 kHz to get it into DVD mpeg-2 compliance.


I was pretty excited to find the guys here already working on a LAN based extract program for the 4000 series. Especially since the native Mpeg-2 of the RPTV 4k now has 48 kHz sound.


But so far, I've been having some trouble getting "clean" extracts of full recorded mpegs. First tests with small one minute manual recorded mpegs in all three frame sizes worked fine. But I'm finding when trying to take an hour (of any frame sized full recording) that the resultant mpeg is full of video problems. Some artifacting in various macro-block sections of the frame and other problems such as broken GOPs etc.


I started another thread on the subject (using replayTV mpegs) not wanting to add to the length of this thread with a slightly OT subject. If anyone is doing any authoring with the 4K mpegs I'd really like to compare notes. Please respond to the other thread .. Or any other comments welcome. Thanks.


----------



## dfrumin

Quote:

_Originally posted by darkonejr_
*It seems replaypc and replayserver got a nod on slashdot (although through a slashback post), hope your webserver can handle it, dan! 


-Julian*
Oh oh... 


Well, there come my 15 minutes of fame. If anyone wants an autograph, ask now before they go up in value.


----------



## jtl

Quote:

_Originally posted by Dallben_
*


You can stream high quality over 10mb?*
It's at the limits of the network capacity, but yes, as long as the network is otherwise quiet.


I should mention that I'm getting artifacts at medium and high quality, worse at high, that I haven't seen before -- thin horizontal black bars on the right side of the window, denser the further right you look, and the smaller the window is. I get the same artifacts whether I'm streaming or watching a pre-downloaded file, though.


----------



## dfrumin

To answer two questions in one...


To play non-RTV mpgs on the RTV (an objective of ReplayServer), we'll have to:


1. Figure out if there are any conversion issues for the MPG itself.

2. Figure out the format of the ndx file to create it.

3. Figure out how to add it to the guide (this one is nearly done.)


RSaunders - the ndx file does grow linearly (or close to it) with the mpg file size, so it includes something. I'm just not sure what.


Other info: the 3k series files don't work with 4k series RTVs which bummed me out cuz it would have been a great way to move over the many GBs of shows I have on my 3k series RTVs. If anyone wants to start doing diffs on those sets of files, that'd be a great start.


Other info: commercial skip does not seem to work from RTV-RTV, nor does it work for ReplayServer. Given that commercial skip works on the real time stream only when there's a long enough buffer, I'd speculate that we're talking about a lookahead buffer of some form, which wouldn't exist in the stream.


dan

Quote:

_Originally posted by RSaunders_
*DarkOneJr,


I don't know that the commercial skip is in the ndx. The file from a long CBS (= many commercials) show isn't much bigger than a short HBO one. It might be done in real time during playback, something like a 15/30/60 sec lookahead buffer. It made a mistake on a Futurama episode I recorded because there was a black scene frame 60 secs into the third segment of the show. It'll take some time with a VCR to figure it out.


/Randy*


----------



## dfrumin

*An idea / appeal to all hackers (mlinehan, toots, lee, chad...)*


We're all building some very interesting complements to the ReplayTV experience, which is excellent. Frankly, it's this very reason that made me upgrade my two 3Ks for two 4Ks (hehe). And there are some very interesting lower-level discussions going here about the source, the hacks, the installation, etc.


But I wonder if we've found the best way to get this out to the masses of RTV4k users who would love this.


Right now, I can count many sources of information, each on its own site (FAQ, extract_rtv, ReplayPC, ReplayServer, GuideParser, PlanetReplay, Replayer, ...) In addition, some sites (those on sourceforge) serve as the dev hq as well as the user hq.


So, I propose the following to all hackers -


Let's create one strong end-user presence for those who want to come in, see what RTV4k can do and get all the tools / pieces / value at once as well as support each other in installation, etc. I believe PlanetReplay is a fine domain for such an effort and has a nice design that could be extended from its one tool to many tools. Further, having seen AVS forums be hosted in a subdomain (the tivo ones) we might be able to integrate those as well.


The sourceforge efforts can, and should, continue separately for those of us who will be coding these tools. But being a product guy at heart, I always look for that end-user happiness quotient.


I will take a first step and work with PlanetReplay to get the ReplayServer stuff up there in a solidly integrated fashion. Assuming Chad lets me (chad?) I hope to make it the de-facto location for information, status, downloads on the different versions of ReplayServer. When C++ tools come about, I'll post those on SourceForge for assistance with deving.


Any other takers on this?


----------



## Lee Thompson

Quote:

_Originally posted by dfrumin_
*An idea / appeal to all hackers (mlinehan, toots, lee, chad...)


I will take a first step and work with PlanetReplay to get the ReplayServer stuff up there in a solidly integrated fashion. Assuming Chad lets me (chad?) I hope to make it the de-facto location for information, status, downloads on the different versions of ReplayServer. When C++ tools come about, I'll post those on SourceForge for assistance with deving.


Any other takers on this?*
Sounds good to me!


----------



## toots

Yeah, I was going to check my stuff in to sourceforge, but I'm happy to put it anywhere.


As for commercial skip:


Commercial skip quite definitely does work RTV to RTV. Seems like in my household, it's a given that if I'm in the living room, the show I most want to watch is on the bedroom RTV and vice-versa. I do more than half my viewing via streaming from one unit to another, and it most definitely does the commercial skipping in that mode.


----------



## dfrumin

Hmmm (he says snapping his head back)...


Let me play with it some more then. Hadn't gotten it to work b/w my RTVs but I may be missing something inherently simple.


I stand corrected 


---


btw, I think sourceforge is a great place for developers to help develop the next version of the product, but as far as docs, installation tips/instructions, etc., I'd love for those to be accessible to end-users like I was not too long ago...


dan

Quote:

_Originally posted by toots_
*Yeah, I was going to check my stuff in to sourceforge, but I'm happy to put it anywhere.


As for commercial skip:


Commercial skip quite definitely does work RTV to RTV. Seems like in my household, it's a given that if I'm in the living room, the show I most want to watch is on the bedroom RTV and vice-versa. I do more than half my viewing via streaming from one unit to another, and it most definitely does the commercial skipping in that mode.*


----------



## benzene

So the resolution of the downloaded files appears to be 720x480, which is the standard DVD ratio. It is not the same as the TV standard ratio of 4:3. The files also appear to have black bands on the left and right side, but even if you take these off it appears that the image is wider than stander TV. Anybody figured out what is going on here? Is the image being stretched horizontally?


I want to play them on my PC with WinMedia or something, but I think the image is distorted.


Dave


----------



## toots

Well, in principle, there's nothing that says that the pixels have to be square. In the case of DVDs and ReplayTVs being played onto a 4:3 screen, the pixels are most definitely not square.


It just turns out that most PC video resolutions are 4:3, and just about everything seems to want to assume a square pixel. Therefore, making those assumptions, 720:480 is going to give you an oddly proportioned picture.


A proper playback operation on a PC would be able to display these MPEGs, "squishing" the horizontal axis to make the resultant image simultaneously compatible with most PC resolutions' square pixels and 4:3 aspect ratios.


----------



## nkopas

Well, yesterday I found out just how cool my Replay4K is. I've been watching this thread closely and was really impressed by the progress. Until yesterday I never had a reason to give any of these tools a try. Here's what I did:


1. Downloaded latest version of ReplayPC and GuideParser.


2. Copied a bunch of episodes of "Enterprise" to my PC.


3. Compressed them to MPEG1 with TMPGenc.

http://www.tmpgenc.com/e_main.html 


4. Performed "manual commercial advance" with Womble.

http://www.womble.com/index.shtml 


5. Burned them to VCDs.


6. Gave the discs to my dad so he could catch up on the series before new episodes started. He just popped them in his DVD player and they worked!


I went through the above process with almost no trouble at all. I've said it before and I'll say it again. Man, I love technology! Keep it up developers, this stuff is great!


----------



## toots

Yah, I just love this network hacking! Don't even have to open the box (which is sure good to me)!


I think all those guys who've been spewing those utilities at a rate faster than I can download them deserve some thanks from all of us.


----------



## Dallben

Quote:

_Originally posted by toots_
*Yah, I just love this network hacking! Don't even have to open the box (which is sure good to me)!


I think all those guys who've been spewing those utilities at a rate faster than I can download them deserve some thanks from all of us.*
Good for a few of us... You're not the only one with bad hardware karma


----------



## RSaunders

Quote:

_Originally posted by dfrumin_
*Hmmm (he says snapping his head back)...


Let me play with it some more then. Hadn't gotten it to work b/w my RTVs but I may be missing something inherently simple.


I stand corrected 

*
I don't know that working via stream implies that it is or is not in the .ndx file. You could still be filling a look ahead buffer and deciding based on that.


[Correction] I meant to say CBS vs HBO didn't make the .ndx file bigger. The long, convoluted sentence I typed a few pages back could easily be read to say something different. Bad Email grammar, sorry.


I offered this as an indication that if the .ndx file contains something about commercials it doesn't depend on the number of commercials. This seems unlikely. Not having hacked my RTV 2K, what does the .ndx file do there? Do we know??


/Randy


----------



## darkonejr

Don't mpegs need some sort of keyframe to use when fast forwarding back and forth? Maybe replay keeps that info externally via .ndx... Just a random thought...


----------



## sex0r

Quote:

_Originally posted by darkonejr_
*Don't mpegs need some sort of keyframe to use when fast forwarding back and forth? Maybe replay keeps that info externally via .ndx... Just a random thought...*
Keyframes (and deltaframes) are usually only in use frame based formats (i.e. AVI files). Mpeg2 uses instead I frames, B frames, and P frames. I frames are inserted at regular intervals and are used for 'seeking' in a Mpeg2 file.


If my guess were correct, I'd say the ndx files were some sort of insertion points (I frame offsets or time indexes) for where commercials end (or begin). This would be somewhat similar to chapters on a SVCD or VCD even, where you just index the i-frames and create entry points where you want chapters at.


----------



## karog

Quote:

_Originally posted by RSaunders_
*I offered this as an indication that if the .ndx file contains something about commercials it doesn't depend on the number of commercials. This seems unlikely. Not having hacked my RTV 2K, what does the .ndx file do there? Do we know??*
I haven't heard of anyone saying so far.


Guessing wildly, they might contain 8 byte pointers to 1 second intervals throughout a recording. With 3600 seconds per hour, this would only take 28,800 bytes, not a lot, and would be quite useful in jumping around as with QS and IR and JUMP.


I would also guess that any other information you would want to associate with an MPEG file without putting it IN the MPEG file might also go in the ndx file. Commercial skip info would be a good candidate. How much space would skip info take? Not much, just 8 bytes for start and 8 bytes for end of a commercial block. So 16 bytes times say 6 commercial blocks in 30 minutes would only be 96 bytes. This suggests that commercial skip info would be a trivial percentage of an ndx file, say 200 bytes per hour vs 28K for index pointers. Thus 2 shows of the same length, one with many commercials and one with few, would have ndx files not appreciably different in length.


----------



## dfrumin

So far, what I've seen (though I haven't spent much time on it) is that NDX files are very repetitive and grow linearly.


I thought MPG did have keyframes or i-frames in there too every so often. I had thought the NDX was a series of file offset pointers to i-frames, allowing for the vid stream to be "full" when you jump around.


If we didn't jump to appropriate file pointers for i-frames, the image would "fill up" in the typical mpg squares.


But I haven't confirmed that.


----------



## taral

Those high-ascii characters are actually windows-1252 characters. GNU recode says:


python -c 'print "\\x92\\x93\\x94"' | recode windows-1252..unicode | xxd


0000000: 2019 201c 201d 000a . . ...


0x2019: RIGHT SINGLE QUOTATION MARK

0x201C: LEFT DOUBLE QUOTATION MARK

0x201D: RIGHT DOUBLE QUOTATION MARK


You may also see 0x91 (= 0x2018 LEFT SINGLE QUOTATION MARK) but I doubt it.


----------



## artpease

Quote:

mlinehan wrote: ReplayPC V0.3 Released
I see in version 0.3 that you've removed the system header and program stream map fixup code. Does this mean that there really wasn't an incompatibility issue with Womble MPEG-2 VCR and MProbe?


Thanks for the wonderful utilities. You and ALL of your cohorts have doubled the value of the RTV 4000 


-Art


----------



## Cheezmo

This stuff is really great, especially as a Mac user, its nice to be seeing some real cross platform efforts.


I've tested Replayer and ReplayPC on my MacOS X laptop and they work great. Still haven't found a way to play the .mpg files on MacOS though


----------



## mlinehan

Quote:

_Originally posted by dfrumin_
*An idea / appeal to all hackers (mlinehan, toots, lee, chad...)

So, I propose the following to all hackers -


Let's create one strong end-user presence for those who want to come in, see what RTV4k can do and get all the tools / pieces / value at once as well as support each other in installation, etc. I believe PlanetReplay is a fine domain for such an effort and has a nice design that could be extended from its one tool to many tools. Further, having seen AVS forums be hosted in a subdomain (the tivo ones) we might be able to integrate those as well.


Any other takers on this?*
Sounds good to me

mlinehan out


----------



## jtl

The ndx files look like a series of 32-byte records. The beginning few lines of one file:
0202 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

0000 0340 fe00 0000 0000 71a4 0000 0000 0000 2ea4 71df b300 0000 0000 0000 0000

0000 1794 fe00 0000 0000 6d64 0000 0000 0000 2ea4 87a1 2840 0000 0000 0001 8000

0002 386c fe00 0000 0000 21f4 0000 0000 0000 2ea4 af90 8bc0 0000 0000 0003 0000

0000 3258 fe00 0000 0000 59b8 0000 0000 0000 2ea4 c552 0100 0000 0000 0004 8000

0000 199c fe00 0000 0000 8cec 0000 0000 0000 2ea4 e109 5740 0000 0000 0006 8000

0000 21c8 fe00 0000 0000 8258 0000 0000 0000 2ea4 ff6f 52c0 0000 0000 0008 8000

0000 0ac4 fe00 0000 0000 8034 0000 0000 0000 2ea5 20d0 3ec0 0000 0000 000a 8000

0000 6b1c fe00 0000 0000 7fdc 0000 0000 0000 2ea5 3776 95c0 0000 0000 000c 0000


The obvious patterns continue through the file, and are repeated in the other files I've looked at; the first entry starts with '0202' and is otherwise 0s; all other entries start with '02'; the next two bytes vary, then are followed by fe00 0000; 6 more 0 bytes; two non-zero bytes that vary, but vary by slowly increasing; 4 varying bytes, 4 zero bytes; 2 bytes that vary by increasing by 1 or 2, then two bytes that are always 0000 or 0080.


what it looks to me like, so far:

u16 flags;

u16 unknown1; // widely varies

u32 unknown2; // 0xfe000000

u32 unknown3; // widely varies in low 16 bits

u32 unused1; // always 0

u32 counter1; // increases slowly -- 6-10 records the same, then +1

u32 unknown4; // widely varies

u32 unused2; // always 0

u32 unknown5; // fixed-point biased variable, 16 bits each side of the radix point; increases by 1.5 or 2 each record


----------



## mlinehan

Quote:

_Originally posted by artpease_
*I see in version 0.3 that you've removed the system header and program stream map fixup code. Does this mean that there really wasn't an incompatibility issue with Womble MPEG-2 VCR and MProbe?


Thanks for the wonderful utilities. You and ALL of your cohorts have doubled the value of the RTV 4000 


-Art*
FlipFlop had his mpeg expert take a look at extracted 4K files, and the judgement was that unlike 2K and 3K units, the 4K unit mpeg files do not need fixing. In fact, by attempting to fix them, we were in fact messing them up.


Thus the mpeg fixup code has been excised, and the raw option as well since we allways do "raw" extractions now.


----------



## Sharky

To help figure out the format of the NDX files, has anyone tried playing back one MPG file with the NDX file from another show through ReplayServer, to see what breaks? That would give a good indication of what the file's used for.


It might also be interesting to edit out a contiguous section of the 32-byte records from an NDX file, and see what happens. This could give an indication as to whether the offsets in the file are absolute or relative, for example. On one half-hour show I downloaded, the NDX file has 4136 records, plus a header record. Does it sound like that could be roughly the number of I-frames in the file?


If someone has access to an MPG stream decoder, it would be interesting to compute the byte offsets of the I-frames, to see if they match up with one of the fields in the NDX file.


Does anyone know what happens on the server side when you try to fast-forward or skip? Does the client know enough to seek ahead to the right place? I can't imagine that it would read the whole file sequentially if you're skipping ahead at 20X.


On another front, has anyone made any progress in decoding the EPG (program guide) format, including the protocol required to request the guide from the Replay servers? I would love to be able to view and search the guide in various ways that aren't possible on the Replay box.


And what about the MyReplay commands to tell the box to record a specific show or delete a show?


----------



## Montezuma58

That may have been me. My Linksys 10/100 switch gets into some sort of funky state during sustained transfers. If I plug the pc and Replay into my firewall/router it works fine. When I replace the router with the Linksys it will work for a little while then it becomes increadibly slow.

Quote:

_Originally posted by RSaunders_
*I can't remember who asked why downloading was taking a long time. However, I found something to check. I moved my ReplayTV today, out of the computer office and into the basement where the kids can watch it. Now it is hooked up through my house hub, a hop down from the office hub. It was taking 6-7 seconds per dot to download. I almost died.

A little fault isolation showed the ReplayTV is a 100baseT device. Not 10/100 auto switching like most other NICs. The house hub (which just ties in the kids PC) was 10baseT only. This shows it is old and I am cheap. No elegant fallback - yikes. Just $30 later and have a nicer house hub and things are back to normal.


/Randy*


----------



## sex0r

Quote:

_Originally posted by Sharky_
*To help figure out the format of the NDX files, has anyone tried playing back one MPG file with the NDX file from another show through ReplayServer, to see what breaks? That would give a good indication of what the file's used for.


It might also be interesting to edit out a contiguous section of the 32-byte records from an NDX file, and see what happens. This could give an indication as to whether the offsets in the file are absolute or relative, for example. On one half-hour show I downloaded, the NDX file has 4136 records, plus a header record. Does it sound like that could be roughly the number of I-frames in the file?


If someone has access to an MPG stream decoder, it would be interesting to compute the byte offsets of the I-frames, to see if they match up with one of the fields in the NDX file.


Does anyone know what happens on the server side when you try to fast-forward or skip? Does the client know enough to seek ahead to the right place? I can't imagine that it would read the whole file sequentially if you're skipping ahead at 20X.


On another front, has anyone made any progress in decoding the EPG (program guide) format, including the protocol required to request the guide from the Replay servers? I would love to be able to view and search the guide in various ways that aren't possible on the Replay box.


And what about the MyReplay commands to tell the box to record a specific show or delete a show?*
4136 would be a very close approximation of I-frame offsets for about 30 minutes of Mpeg2.


----------



## ijprest

Quote:

_Originally posted by Sharky_
*And what about the MyReplay commands to tell the box to record a specific show or delete a show?*
This is underway. I've been looking at the MyReplayTV stuff (off and on) for the last few weeks as part of my plan to simulate the entire RNS server. Most of the MyReplayTV stuff is XML based, so it's pretty easy to decipher.


----------



## RSaunders

I've started a new thread to try and capture how the ReplayTV 4000 accesses the Internet and how to regulate that with your firewall. I'd sure several folks here know how to do that, but it seems off topic for "reverse engineering". Please visit at:
http://www.avsforum.com/avs-vb/showt...hreadid=107292 


Thanx. /Randy


----------



## nystratton

I have been palying around with .ndx stuff on my new 1.1 TB replay server (got to love low cost drives and a RAID card).


1) Commercial advanced works over replayserver

2) You can't play a show without a .ndx file

3) You can play a show with the wrong .ndx file but commercial advanced does not work

4) I can delete a .ndx file when I am playing a show wihout any problems.

5) I can crash my replay playing around with .ndx files


-Nathan


----------



## jtl

Quote:

_Originally posted by nystratton_

*I have been palying around with .ndx stuff on my new 1.1 TB replay server (got to love low cost drives and a RAID card).*
*
You may want to read http://www.avsforum.com/avs-vb/showt...hreadid=107023 
Quote:

1) Commercial advanced works over replayserver
Yes, that's (mostly?) controlled by flag 0x01
Quote:

2) You can't play a show without a .ndx file

3) You can play a show with the wrong .ndx file but commercial advanced does not work
How well does manual jumping work? (ie, quickstep button, or number+jump). I'd be very surprised if it worked well mixing a high-quality ndx file with a standard mpg or vice versa. If skipping works at all with mismatched files, I'd expect the autocommercial skip to kick in, but have no relation to where actual commercials are -- is that what you see, or does it not skip anything at all?
Quote:

4) I can delete a .ndx file when I am playing a show wihout any problems.
The full ndx file is transferred when you start playing -- they're small, about 240k for an hour show*


----------



## NoFreakinWay

What server are you using.. APache, Java, C++ ??

I lost the link and can't seem to find where those files are...



Could someone please post the current types and their location for me.

Thanks.


----------



## nystratton

I don't think there is a replay server in Java and the C version is now in Apache and you can get it from Dans page:

http://206.124.140.12/rtv/ 


Hope that helps.


-nathan


----------



## Axlrod

I've been fighting to get my 4080 to see my pc for a week.

Now that it does, I don't get any shows listed in the remote guide.

I have shows and NDX files in the server's directory, but nothing is shown.

Any help would be much appreciated.


Tanx


----------



## jtl

Quote:

_Originally posted by Axlrod_
*I've been fighting to get my 4080 to see my pc for a week.

Now that it does, I don't get any shows listed in the remote guide.

I have shows and NDX files in the server's directory, but nothing is shown.

Any help would be much appreciated.


Tanx*
You also need a matching guide.dat in the root of the ReplayServer tree. Note for Unix users, where case matters: ReplayPC creates "Guide.dat", but ReplayServer needs "guide.dat".


----------



## nystratton

I have 3 replay units that I use to grab video/watch video. I have been sucking lots and lots of video into my replay server (can't wait until I can edit .ndx and build a guide) and wanted to know what people are planing on doing with dup timestamps.


The timestaps are sec since Jan 1st 1970 and it looks like it is very easy to have files from different replays with the same timestampe. Should they be renamed to the next free sec, but if you did that would you need to hack the .ndx files?


Is the guide data built from the .ndx files or is all the guide info stored in the guide and the .ndx just for skip info? I.E. Can I just hack the guide or do I need to update the .ndx files if I rename?


-Nathan


----------



## dfrumin

Nathan,


Give me a couple more days and I'll build a "Guidebuilder". I'm at the point now where I can (manually) add/remove shows from a replaychannel in a guide file.


I've been tied up with some annoyances (real work, what can I say) but hope to figure out how to add/del channels. After that I'll finally be able to write the builder.


In the interim, the manual answer to your question is:


You can change the names of the files as long as you change the mpg/ndx to match and change the value in the guide.dat file as well.


My recommend for the short term is that you build multiple ReplayServers with apache and just copy whole chunks (guide + shows) at a time. The advantage is that when the guidesnagger/builder is done you can just point it at those interim servers and build the "main" server.


dan

Quote:

_Originally posted by nystratton_
*I have 3 replay units that I use to grab video/watch video. I have been sucking lots and lots of video into my replay server (can't wait until I can edit .ndx and build a guide) and wanted to know what people are planing on doing with dup timestamps.


The timestaps are sec since Jan 1st 1970 and it looks like it is very easy to have files from different replays with the same timestampe. Should they be renamed to the next free sec, but if you did that would you need to hack the .ndx files?


Is the guide data built from the .ndx files or is all the guide info stored in the guide and the .ndx just for skip info? I.E. Can I just hack the guide or do I need to update the .ndx files if I rename?


-Nathan*


----------



## q3ded

Ive opened up my database a bit on Planet Replay and have added XML-RPC services. Curretly I only offer 2, but can add more on the fly. You can find out more on my XML-RPC pages a quick rundown:


An XML-RPC request to search for "Will" looks like this:




planetreplay.SearchTitle



Will







And returns this:










result_number

1


title

Will & Grace


episode

Prison Blues


description



nick

q3ded


email

[email protected]


user_id

1


----------



## nystratton

With all this planet replay stuff, it is just going to cause them to modify their box to lock us out quicker. I just hope I can grab all my video and a old image before they are forced to change their OS.


-Nathan


----------



## Revwillie

I think replay already built some restrictions into the OS. I recorded about a minute of pay per view previews to use a test clip and the replay wouldn't let me send it. It said pay per view items could not be transferred over the internet.


----------



## honus87

They have said all along that macrovision and whatever-the-other-thing-is shows won't be allowed to be transfered.


----------



## jtl

Quote:

_Originally posted by Revwillie_
*I think replay already built some restrictions into the OS. I recorded about a minute of pay per view previews to use a test clip and the replay wouldn't let me send it. It said pay per view items could not be transferred over the internet.*
The 'no auto commercial skip for first 2 and last 2 minutes of the show' restriction looks artificial, too. The ndx files show that sometimes at lesat the RTV recognizes commercials during those periods.


----------



## Jah-Wren Ryel

I suspect that the limits on commercial skip have more to do with reducing errors than anything else. Lots of shows start with a teaser opener before the credits that is so short that it could easily be confused with real commercials by any heuristic short of a real human. Same way with the credits and "preview of next weeks episode" that a lot of shows do.


----------



## RandyRazor

Quote:

_Originally posted by nkopas_
*Well, yesterday I found out just how cool my Replay4K is. I've been watching this thread closely and was really impressed by the progress. Until yesterday I never had a reason to give any of these tools a try. Here's what I did:


1. Downloaded latest version of ReplayPC and GuideParser.


2. Copied a bunch of episodes of "Enterprise" to my PC.


3. Compressed them to MPEG1 with TMPGenc.

http://www.tmpgenc.com/e_main.html 


4. Performed "manual commercial advance" with Womble.

http://www.womble.com/index.shtml 


5. Burned them to VCDs.


6. Gave the discs to my dad so he could catch up on the series before new episodes started. He just popped them in his DVD player and they worked!


I went through the above process with almost no trouble at all. I've said it before and I'll say it again. Man, I love technology! Keep it up developers, this stuff is great!*
How'd you get TMPEGEnc to accept the MPG files you grabbed from your ReplayTV? When I try to choose one of these files from TMPEGEnc, I get the following error:


"filename.mpg" can not open, or unsupported.


I'm using ReplayPC v0.3 and TMPEGEnc 2.02 (I've also tried TMPEGEnc v2.50 with the same results)


Randy.


----------



## Lee Thompson

What's New:


More of the structures are known.

Wrote an int64 Big->Small Endian converter.

UNIX/WIN32 stuff sorted out. (Thanks Todd!)

Cleaned up some code.

Dependency on stdafx.h removed.

Improved Word Wrapper.

Extended ASCII characters are now translated.

Fixed some bugs.



For help just run guideparser in a DOS/Command Window without any parameters.


Includes Win32 Binary and Source

Download GuideParser .09 or download from this forum.

 

guideparser09.zip 81.236328125k . file


----------



## honus87

* new item in options menu: "Set default download directory..." Sets the directory to use as the default directory for downloading


* new item in options menu: "Suggest timestamp as name" suggests the timestamp instead of "showname_episode title"


* new item in options menu: "Also get .ndx file"

If set, the ndx file for the selected mpg file will also be downloaded. The same filename will be used with any extension replaced with ndx


* new item in options menu: "Save without prompting"

If set, files will be downloaded to the default directory without prompting. Their name will either be the "friendly" default or the timestamp if "Suggest timestamp as name" is set


(all the new options are saved)


* new feature: Can now select multiple files to download. "Save without prompting" must be on for this to work (I'll probably change this soon, and have it prompt for a directory). You can select things other than shows and they will be ignored. In other words, if you select your Replay, a channel, and a show, only the show will be downloaded.


* new feature: "Get file" button only enabled when a show is selected, or when more than one thing is selected and "Save without prompting" is on. Note that if more than one row is selected and none are files, the button will still be enabled but nothing will happen when you click on it


* new menu: "Edit"


* new item in Edit menu: "Expand completely"

expands the currently selected node completely (i.e. opens all levels under it).


* new item in Edit menu: "Expand all"

completely expands the entire tree


* new item in File menu: "Save Replay"

Saves the currently selected Replay. Will prompt for a directory unless "Save without prompting" is on, in which case it uses the default directory. This includes the guide data (as guide.dat), all the mpg files that appear in the guide and all the ndx files that go with them. It does not save the live buffer. It does not strip the header off of the guide.dat (which I don't plan on changing).

http://www.forbesfield.com/replayer.jar 


If you managed to get v0.6 in the minutes between when I put it up and when I found a couple of bugs, you should grab v0.6a.


Bug reports, questions, comments to [email protected] . Please mention which version you're using.


-H


[edit to fix the broken link]


----------



## aslagle

 http://www.forbesfield.com/replayer.jar


----------



## MANowell

Just tried the new replayer.jar, and it's no-go for me.


I have a clean WinXP Pro machine with j2re-1_3_1_02-win.exe from Sun's site installed. The previous version of replayer.jar worked *most* of the time, but I had trouble with it too.


When I double-click on replayer.jar now, after a pause it starts up minimized in the upper left corner of my primary monitor. If I drag the frame to expand it, there are no menu options or devices shown.


Anyone else getting this?


Oh, the command-line replaypc.exe v0.3 is working OK, so I do _know_ the ReplayTV unit is there!


----------



## honus87

Most likely an exception is getting thrown somewhere. If you could start it at the command line and report any text that gets output that would be helpful.


Just bring up a command prompt, cd to the directory with replayer.jar in it and type "java -jar replayer.jar"


Thanks.

-Tom


----------



## MANowell

Status/mode of .mpg files pulled off ReplayTV 4K?


I want to process these files onto DVD disks for personal archiving. Do I want the files "cleaned up" or "raw"? I gather "raw"?


Also, what package(s) are people using for making the DVDs? About all that I _really_ want to do is remove the commercials from episodes and trim the excess from the start and the end....


I have a Pioneer DVR-A03 drive, AMD Athalon XP 1700 processor, and 512MB RAM. I tried to put a one-hour (2.4GB) ReplayTV .mpg file on disc last night using the Sonic MyDVD 2.3 that came with the drive. It said the .mpg file was in the wrong format and started "transcoding" it. I let it run about 11 hours, and it processed only 19 minutes of data. I cancelled the project.


----------



## MANowell

Ah!


E:\\ReplayPC>java -jar replayer.jar

java.lang.NullPointerException

at java.io.File.(Unknown Source)

at replayer.Downloader$1.loadFromProp(Downloader.java:255)

at replayer.Option.loadOptions(Option.java:83)

at replayer.Downloader.init(Downloader.java:646)

at replayer.Downloader.(Downloader.java:278)

at replayer.Downloader.main(Downloader.java:724)

Quote:

_Originally posted by honus87_
*Most likely an exception is getting thrown somewhere. If you could start it at the command line and report any text that gets output that would be helpful.


Just bring up a command prompt, cd to the directory with replayer.jar in it and type "java -jar replayer.jar"


Thanks.

-Tom*


----------



## Lee Thompson

Quote:

_Originally posted by MANowell_
*Status/mode of .mpg files pulled off ReplayTV 4K?


I want to process these files onto DVD disks for personal archiving. Do I want the files "cleaned up" or "raw"? I gather "raw"?


Also, what package(s) are people using for making the DVDs? About all that I really want to do is remove the commercials from episodes and trim the excess from the start and the end....


I have a Pioneer DVR-A03 drive, AMD Athalon XP 1700 processor, and 512MB RAM. I tried to put a one-hour (2.4GB) ReplayTV .mpg file on disc last night using the Sonic MyDVD 2.3 that came with the drive. It said the .mpg file was in the wrong format and started "transcoding" it. I let it run about 11 hours, and it processed only 19 minutes of data. I cancelled the project.*
Sonic's DVDIt! worked just fine for me. Please note that medium and high recording modes are 720x480 and 'standard' is 360x480. As a result transcoding will likely be required for standard mode video.


----------



## nkopas

Quote:

_Originally posted by RandyRazor_
*


How'd you get TMPEGEnc to accept the MPG files you grabbed from your ReplayTV? When I try to choose one of these files from TMPEGEnc, I get the following error:


"filename.mpg" can not open, or unsupported.


I'm using ReplayPC v0.3 and TMPEGEnc 2.02 (I've also tried TMPEGEnc v2.50 with the same results)


Randy.*
You know, it just works for me. I didn't do anything special.


All of my Replay shows are recoded at medium quality, I'm running WindowsME with all the latest updates and I have PowerDVD installed.


Do you have any problems viewing the MPG files from your Replay with Windows Media Player?


----------



## MANowell

You guys must LIVE up here, I never dreamed that I'd get responses that fast!


Yeah, I generally grab 70% of my stuff in high mode and the other 30% in medium. What release of DVDit! do you use? Does it do the "transcoding", and is it time-consuming? Thanks


Quote:

_Originally posted by Lee Thompson_
*


Sonic's DVDIt! worked just fine for me. Please note that medium and high recording modes are 720x480 and 'standard' is 360x480. As a result transcoding will likely be required for standard mode video.*


----------



## honus87

Ok, I think I fixed that bug grab version 0.6b http://www.forbesfield.com/replayer.jar 


Let me know how it goes.


-H


----------



## Lee Thompson

Quote:

_Originally posted by MANowell_
*You guys must LIVE up here, I never dreamed that I'd get responses that fast!


Yeah, I generally grab 70% of my stuff in high mode and the other 30% in medium. What release of DVDit! do you use? Does it do the "transcoding", and is it time-consuming? Thanks


*
I'm using .. 2.3 I believe (Professional Edition); and the only time consuming part is conversion of the audio to Dolby Digital.


----------



## FlipFlop

TMPGEnc doesn't natively support MPEG2 formats, so you need some other codec installed. There is one listed at vcdhelp.com in their instructions, but I have NOT had good success with it.


I have found that the $20 Elecard player (free demo available) supplies a codec that TMPGenc will use, and I have had good success with that one (on RTV3000 files). See http://www.elecard.com 


I've also found that Flaskmpeg handles "corrupt" replaytv files better than tmpgenc.


----------



## MANowell

It came up OK, grabbing two shows with one click now!

Quote:

_Originally posted by honus87_
*Ok, I think I fixed that bug grab version 0.6b http://www.forbesfield.com/replayer.jar 


Let me know how it goes.


-H*


----------



## benzene

I have been trying to get shows from my replay to Divx MPEG 4s. There are two ways which I've tried to do this:


1) With Flask, I can transcode directly to DIvx, but the audio is completely out of sync. Replay records audio at 48Kbps and if I run Virtual Dub to convert the audio to 44.1Kbps it seems to almost get it right (less than 1% off). But then finally I have to run AVI info to change the frame rate from 29.97 to something like 29.95 and then audio and video are in sync (but if I then use tmpgenc to burn DVD or SVCD, it will be out of sync again, but that's another email).


2) If I use TMPGEnc to transcode to Mpeg 1, then Virtual Dub to deinterlace, convert the audio, and transcode to DivX, this seems to work, but takes roughly twice as long. And there's the double transcoding that I assume is losing some quality.


What is everyone else doing?


----------



## jcurtice

I have my Replay 4080 hooked into a Linksys 10/100 hub. The hub is uplinked to a Linksys 10/100 switch which my main computer is also connected to. The switch is uplinked to my cable modem. All IP addresses are set via DHCP.


The problem I'm experiencing is that when I try to transfer shows to my PC, I'm only getting about 14K a second. It appears that all traffic between my PC and ReplayTV is going through the cable modem. Does anyone know how I can get them talking to each other without going through the cable modem?


----------



## Montezuma58

Quote:

_Originally posted by jcurtice_
*I have my Replay 4080 hooked into a Linksys 10/100 hub. The hub is uplinked to a Linksys 10/100 switch which my main computer is also connected to. The switch is uplinked to my cable modem. All IP addresses are set via DHCP.
*
I've had a similar problem with a linksys 10/100 eight port switch( model # EZXS88W Version 2.0). I did not have any problems with the switch under light loads but once I started transfering large file from the replay I started having problems. Basically whenever ther Replay and PC were communicating through the linksys, transfers would work for a little while then all traffic through the linksys would become extremely slow. When the PC and replay are connected directly to the switch in my router/firewall everything works fine.


I suggest eliminating the switch from your network to see if its the problem.


----------



## Montezuma58

Quote:

_Originally posted by jcurtice_
*I have my Replay 4080 hooked into a Linksys 10/100 hub. The hub is uplinked to a Linksys 10/100 switch which my main computer is also connected to. The switch is uplinked to my cable modem. All IP addresses are set via DHCP.
*
I've had a similar problem with a linksys 10/100 eight port switch( model # EZXS88W Version 2.0). I did not have any problems with the switch under light loads but once I started transfering large file from the replay I started having problems. Basically whenever ther Replay and PC were communicating through the linksys, transfers would work for a little while then all traffic through the linksys would become extremely slow. When the PC and replay are connected directly to the switch in my router/firewall everything works fine.


I suggest eliminating the switch from your network to see if its the problem.


----------



## Dallben

Quote:

_Originally posted by jcurtice_
*I have my Replay 4080 hooked into a Linksys 10/100 hub. The hub is uplinked to a Linksys 10/100 switch which my main computer is also connected to. The switch is uplinked to my cable modem. All IP addresses are set via DHCP.


The problem I'm experiencing is that when I try to transfer shows to my PC, I'm only getting about 14K a second. It appears that all traffic between my PC and ReplayTV is going through the cable modem. Does anyone know how I can get them talking to each other without going through the cable modem?*
If you're using actual IP addresses (assigned from your cable provider) and you're trying to communicate with them, the file from the replay is actually going out your cable modem, to their router, and back to you. What you would need to have is a router (a linux box or a cable modem router) that assigns non-routable IP's (192.168.X.X, etc etc) this way, everything will only hit _your_ internal router, and should stay at 10 or 100MB.


----------



## RandyRazor

Quote:

_Originally posted by nkopas_
*


You know, it just works for me. I didn't do anything special.


All of my Replay shows are recoded at medium quality, I'm running WindowsME with all the latest updates and I have PowerDVD installed.


Do you have any problems viewing the MPG files from your Replay with Windows Media Player?*
No problems at all. In fact, I create MPEG-2 files with my All-In-Wonder Radeon and use TMPEGEnc to re-encode them all the time. I can edit the ReplayTV files with M2-Edit Pro without issues, but TMPEGEnc doesn't like them.


Thanks for your help, anyway.


----------



## iStymie

I have successfully transferred "medium quality" videos from the RTV 4K to my PC using the ReplayPC app and re-encoded them to sub 1Gig DivX 4.12 .avi files with Mp3 sound. Here is what you need to accomplish this:


You can find all of these files (or links to them) at http://www.divx-digest.com/software/index.html 


I'm using Win2K, I don't think this will work on XP or 98. 98 wont support the 2gig+ files anyway.


1.) AviSynth plug in (allows you to frameserve MPEG2 video to Virtual dub)


2.) Virtual Dub editor


3.) Radium MP3 codec (MS codec shipped with WMP8 wont work!)


4.) DivX 4.12 bundle


5.) Elecard MPEG-2 decoder (or possibly another MPEG decoder setup, I use Elecard registered version)..


6.) Optional DirectX Media SDK for GraphEdt.exe. This is optional and can be used to extract audio when it wont playback any other way.


Steps: (Install all required items above first)



1.) pull MPEG off of Replay with ReplayPC app. I use the -er option and it seems fine.


2.) Create an input file for AviSynth. This file must end in .avs and should contain only DirectShowSource("replaytv.mpg") make sure to hit ENTER so there is a carriage return after the command.


3.) Open VirtualDub. Select the .avs file. This will pop two empty frames up in VirualDub. If you dont see this, then the Replay .mpg is corrupt or your elecard decoder isnt installed right.


4.) Video: In VirtualDub, select video menu. Choose compression, select the DivX codec and choose properties. Set the encode to "Slowest" and 1 pass encoding. I use about 800Kb/s, but a couple of my movies have turned out blocky. If you aren't planning on burning the movie to a CD-R, you might want to try a number over 1000.


*** NOTE. If you want, you can also insert filters to crop the video or clean it up. You'll need to choose "Full Processing Mode" instead of "Fast recompress" for the filters to work.


You can use "Select Range" to cut off lead in and trail out parts of recorded video. Be careful seeking on the file, it tends to lock up after a few seeks or if you jiggle back and forth too much.


5.) Audio: In VirtualDub, select audio menu. Select "Full Processing Mode" and then choose "Conversion". Set the sample rate to 44100Hz and choose "High Quality" leave everything else. Click Ok. Select "Compression" and choose the second MPEG Layer 3 codec in the list (the first is Microsoft's version and it wont work). Check on "show all formats" and then choose 44100Hz, stereo, 96Kb/s as the audio format. If you cant find 96Kb/s, you are using the wrong codec. Click ok to exit compression dialog. Optionally choose Volume and increase the volume as desired.


6.) In VirtualDub select File->Save As AVI. Give 'er an .avi filename and let it rip. On my overclocked Athlon XP1900 it takes about 2.5 hours to do a typical 120 minute movie.


My movies are turning out anywhere from 600 to 700 megs. I'm cosidering using the 2:1 reduction filter and then increasing the DivX bit rate beyond 1000. It seems DivX doesn't really make use of the 720x480 resolution and that 360x240 with a higher encoding rate would render better results. I play back my movies using a PC which is connected thru a RGB->YPrPb converter to a HD input on my TV. Aside from some MPEG artifacts, the picture is good and the sound is fine (only stereo, no 5.1 of course). I can tell that choosing the right encoding rate in DivX is going to take some skill. Too low, and you get really blocky video, too high and the movie will be too large.


I have found that a few shows get "playback stopped" errors or seem to be recorded using weird audio rate settings. You always want to test the MPEG file end to end to make sure it is Ok before you try to encode (saves a lot of wasted CPU time). My replay tends to chop off the end of some shows. A couple of shows have bad MPEG audio. For these, you need to manually strip off the AC3 audio and reencode it to a .WAV see http://nickyguides.digital-digest.com/index.htm for help doing this and a ton of other editing tasks. Once you have the AC3 stripped, you can manually convert it to a MP3 WAV file and then merge the .WAV back with the DivX video using the "Wav audio" option in VirtualDub.


Let me know if you have any success with this and/or if you are also getting problems with chopped files and bad audio rates.


Thanks.


----------



## Rich A

Quote:

_Originally posted by Lee Thompson_
*


Sonic's DVDIt! worked just fine for me. Please note that medium and high recording modes are 720x480 and 'standard' is 360x480. As a result transcoding will likely be required for standard mode video.*
Actually the standard is 352x480 which is a valid (1/2 D1) frame size for DVD. I've been using it from way back un-altered, when we were "extracting" ReplayTV mpegs from our 2000 and 3000 series units.


----------



## toots

I just gotta say:


I remember the original Replay drive hacking project. It was exciting, fun, and had a thread that grew almost as fast as this one.


But, I'm not so much in the hacking spirit anymore, so I'm hanging back.


I have to say, in reading this thread, as well as trying out some of the fruits of all this hacking, I am feeling significantly outclassed. No, I am not fishing for compliments. I think this whole content yank/serve project here is fantastic, and I think you guys are all doing a great job.


It really is cool to have some really good hackers like you guys out there working out all the tough details for the rest of us.


----------



## KenL

Quote:

_Originally posted by toots_
*...But, I'm not so much in the hacking spirit anymore, so I'm hanging back.


I have to say, in reading this thread, as well as trying out some of the fruits of all this hacking, I am feeling significantly outclassed. No, I am not fishing for compliments. I think this whole content yank/serve project here is fantastic, and I think you guys are all doing a great job...*
Not that KenL is fishing for a beheading here or anything... but toots I think you are right up there with the best of them. And possibly what you are up to currently is more important than hacking replays right now (at least to me) but I do have to concur 100%. There is some seriously cool stuff going on here!!


It's a rather exciting time to own a 4000. I don't remember this level of Replay excitement since the "60 hour upgrade hack for the brave" or when extract_rtv was reaching some refinement. The 4K is a cool product and our hackers are the best d*** jerks around!


----------



## abaduck

Honus87:


your latest 0.6b doesn't fix the multiple-download issue on this system (stock Wink2k SP1) - the 'get file' button is greyed-out if you select more than one file.


However, it does partly fix something you didn't mention - 0.6a gave me an exception when trying to set a default directory, 0.6b doesn't do this - but it also doesn't save the default directory! When you hit 'set directory' nothing happens and you have to cancel out.


Also, I find that it offers a good default filename (of the form 'show_episodetitle.mpg') when you first hit 'get file', but if you change directory at this dialogue the suggested default is thrown away and replaced by the name of the directory you change to!


Cheers


Mike


----------



## ChocoboLee

abaduck, what you see is a java bug.

java's standard file dialog will replace the filename with a directory if you change directory. it's probably not that easy to fix.


Honus87, great job on the replayer. It's very useful!


----------



## honus87

Quote:

_Originally posted by abaduck_
*Honus87:


your latest 0.6b doesn't fix the multiple-download issue on this system (stock Wink2k SP1) - the 'get file' button is greyed-out if you select more than one file.*
I'll look at it again but it was working for me. Make sure you have "Save without prompting" checked in the options menu.

Quote:

*


However, it does partly fix something you didn't mention - 0.6a gave me an exception when trying to set a default directory, 0.6b doesn't do this - but it also doesn't save the default directory! When you hit 'set directory' nothing happens and you have to cancel out.
*
The way the Java file dialog works you have to have the current directory be the *parent* of the directory you want to set, with the directory you want highlighted. I found myself always double clicking the directory I wanted, putting myself inside of it, and then I couldn't select it.

Quote:

*but if you change directory at this dialogue the suggested default is thrown away and replaced by the name of the directory you change to!
*
As ChocoboLee points out, it is a Java bug. Getting Sun to admit it without just closing the bug report took at least 3 tries, but it is finally open as a real bug. Looks like they aren't going to fix it until somewhere in the 1.4 release.


Thanks for the praise, ChocoboLee


----------



## dkan24

another little replayer bug I seem to find is when you are going to save something. When the save as dialog is up, if you bring up another program, the save as dialog box disappears. Then the whole program freezes and I have to ctrl+alt+delete out of it.


other than that, I love this program! Great work, Honus87 and everyone else!


----------



## honus87

This also seems to be a Java bug. I've had this happen and found that the dialog was there it just wasn't in the task bar list. I closed all my windows then reopend the java app and the file dialog was there it had just been hidden under other stuff. The reason the main program seems frozen is because the file dialog is modal and it can't do anything until you clear the dialog.


Sorry, editing to clear things up. I "minimized" all my windows (not closed) and then "restored" the main window of Replayer.


-Tom


----------



## abaduck

Quote:

_Originally posted by honus87_
*


I'll look at it again but it was working for me. Make sure you have "Save without prompting" checked in the options menu.*
Doh! OK that works now... wish I figured that before individually selecting and saving seven episodes of Babylon 5

Quote:

_Originally posted by honus87_
*


The way the Java file dialog works you have to have the current directory be the parent of the directory you want to set, with the directory you want highlighted. I found myself always double clicking the directory I wanted, putting myself inside of it, and then I couldn't select it.
*
Doh! Again! OK that works too.




Actually what this needs is someone to WTFM (write the...) - no promises, I've been swamped with work otherwise I'd have been hacking myself but I'll see what I can do.


Agreed kudos to Honus et. al., a fine hack!


----------



## dfrumin

Toots,


Speaking as a G2H (Gen2 RTV hacker, hehe) I'll concur with KenL that this work would not be happening if it wasn't for you, FlipFlop and the other Gen1 hackers. I remember the first time I upgraded my 2010 from a 12GB drive and I was the happiest camper alive.


If it wasn't for the work of the G1Hs, many of us would probably have shifted over to Tivo before the 4k even came out.


And of course, kudos to all the folks who try out all the stuff we put out along the way to stability.


Anyway, my pleasure and honor to be part of this community.


-dan

Quote:

_Originally posted by toots_
*I just gotta say:


I remember the original Replay drive hacking project. It was exciting, fun, and had a thread that grew almost as fast as this one.


But, I'm not so much in the hacking spirit anymore, so I'm hanging back.


I have to say, in reading this thread, as well as trying out some of the fruits of all this hacking, I am feeling significantly outclassed. No, I am not fishing for compliments. I think this whole content yank/serve project here is fantastic, and I think you guys are all doing a great job.


It really is cool to have some really good hackers like you guys out there working out all the tough details for the rest of us.*


----------



## jtl

Has anyone pulled a drive from the 4k and gone trawling through the system partition looking for the magic HTTP URLs? I'm curious whether there are any httpfs- commands we don't know about and even more so whether there are any other whole families.


----------



## jtl

Has anyone pulled a drive from the 4k and gone trawling through the system partition looking for the magic HTTP URLs? I'm curious whether there are any httpfs- commands we don't know about and even more so whether there are any other whole families.


(apoligies if this shows up twice yet again. I can't seem to post reliably with Mozilla, and I keep forgetting that, but sometimes even if I double check, a message I thought was lost turns up again later)


----------



## Dallben

Quote:

_Originally posted by jtl_
*Has anyone pulled a drive from the 4k and gone trawling through the system partition looking for the magic HTTP URLs? I'm curious whether there are any httpfs- commands we don't know about and even more so whether there are any other whole families.


(apoligies if this shows up twice yet again. I can't seem to post reliably with Mozilla, and I keep forgetting that, but sometimes even if I double check, a message I thought was lost turns up again later)*
Yep, I've done it. I think Dan may have done it... I might be willing to bet that Toots, Flipflop, & KenL have done it, as well. Pretty much everything that I know is in this thread.


If you happen to double post, you can click on the edit button and delete it.


----------



## NoFreakinWay

Dallben,


Is there any place that we can find a summary of the commands that we know of?

Maybe a sample and explanation of what they do?


I'm working on a VB version of the ReplayServer and need to find out what commands are available.


Thanks


----------



## toots

Quote:

_Originally posted by NoFreakinWay_
*Dallben,


Is there any place that we can find a summary of the commands that we know of?

Maybe a sample and explanation of what they do?


I'm working on a VB version of the ReplayServer and need to find out what commands are available.


Thanks*
When I did it, I think I was using some rather limited search terms. I found a few (a very few) urls laying around in some binary images. I never did get them to do anything terribly interesting for me, and since then, I haven't been back to see whether or not they were ultimately useful in the hacking project.


I did post a couple of them somewhere in here, though. All I managed to do with them was crash one of my machines a couple of times.


----------



## RSaunders

Quote:

_Originally posted by benzene_
*(snip)

... But then finally I have to run AVI info to change the frame rate from 29.97 to something like 29.95 and then audio and video are in sync (but if I then use tmpgenc to burn DVD or SVCD, it will be out of sync again, but that's another email).


What is everyone else doing?*
I'm doing things with different tools, because I have a Mac .... .


However, I notice one big difference, in the magnitude of the sync problem. If I take a 30 minute show recorded at medium and demux the streams the audio stream is 30:01 . The same show's video stream is 37:12 . It is 66,890 frames, which is almost exactly 29.97 fps. This is a 23% video stretch, not the .2-.3% other folks have observed. What sort of problem should I look for??


/Randy


----------



## abaduck

Another replayer bug report... I've copied several shows of various sizes without problems. However last night I tried to copy the biggest file I've so far attempted - Babylon 5 movie 'A call to arms', 2 hrs high quality around 4.5GB. Didn't work. I selected the file, hit 'get file', accepted the default filename (Babylon 5_A Call to Arms.mpg) and got an hourglass cursor on the replayer application. In the directory, a file was created called 'Babylon 5' - no extension - 0KB in size. For the next 90mins (this is a 10MB segment), replayer remained with the hourglass cursor, but NO network traffic showed. At the end of 90mins we were left with the 0KB file, the timestamp on this file reflected the time at the end of the 90min 'pseudo-copy'.


Tried it three times, same results.


At no time was the download progress indicator displayed.


I subsequently copied this 4.5GB file with no problems using mlinehans replaypc text-mode utility. I'm guessing we might have hit some kind of Java 4GB limit? If so it will need some thought, it's a significant problem IMHO. I'd look at it myself but my Java *sucks*. Biggest file I successfully transferred with replayer was 2.5GB.


Mike


----------



## honus87

What version of Replayer - if you're getting the hourglass then it is probably at least v0.6. Did you start it from the command line? If so was there any text output?


----------



## nystratton

Anyone get a unix version working?


Also how is the guide stuff going?


-Nathan


----------



## jtl

Quote:

_Originally posted by nystratton_
*Anyone get a unix version working?
*
I have a Unix version of RTVNotify; I sent patches to the author but never heard back from him.


I'm not posting from the machine with the patch, so I can't attach it now; send me private email (or replaypc devel list, if you don't still have my address) and I'll send it to you.


What is "guide update"?


----------



## abaduck

It's 0.6b. Started from command line, only output on the line was 'Cp1252' which I think I get every time I start a transfer. Willing to test or try stuff this weekend!


Mike


----------



## BarryLawton

Would it be possible for us to each set up a daily batch job to show and post which shows we have recorded to assist in the trading process? I know I got replaypc.exe to show me a legible listing of what shows I had. Can i still do that? Now when I do it just get lots of beeps. If that is possible I could easily write a quick job to dump guide to a website for easy viewing by others.


Anyone interested in this? Am i Crazy?


Barry


----------



## nystratton

Quote:

_Originally posted by jtl_
*

I have a Unix version of RTVNotify; I sent patches to the author but never heard back from him.


I'm not posting from the machine with the patch, so I can't attach it now; send me private email (or replaypc devel list, if you don't still have my address) and I'll send it to you.


What is "guide update"?*
Several people are working on the ability to build a new guide.dat and edit show information in a guide.dat file. Just wanted to know if there is anything new in that area.


-nathan


----------



## nystratton

I have built a 1.1 TB replayserver and want to throw all my video on it. I just dumped a bunch of video onto my new replayserver and can watch the video just fine, but I want to be able to edit the video and put it back on the server.


When I put a edited clip on the replayserver and tried to pay it I crash my repaly 4k. Has anyone been able to get a 4K to paly a edited video or a mpg that was not created on a 4k via replayserver?


----------



## Jah-Wren Ryel

Quote:

_Originally posted by NoFreakinWay_
*Dallben,


Is there any place that we can find a summary of the commands that we know of?

Maybe a sample and explanation of what they do?
*
The web-server, and its http-fs implementation that the replay is running are licensed from another company. When people first started posting the http headers they were getting back from the replay's web server it identified it self as something vaguely like "urbania" (search through early posts to this thread to find it). With the server's name, you can do a google search and find the company that SB is licensing it from, they may have online documentation or something useful regarding the product itself there - I never got past just looking at their home page.


----------



## mrwilson

For those of you having trouble using MyDVD and DVDitPE, try Ulead's DVD Movie Factory. They have a 15 day trial on their web site. You can even use their capture tool to import mpegs and frame edit the files.


----------



## Dallben

Quote:

_Originally posted by NoFreakinWay_
*Dallben,


Is there any place that we can find a summary of the commands that we know of?

Maybe a sample and explanation of what they do?


I'm working on a VB version of the ReplayServer and need to find out what commands are available.


Thanks*
Really, the easiest way to get a sample of what the syntax looks like is to look through this thread... here's a list of what I think works... as for what they do, it's pretty self explainatory.


httpfs-ls, httpfs-fstat, httpfs-readfile, httpfs-create, httpfs-mkdir, httpfs-rm, httpfs-mv, httpfs-cp, httpfs-volinfo


now some of these I can't seem to figure out the syntax to, but if you get a response back of "8082000a" then you got the syntax wrong. "80820024" means that the request needed to have the authorization string, or the directory/file isn't found.


Oh, bummer... went to sepll check and I got a "Due to the current advertising climate, SpellChecker.net no longer offers a banner supported service. Webmasters: click here to sign up for the paid version of the SpellChecker.net system." message. oh well... any spelling mistakes are my own, I guess.


----------



## Dallben

Quote:

_Originally posted by Jah-Wren Ryel_
*


The web-server, and its http-fs implementation that the replay is running are licensed from another company. When people first started posting the http headers they were getting back from the replay's web server it identified it self as something vaguely like "urbania" (search through early posts to this thread to find it). With the server's name, you can do a google search and find the company that SB is licensing it from, they may have online documentation or something useful regarding the product itself there - I never got past just looking at their home page.*
The webserver is Virata EmWeb (Embedded Web Server), they can be found at http://www.emweb.com however, in order to look at anything other than a white paper for the web server, you need to have an NDA with them. I've already submitted for one of these, as it looks like I might be able to use this in another project I'm working on, but I unfortunately don't know what I'll be able to share with everyone, as I have not yet seen the NDA.


----------



## Griffon

Quote:

_Originally posted by BarryLawton_
*Would it be possible for us to each set up a daily batch job to show and post which shows we have recorded to assist in the trading process? I know I got replaypc.exe to show me a legible listing of what shows I had. Can i still do that? Now when I do it just get lots of beeps. If that is possible I could easily write a quick job to dump guide to a website for easy viewing by others.


Anyone interested in this? Am i Crazy?


Barry*
This has allready been done at Replayplanet ( www.replayplanet.com ). Very cool place with good folks, can be a real life saver.


----------



## Robbo

Quote:

_Originally posted by Griffon_

*


This has allready been done at Replayplanet ( www.replayplanet.com ). *
*


Umm, that's PlanetReplay ( www.planetreplay.com ).*


----------



## Griffon

Quote:

_Originally posted by Robbo_
*



Umm, that's PlanetReplay ( www.planetreplay.com ).*
What I get for posting links from memory


----------



## Dallben

How's the work progressing on the guide?


----------



## Lee Thompson

Quote:

_Originally posted by Dallben_
*How's the work progressing on the guide?*
I've been a little pre-occupied lately since the place where I work is being shutdown  - however I'm picking up the pieces and will be able to resume guide parse work this week.


----------



## Lee Thompson

Quote:

_Originally posted by nystratton_
*I have built a 1.1 TB replayserver and want to throw all my video on it. I just dumped a bunch of video onto my new replayserver and can watch the video just fine, but I want to be able to edit the video and put it back on the server.


When I put a edited clip on the replayserver and tried to pay it I crash my repaly 4k. Has anyone been able to get a 4K to paly a edited video or a mpg that was not created on a 4k via replayserver?*
The guide data file would need to be updated for the ReplayShow and the .ndx file will likely need to be rebuilt as well.


----------



## KenL

Quote:

_Originally posted by Griffon_
*


What I get for posting links from memory *
Do we see just a glimpse of Griffon's memory in that little Freudian reversal? I just mean I wonder if we can stream " her " high quality _personal_ video's to our 4K's?? Griffon you tried this? 


http://www.replayplanet.com/Replay%2...s/balloon2.gif 
http://www.replayplanet.com/Replay%2...s/msreplay.jpg


----------



## jtl

Quote:

_Originally posted by Lee Thompson_
*


The guide data file would need to be updated for the ReplayShow and the .ndx file will likely need to be rebuilt as well.*
The guide data doesn't appear to be crucial -- renaming files so that one replay-recorded show is served up under the name of another, it can play.


I can make ndx files from mpeg files multiplexed the same way as RTV's. I can't find anything else that mulitplexes anything *close* to the RTV way.


See http://sourceforge.net/mailarchive/f...&forum_id=2752 for what I know on the subject so far.


(sorry for taking the discussion elsewhere, but writing long messages is much more convenient in my mail client + editor than in this little text box)


----------



## Griffon




> _Originally posted by KenL_
> 
> *Do we see just a glimpse of Griffon's memory in that little Freudian reversal? I just mean I wonder if we can stream " her " high quality personal video's to our 4K's?? Griffon you tried this?
> 
> 
> 
> *snort* Oddly enough I was checking my received shows (why doesnâ€™t received shows show up in the all, or give you message icon in the guide? Pain to know when something comes in) and somebody I didnâ€™t know was trying to send me something marked Xxx. I didn't think my wife would approve though . But then I guess I'm just projecting based on your choice of graphic .*


----------



## KenL

Quote:

_Originally posted by Griffon_
**snort* Oddly enough I was checking my received shows (why doesnâ€™t received shows show up in the all, or give you message icon in the guide? Pain to know when something comes in) and somebody I didnâ€™t know was trying to send me something marked Xxx. I didn't think my wife would approve though . But then I guess I'm just projecting based on your choice of graphic .*
My choice of graphic?? I believe that one is on the front page of the site YOU were directing everyone to (?) (and from memory no less) (?)


Well it's simple enough... just rename the folder "WWF Smackdown" and rename the vid. segments appropriately. She'll never look in there??


Not that I've tried that one...


----------



## ProLogic

Why is the audio different on each file I extract with ReplayPC or Replayer.


44100 Hz, 16 Bit, Stereo, Layer 1, Bit Rate 352 kbps

32000 Hz, 16 Bit Dual Channel, Layer 1, 256 kbps

32000 Hz, 16 Bit, Stereo, Layer 1, 448 kbps

32000 Hz, 16 Bit, Mono, Layer 1, 0 kbps

32000 Hz, 16 Bit, Stereo, Layer 1, 128 kbps

3 files @ 48000 Hz, 16 Bit, Stereo, Layer 2, 224 kbps (DVD ready!)

44100 Hz, 16 Bit, Dual Channel, Layer 1, 352 kbps

32000 Hz, 16 Bit, Dual channel, Layer 1, 160 kbps

48000 Hz, 16 Bit, Stereo, Layer 1, 320 kbps

48000 Hz, 16 Bit, Dual Channel, Layer 1, 224 kbps

32000 Hz, 16 Bit, Dual Channel, Layer 1, 32 kbps

48000 Hz, 16 Bit, Mono, Layer 1, 32 kbps


This info was taken from Ulead Video ToolBox from Ulead DVD MovieFactory on WinXP Pro. Does anyone know why they are all so different, except for the 3 that came out the same?


How can I fix them? I wouldn't mind makin a few DVD-RWs to watch on my notebook...


----------



## mrwilson

I'm having a similar problem. I recorded B5: Legend of the Rangers in HQ. Its 4.6 gig, Womble MPEGVCR won't open it and Ulead only sees it as 11minutes long. I can play it in PowerDVD 3.0. Anyone got any ideas whats going on? Any other editors out there that can 'fix up' this mpeg?


----------



## Bigjohns

I've been fooling around with converting some MPG files to WM8. I find that they actually look better than DIVX. Perhaps its just me. Anyway, does anyone want to put an extracted replay mPG file somewhere so I can copy it down (i've got broadband) and try the WM8 kit on it? I'd do it myself but with 3 kids I'm still saving up for the upgrade to my showstopper...


John


----------



## aaron.s

mrwilson,


I ran into the same problem recording the Pilot of Enterprise in HQ. Now adays, I only record in Medium to overcome this problem, but there is a way around it.


Use TMPEGENC (I suggest the latest version 2.5) to cut your program into 2 or 3 segments - each 1.5 to 2.3 Gigs. Then edit out your commercials and again use TMPEGENC to append them back together again before burning to DVD.


Aaron


----------



## mrwilson

aaron, thanks, I'll give that a try!


----------



## Loch

Quote:

_Originally posted by dfrumin_
*


The unsolved problem? I haven't found a way to trick IIS into not sending headers. The problem happens with the Device_Descr.xml file, where the RTV gets mighty unhappy about seeing certain headers. Short of finding some back trick to do that, a "pure" ASP version won't be possible and I'll need to write an ISAPI extension of some form.

*
Pretend just for a moment that I am shy on knowledge of IIS, but just happen to have a LOT of access to info. Could you tell me EXACTLY what IIS headers need to be disabled? Or any other info you would need to get this running on IIS...


Thanks,

Loch


----------



## gorne

First of all,


This is great work. I purcahsed a RTV4080 with this in mind.


Question on Replayserver


I am running on WinME as a test only and plan to move the replay server to Windows 2000 pro once I figuire this thing out.


I have tested both Apache and PHP both work.


I notify the Replay box and it displays the server name but no guide for it eventhough I have a copy of the guide named guide.dat in the Document Root directory.


dfrumin says to test the guide file like this:


>Let's check that the guide is being sent back out correctly


>Test: run ReplayPC against the ReplayServer and get the guide, run a binary compare (fc /b) to make sure it's up and down correctly

>Expect: no differences

>See: differences -> check #2 above (wrong guide extracted)



Anyone know how to get the guide file with ReplayServer?


Any help here would be greatly appreciated!!

Gorne


----------



## Dallben

Quote:

_Originally posted by gorne_
*Anyone know how to get the guide file with ReplayServer?*
You don't get the guide with replayserver, you get it with replayPC. The newest version of replayPC should strip out the ##### ATTACHE FILE XXXXXX ##### stuff. It's available at http://replaypc.sourceforge.net If it doesn't, you can get the version available on Dan's page. http://206.124.140.12/rtv/ 


The command line should still be: replaypc _n.n.n.n_ -g


That will pull down the guide. Make sure it is named GUIDE.DAT, and place it in your document root. Start the server, and make sure that you run RTVNOTIFY.EXE (also available from Dan's page)


If you're still having problems, send me a PM with an email address, or an msn messenger id, and I'll get back to you.


[edit]


If you're trying to get the guide FROM the replayserver, just plug it's ip address in. However, every time I try to do this, apache blows up. Might be different on your OS.


Try renaming your replay, and change the name & serial number of your replayserver. This seems to help some folks get this working.


----------



## vaylen

I just can't let this thread die. It's too awesome! I remember that there was a problem accessing the live buffer because of the pesky windows "sharing violation" error. Is there a way to snapshot the data in the buffer without actually messing with the file? I think the inability to save your capture buffer is one of only two major shortcomings of the 4000 series. (The other is the fact that even though your unit is plugged into the internet 24/7, you can't go to www.myreplaytv.com and tell it to record a show in the "blackout" period -- phooey!)


Anyway, continued thanks to all who have spent so much of their valuable time on this. Those of us that are less capable programmers are really experiencing the thrill of downloading these files because we are standing on the shoulders of giants.


-Vaylen


----------



## KenL

Quote:

_Originally posted by vaylen_
*I just can't let this thread die. It's too awesome! I remember that there was a problem accessing the live buffer because of the pesky windows "sharing violation" error. Is there a way to snapshot the data in the buffer without actually messing with the file? I think the inability to save your capture buffer is one of only two major shortcomings of the 4000 series.*
Don't worry this thread will never die!! As for the pause buffer I'm looking for some way to extend it. I seem to be getting approx. the same size buffer my original (unit size) had no matter what capacity I'm currently at (?) With the 2K/3K units it was only limited by the free space and I could often buffer 24 hours worth (would reset at the nightly call) had the channel had not changed in that long. Anyone with a native 4160 ever measured how far back it will go when left sitting on one channel for a long period?


As for capturing it... I had the opportunity to use our old capture buffer trick and I noticed an interesting side effect. "Red Rose" Part 2 had started and I had forgot to set it. Well it was already on the right channel by chance. So I rewound and paused it, however I hadn't watched "part one" yet. So I let it finish on pause, then patched the output of the 4K into (unused) line one input. I set up a manual record for 2 hours then cued it up and hit "play" moments before the line one "manual record" started. I was half paying attention at the beginning to see if was working and I noticed CA munching the commercials... whoops. Well great actually!! The whole thing packed down recording the CA'd output! Once it was done I renamed it to match part 1. That was just too kool and as far as I know the CA seemed to be doing a pretty good job on that one! So I didn't even have to get it elsewhere! Turned out pretty slick and even slicker getting to rename it right away when done!


So has anyone used a WebTV or dishplayer keyboard on a 4K unit? That would make the "renaming" bit much faster. If that still works on the 4K... I will need one of those keyboards! I do more onboard titling than I thought I would.


----------



## jtl

/demo-macros.html

Valid but uninteresting


/EmWeb/UPnP/Eventing/

/EmWeb/UPnP/UPnPActionRspDoc.xml

/EmWeb/UPnP/UPnPQueryRspDoc.xml

/EmWeb/UPnP/Service/

/EmWeb/UPnP/UPnPErrorRspDoc.xml

/EmWeb/UPnP/Notice.xml

/EmWeb/UPnP/Control/

/EmWeb/UPnP/Eventing/

/EmWeb/UPnP/Notice.xml

/EmWeb/UPnP/UPnPActionRspDoc.xml

/EmWeb/UPnP/UPnPErrorRspDoc.xml

/EmWeb/UPnP/UPnPErrorRspDoc.xml

/EmWeb/UPnP/UPnPQueryRspDoc.xml

/EmWeb/UPnP/Control


I've looked at some of the .xml ones, without finding anything terribly interesting yet. Getting any of these seems to crash the RTV, making it a slow process.


/post?mem=%d

/post?

Haven't played with these yet (see above, wrt crashes -- it's way past bedtime). They may not be valid, may only be for outgoing, not incoming.


----------



## aslagle

Quote:

_Originally posted by KenL_
*So has anyone used a WebTV or dishplayer keyboard on a 4K unit?*
Yep, it works exactly the same as it worked for the 30xx units. It definitely made reentering my show preferences easier when I upgraded to my 4040!


----------



## jtl

The index files evidentally include info about whether or not the program was copy protected, and possibly whether it was a PPV recording. I don't have examples of either, though, and I'd like some. If anybody out there has macrovision or PPV recordings, could I get a copy of the matching .ndx file?


----------



## mberneis

Well, first I have to thank all of you. If it has not been for this forum I never would have upgraded to a Replay4K unit. But all these new possibilities...


I read all the message threads, the FAQ etc.


Here my questions if anybody would be so kind to help:


1) I initially tried to set up all the software on my 802B11 Lan but could not get it to work. The photo software never worked, replayserver worked only under XP, file retrieval was very buggy and timed out with socket errors (yes, I unloaded Zonealarm).

Now I have a cat5 cable strung across 2 rooms and it works fine.

I have an SMC switch/accesspoint. Anybody had success with it? I see that most people have linksys.


2) I have my video files transferred, can play them with Mediaplayer and can also load them with XMpeg. But somehow the aspect ration is wrong. About half the width. Anybody experienced this?


3) Although I can play the file with Media Player I can not load them into Media Encoder. I get the error that that "one ore more codecs required to open this media could not be found (0xC00D1B83)


4) If I load the MPEG into XP's MovieMaker application they show up as Audio only but the video plays fine in the preview window! But as it thinks they are only audio it will not let me create an output file with video.


I tried the freedvd codecs and although the Mediaplayer DVD plugin from the PowerDVD people. I paid good money for it but could not get it actually to work. Mediaplayer gives the same error when I try to play a DVD (but this does not belong into this forum)


Once again - great work folks! - Can not wait until the guide programming is done.


So the next purchase seems to be the DVD-R A03 to store all that stuff...


Michael


----------



## ijprest

Quote:

_Originally posted by mberneis_
*2) I have my video files transferred, can play them with Mediaplayer and can also load them with XMpeg. But somehow the aspect ration is wrong. About half the width. Anybody experienced this?
*
These were recorded in low quality, right? Low-quality MPEGs are 352x480, IIRC, making them taller (pixel-wise) than they are wide.


However, it seems to be up to your MPEG2 codec as to whether or not it can be stretched. The codec I use won't stretch the image, even if I resize the window. (A previous codec I tried _would_ stretch the image.) You might want to try full-screen mode, which looks as expected on my machine.


----------



## FlipFlop

Can you SET the Replay Channel data on a 4000 through the network connection without going through MyReplayTV? I know you can read the Replay Channel info from a unit, but I'm wondering if anyone has run across some network command to set up a new recording and check if it conflicts with existing recordings?


I'm cross posting this here because the people working on this thread can probably answer the question better. For my reason for asking, see http://www.avsforum.com/avs-vb/showt...098#post873098


----------



## jtl

Quote:

_Originally posted by FlipFlop_
*Can you SET the Replay Channel data on a 4000 through the network connection without going through MyReplayTV? I know you can read the Replay Channel info from a unit, but I'm wondering if anyone has run across some network command to set up a new recording and check if it conflicts with existing recordings?*
There's no evidence that's possible, at least not in any sane way.

The only remote replay guide commands I can find strings for are "get_snapshot", "delete_show" and "is_show_in_use".


In addition to the "get_snapshot" method for getting the guide, though, there's a directory called "SnapshotDir" exported readable&writable by HTTPFS; there's a file "Snapshot-Local-1013544000" (number changes as appropriate) which is a snapshot of the guide as of midnight.


So, insane ways that might be possible:

1. write a new guide to the SnapshotDir and magically convince the RTV to use it (implausible, but why is that FS mounted writable?)

2. dummy up a myreplaytv server, convince the RTV to talk to you instead of the real one (doable -- anybody interested in persuing me lemme know and I'll dump out my ideas, and maybe some working code for some of it), and convince the RTV to do an update now instead of waiting (don't have any ideas yet how to do that).


----------



## richyrich

I have used ReplayPC to extract mpeg files from my RTV with great success. They play back fine in Windows Media Player.


When I try to load them in Adobe Premeire (I have a Pinnacle DV500) I get motion compression errors (lots of little square dots) whenever ther is a scene transistion.


I tried converting RTV MPEGS using TMPGEnc and get the same errors.


Anybody else experiencing this? Any ideas on how to correct it?


----------



## Dallben

Quote:

_Originally posted by richyrich_
*I have used ReplayPC to extract mpeg files from my RTV with great success. They play back fine in Windows Media Player.


When I try to load them in Adobe Premeire (I have a Pinnacle DV500) I get motion compression errors (lots of little square dots) whenever ther is a scene transistion.


I tried converting RTV MPEGS using TMPGEnc and get the same errors.


Anybody else experiencing this? Any ideas on how to correct it?*
This would probably go better in this thread.


----------



## jotter

Hi,


Went back over quite a few posts to check on this but without much success - hopefully Ive just missed something!


Anyway, does anyone know any way of getting "status" messages from the replay box?


For example, "is_show_in_use" (I haven't yet tested) seems to get status information for a current show. Is there a way of getting info like:

* the current show being played

* time/byte position of the current show being played (this is what Im really after)


While I'm wishing for the earth, can anyone point me towards information on "command" requests, for example: start playing XYZ, pause, play etc.


Thanks

Jonathan


----------



## jtl

I've seen no evidence any of that is possible over the network, at least in any sane way. (there's a shell command to simulate remote control buttons, and you can fiddle with the RNS stream to force shell commands to run during a daily or forced connection)


----------



## jtl

I should have mentioned -- one of the open ports is the standard Sun-style RPC port, and I still have half a hope that there's an RPC call to run shell commands.


----------

