View Full Version : How I wasted my morning
TheDoctor
05-13-2002, 04:35 PM
Attached is a file that may be of interest. It is yet another mux.
I got on of the new replaytvs over the weekend and of course had to play around with getting the replay files to play on the tivo. Next was to see if I could get tivo data to play on the replay. (Automatic commercial skip blows awaything tivo has to offer.) I am still a fair ways off from that, but I did need a quick way to play the ty structures without lugging a tivo/tv around with me, so I spent most of the morning writting the attached file.
It transcodes ty streams to mpeg 2 preserving the video AND audio timestamps. You can view the resulting file with the elecard codex.
The program accepts one argument, the ty stream name. The output file is the stream name plus '.mpg'.
When playing with windows media player, the video will 'hang' for a while if you reposition with the slider control while it attempts to find the matching audio timestamps. ON some streams repositioning the slider near the center will cause the audio to be off, but repositioning slightly to the left or right will usually fix it. I have not tried playing a program all the way thru from the begining yet.
I have tested this with only 5 or 6 streams from various sources. I doubt that it will work with the u.k. tivos or streams with 'special' dolby audio coding. The program time/and playtime indicators in media player look o.k. for Dtivo source streams but are way off for SA recordings.
It is not intended for use with any cd coding software. If however you want to load up your laptop with a few streams to watch at the office, it may be of use.
It is a windows application.
keith721
05-15-2002, 10:29 PM
TheDoctor:
attempting to process a 1.3 GB tystream file, received this error at approximately 510 MB of output .mpg file:
NVSplit3
! Run-time error '5':
Invalid procedure call or argument
could this be the result of the invalid 128K chunks at the beginning and/or end of each 512 MB tystream/FSID file in the stream?
thanks :) in advance...
keith721
TheDoctor
05-15-2002, 11:36 PM
I will have to chage the name of the source code file.... I did not recognize it, and forgot that windows uses it for errro messages.
Yes, the program does not handle compound ty files at this time. (Because there is no such thing...) I will probably add code to handle bad packets later, but the final version will likely expect the file to be in seperate files as they are stored by playback, or as a clean compound file.
If you saw the giberish I had posted a few minutes ago, ignore it.
TheDoctor
05-16-2002, 02:26 AM
There is a chance this version will fix your problem, but no promises, I will have to look around and try to recreate the problem.
keith721
05-16-2002, 08:52 AM
no, i missed the gibberish. almost posted some myself, before determining that although its a GUI Win32 executable, it has to be started from the DOS prompt in order to successfully pass the name of the input tystream file.
i'll try your new version out when i get home this evening, and let you know how it works . . .
thanks !
keith721
05-17-2002, 09:28 AM
so, it looks like the patch gets around almost all of the out-of-band chunks, except for the cluster of them at the very end of the file. i'll wait and see how others fare...
thanks! :)
keith721
05-21-2002, 09:15 PM
oh, well...
TheDoctor: You have PM.
cwingert
06-02-2002, 07:48 PM
Any chance of a Linux version?
keith721
06-03-2002, 03:54 PM
i believe it's a Visual Basic compiled executable, which rules out building it for Linux (sigh.)
TheDoctor
06-03-2002, 04:19 PM
Use wine for support under linux. I have not tested this version under the latest wine release, but I know the code is compatable with some earlier versions.
The codeweaver's wine install is as easy as it gets.
But, if you are avoiding MS compatability products for religious reasons I will understand.
dlang
06-03-2002, 07:01 PM
wine is a bit tricky to get running if you don't have a copy of windows sitting around to referance.
still working on it though :-)
tivopilot
07-01-2002, 12:26 PM
Haven't seen anyone else post to this thread for a while... I was wondering if anyone is still having problems with this.
I get it to work, but it dies at the 99.xx% mark every time, and although I *THINK* I had it work once, now everytime I convert with this app, I get no audio.
Can someone verify to me if I need to convert recordings of a specific quality for this to work? I think all the quality settings use the same audio rate, so I don't think this would be the problem, but it never hurts to ask! :-)
-Steve
BubbaJ
07-01-2002, 01:05 PM
I'm rather good at converting VB <-> C, if someone wants..
Bubbaj
You are rather good at much more than that!
TheDoctor
07-03-2002, 11:32 AM
I have not forgotten about this, but have been busy with other things.
The output files probably do not play back correclty on linux because they require the correct codex. (Although micro$oft calls them filters now.) The same is true for windows if you are not getting audio. I am using the filters from the registered version of the elecard mpeg viewer. The mpeg audio is being decoded by 'microsoft mpeg 1 audio decoder - version 2.0'
It is unlikely that the final application will be portable to linux. I am adding a lot of 'windows' stuff.
Why? Well testing today indicates that I can go from a raw ty stream to a DIVX avi files, with proper sync in one step. (I should be able to build to other formats as well.) The avi's can be feed to what ever eats them...
I still have a long ways to go to get anything portable, just test code so far. I am rendering a one hour stream. (I checked at the 15 minute mark and audio is still in sync. Conversion from mpeg to avi appears to be better than real time, i.e. 15 minutes of video in 10 minutes.)
Will check for drift after lunch. (I may have to include code to sequence time stamps. I have gotten some errors from mpeg clock changes.)
TheDoctor
07-03-2002, 12:24 PM
With a straight conversion to divx 30 minutes transfered in under 45 minutes. (Was not around to watch it.) WIll have to work on a way around time stamps as they are causing problems. Audio was still in sync at 31 minutes
tivopilot
07-03-2002, 01:53 PM
Anxiously awaiting....
Command line/gui, dont care
windows/linux, dont care...
just want that app!! :-)
-Steve
TheDoctor
07-06-2002, 01:32 PM
If you can get the first app I posted to produce and mpeg that you can play, then try downloading the microsoft directx 8.1 sdk. It includes a utility GraphEdit that I stumbled onto after several days of testing hard coded filter paths. It provides you a gui that you can use to link and test filters. That will you to 'build' custom players and transcoders based on whatever set of filters you have on your machine. The 'avi mux' filter cannot handle timecode shifts. The only MPEG file mux I have tested so far does not bomb out on the time issue, but has trouble keeping sync. It is interesting to see how much impact moving monitor points hasw on the time syncing.
This sounds like a seriously useful tool, but....
With all of the tysream files I have tried, remux.exe either pops up a dialog box with the message "Stop statement encountered" or flashes up a tiny window and exits immediately.
Are there any diagnostics that can be turned on? Alternatively, is there any source code so I can debug the problem?
Thanks,
Paul
Originally posted by TheDoctor
I doubt that it will work with the u.k. tivos or streams with 'special' dolby audio coding.
Sorry... didn't spot this in the original post!
TheDoctor
07-10-2002, 10:52 PM
It is probably hanging on some of the 'dead meat' codes. (Pull them up in a hex editor and the hex code of the 4 bytes of payload data is "DE AD BE EF")
This is a newer version, it 'may' get around the issue.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.