Question about mfs_extract and tystreams

pokemonrdobh pokemonrdobh at y...
Thu, 24 Jan 2002 07:48:05 -0000


Hi All,

I checked thru the source code of both versions of send stream @ 
http://hackaway.topcities.com/ and they look to have the old fsid to 
sector formula. 
I've coppied the salient text from message 796 here. Could someone 
make the code changes to sendstream, compile and post here ? 

"I've figured this out for an experimental ExtractStream that I 
wrote. So far
it has been able to extract raw tyStreams for all the FSIDs I throw 
at it. I
have a single A drive 120 GB SAT-T60 which has two MFS App partitions 
(hda10
and hda12). The answer to your question appears to be:

offset = ((((loff_t) fsid * 0x20db2) & 0x000fffff) + 1) << 9;
partition = (offset & 0xf0000000) >> 27; // results in 0 or 2
if(partition == 0) {
offset += (0x461 << 9);
} else {
offset &= 0x0fffffff;
}

If the result of FSID to offset mapping results in the 28th bit being 
set, then
the offset refers to the second partition. There is also a difference 
of 0x461
sectors between sectors on the first and second MFS App partitions. 
Where
mapping adds 0x462 sectors to the offset for sectors on the first MFS 
App
partition, only 1 sector needs to be added to offsets on the second 
partition.

Also, there appears to be a 128 byte, zero terminated string at 
offset 0x24 of
the first MFS App partition that lists all MFS partitions. Mine reads
"/dev/hda10 /dev/hda11 /dev/hda12 /dev/hda13 /dev/hda14 /dev/hda15". 

> After that it's time 
> to figure out if the tyStream DEMUX / MPEG2 MUX can be done on the 
> Tivo side or not (without bringing the Tivo to it's knees).

Great! This is where I must defer to you, as I can't get the 
extracted raw
tyStreams to split using any of the usual tools. I don't have any 
knowledge in
this area...

I've posted this version of ExtractStream here in case you want to 
give it a
whirl:"



--- In ExtractStream@y..., "pokemonrdobh" <pokemonrdobh@y...> wrote:
> My tivo is a DirectTivo Tivo. I've used both extractstream, and 
> mfs_export on the tivo to extract. I don't have a ethernet 
connection 
> so I've rigged up a ppp connection via the serial port of the DTivo 
> and a linux host. There was an issue with bad fsid's when using 
> extractstream, is was due to the mask used in a calculation for 
fsid 
> to raw sector. I think this was solved. I'm thinking this same 
> aproach might need to be taken to sendstream. From there (ok this 
is 
> getting lenghy now isn't it) I've ran across a util that was being 
> worked on another board. This one parsed the output of both the 
files 
> generated from mfs_export and extractstream. I've also revied the 
> code as best as possible on both. I liked mfs_export's medhodloghy 
> since it didn't play the stream again then grab the output from the 
> codec, it just dumped the data out of the mfs constructs. In any 
> case, the parser that was partially developed seemed to be the only 
> one that could remotly find intelegent life on the data generated 
by 
> either extractstream or mfs_export. To perform the tystream to mpeg 
> conversions I've used both windows 98 and Linux hosts just depended 
> on the utilities available for testing. I'm tried tyc on the linux 
> side, I've tried splitstream 0.5 and tyconvert on the windows 
side. 
> I'll take a second gander at sendstream and see what pans out. BTW 
> does anyone have a PPC compiler ? Just incase we need to make a 
DTivo 
> version of sendstream.
> 
> if it helps I have a 700mhz linux host with 256mb ram and a 900mhz 
> windows 98 host with 512mb ram, and my poor tivo is running a 72mhz 
> PPc with 32mb ram and a WD60gb drive with 2.0.1. tivo/linux o/s.
> 
> Thanks
> 
> 
> --- In ExtractStream@y..., Roger Merchberger <zmerch7@y...> wrote:
> > --- pokemonrdobh <pokemonrdobh@y...> wrote:
> > > This is at least related so don't flame me yet. I'm using a 
> Philips
> > > 
> > > DSR6000 @ software release 2.0.1. I've used mfs_export to 
extract
> > > out 
> > > a stream. I've tried to use tools like tyconvert, convertstreams
> > > and 
> > > the like and haven't had much sucess.
> > 
> > To give you a hand, we need more info. Some info may not be
> > necessary, but might be helpful for advice.
> > 
> > Things that are nice, but not totally necessary:
> > Extracting computer speed/ram
> > 
> > Extremely helpful:
> > Extracting computer Operating System
> > 
> > Needed:
> > You say "tools like..." - Exactly what tools did you use, and what
> > error messages (if any) were displayed.
> > 
> > "and the like..." Did you try sendstream / splitstream? If so, 
what
> > were the results. If not, give them a try. Different tools seem to
> > like different streams from different machines. Sendstream works
> > great WRT my "40Gig" Philips HDR212 but seems to barf on some Sony
> > streams... etc.
> > 
> > > If there a utility that can 
> > > strip out the tystream info and leave me with a mpeg2 stream of
> > > audio 
> > > and video data ?
> > 
> > That would be splitstream, if you're looking for *seperate* audio 
&
> > video stream files (.m2v & .m2a). Check out my links at:
> > http://www.30below.com/~zmerch/tivo/index.cfm
> > 
> > you might find some other advice/software/stuff there that can 
help.
> > 
> > > There has been some discussion and some code 
> > > developed @ dealdatabase forms but the discussion has died down 
> and
> > > I 
> > > fear the members have collectivly been hit by a bus. Any ideas 
on 
> a
> > > 
> > > conversion tool like this ?
> > 
> > I doubt that all of the members were sucked into the same black 
hole
> > -- but now does seem to be a good time for employment-based 
overtime
> > to help pay for the Christmas credit card bills that will be 
> arriving
> > shortly -- maybe most of the folks involved have little spare time
> > right now?
> > 
> > My Xmas is paid for (as are my credit card bills, thanks to my new
> > house payment & financing) but I now have a 120-year-old 3-story
> > house to completely rewire, insulate & ultimately move into - my
> > spare time is a wee bit in short supply myself... ;-)
> > 
> > [[Where am I getting this free time? I'm too darned tired to work 
on
> > the house after my 14-hour workday... ;-) ]]
> > Post some more info, and I'm sure you'll find more than a few 
folks
> > willing to help.
> > 
> > Thanks!
> > Roger "Merch" Merchberger
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Great stuff seeking new owners in Yahoo! Auctions! 
> > http://auctions.yahoo.com