AVS Forum banner

Status
Not open for further replies.
1 - 14 of 14 Posts

·
Registered
Joined
·
188 Posts
Discussion Starter · #1 ·
Here's a piece of software I've been dreaming about:


An add on to DVArchive that shows xvid/divx videos in it's ReplayGuide (on other ReplayTV's). When another replay decides to stream that video then the PC running DVArchive must convert the xvid/divx to ReplayTV compliant mpeg2 on the fly. This could be used for any type of content, not just xvid or divx. I've seen it mentioned for mp3, but it was eventually abandoned. I don't see why. There's so much open source software out there that the real challenge would simply be to link all of the conversion programs together.


So... I'm thinking about starting up a project. I'm not sure I could muster 2 hours a day, but I could try. The goal would be to have something running before the summer.


First step for me would be to actually run a Xvid->mpeg2->5k RTVcompliant mpeg2->stream to replay. This would be by hand, not automated or real-time.


The Xvid->mpeg2 program would not really need modifying, as long as it does not lock the output file, then it can be streamed from the output file. Creating RTVcompliant mpeg2 is a job for RTVTools I believe. It is not open source and it would need to support streaming. DVArchive would need to be modified to display different media types in the replayGuide, and to start the conversion process and stream the output to a ReplayTV.


What am I missing here, what difficulties/complications am I not seeing?
 

·
Registered
Joined
·
2,337 Posts
Quote:
Originally posted by AndrewF
What am I missing here, what difficulties/complications am I not seeing?
First, I don't think you will be able to convert xvid to MPEG-2 at speeds fast enough to support real time streaming. Second, since rtvconvert is not open source, you will have to do some serious reverse engineering to figure out how it works because there is no way you are going from xvid->MPEG-2->RTV-compliant MPEG-2 fast enough to support streaming (if at all). This is a pipe dream. Just get Xbox Media Center/Player.
 

·
Registered
Joined
·
8,143 Posts
The only way it might be possible would be with a hardware MPEG-2 encoder, otherwise everyone else is right... no way to do it real time.
 

·
Registered
Joined
·
210 Posts
Quote:
Originally posted by j.m.
First, I don't think you will be able to convert xvid to MPEG-2 at speeds fast enough to support real time streaming. Second, since rtvconvert is not open source, you will have to do some serious reverse engineering to figure out how it works because there is no way you are going from xvid->MPEG-2->RTV-compliant MPEG-2 fast enough to support streaming (if at all). This is a pipe dream. Just get Xbox Media Center/Player.
Was the version that supports Replays ever released?


Also I'm not sure what the difference between XBMP and XBMC is.
 

·
Registered
Joined
·
1,799 Posts
Also, while the "convert on the fly" stuff sounds nice, the ReplayTV model doesn't work well with it. Before you even start streaming video, you have know how big the final file will be to tell the RTV. This is pretty tough to do with MPEG since size is all about varying content and varying compression ratios.


Second, you need to have complete .evt and .ndx file ready. They can't be built "as the stream plays out", they have to be in their final form at the start of streaming (because some of them is buffered in the RTV at start of show play). You could possibly fake these those (they control commercial skipping).


Finally, the ReplayTV allows random skipping around in the program. DVA cannot ignore requests to do this, so the on the fly converter would need to be able to drop what it is doing and race to somewhere else. This is really, really tough - especially because the RTV will express that place to jump to as an offset into the MPEG stream and you have to back convert that into the Xvid stream (remembering that do to differences in MPEG/DiVX encoding/compression, that is not a linear calculation). Added to that - eventually you may need to jump back and resume what you were doing and then you have to stitch together a potential patchwork of converted parts into a unified whole as time goes on.


Is it possible? Sure, much like colonizing Mars is possible (small hyperbole there :). It's just unfortunately, very, very difficult without "pre-converting" the files.


I know it sounds easy -- things often do until the ugly details show up :)
 

·
Registered
Joined
·
8,143 Posts
Gerry, actually I think that a CBR encode of the video to be real-time converted would work better for two reasons.


1) CBR will allow you to calculate a file size (fix to problem 1)

2) CBR with a higher bitrate setting is better suited for a single pass encoding. If you want the best quality it could would be to use CBR over VBR. Not that you can't do a single pass VBR encoding, but to get great results you'd really want to use CBR. VBR will look better, but only if you give it a multipass encoding.
 

·
Registered
Joined
·
1,799 Posts
Quote:
Originally posted by Jeff D
Gerry, actually I think that a CBR encode of the video to be real-time converted would work better for two reasons.
It really all depends on the format that the ReplayTV accepts. If it accepts a CBR encoded stream, then you are correct - you should be able to do the math. If it instead accepts VBR, then we're back to a nasty place.


While I'm not an MPEG internals guy, I do see a fair amount of variability in the size of 1/2 hour recorded shows implying to me that it's likely VBR. Since we also know that the ReplayTV is very fussy about video formats, I'd be surprised if it accepted CBR (assuming it wants VBR now).


Either way, if someone can figure out how to do it, allow random positioning of the on-the-fly transcoding and produce evt/ndx files, I'd be more than happy to help develop a plugin for DVA to support it (it really wouldn't be too tough - DVA already track various media types and handles matching media types to devices).
 

·
Registered
Joined
·
188 Posts
Discussion Starter · #10 ·
Well, the program could just crash if somebody tries to jump to a different part of the show :)


That'd teach users not to jump.
 

·
Registered
Joined
·
8,143 Posts
Gerry, I can geek out with the mpeg specifics if you want me to bore you...


The replay decoder can handle VBR and CBR. The standard recording was CBR up until 5.1, now it's VBR like the other quality modes. I really doubt the decoder would be crippled to not do CBR because to the decoder it just doesn't matter, each sequence, GOP and frame are independant units and are handled independant of the others, as far as sizing goes.



I'd like to hear about the plug-ins API and such. I would think that a MP3 to mpeg audio conversion wouldn't be that tough to do.
 

·
Registered
Joined
·
1,799 Posts
Unfortunatly, the plugins API won't make it into V3. This is good and bad. Bad because, well, it won't be there. Good because it gives me more time to hash it out. V3 just got too big and I had to cut a few things if I ever want to push it out (this is why I don't like talking about features in advance - sometimes they don't work out or I don't have time to do them and I have to drop em and disappoint).


If you'd like to work through a media plugin API with me, I'd welcome that - contact me offline ([email protected]) and we can talk in more detail.
 

·
Registered
Joined
·
8,143 Posts
killin' the babies... that's always the tough part of development.


I'm sure it will still be great! =)


I'll fire you an email.
 
1 - 14 of 14 Posts
Status
Not open for further replies.
Top