PDA

View Full Version : Modified Tydemux outputs Closed Captions file



rung
04-25-2004, 02:52 PM
Thanks to FredThompson and Trilight for links to the format info (see thread cc question (http://dealdatabase.com/forum/showthread.php?t=34120)), I have modifed tydemux to create a Scenarist SCC closed-caption file. Attached are the files that I modified (search for "rung" in the files), a compiled cygwin version and a dos version (which requires the included dll to run).

The changes create a new command-line option "-d sccfilename", where you enter in output scc filename. I have successfully imported this into Scenarist and burned a DVD. The closed captions work great!

If you include an input cut file when specifying an scc output file, no video or audio will be output. Instead, the cut file will be applied to the closed caption stream to yield an edited scc file.

Have fun,
Rung

TheWickedPriest
04-25-2004, 06:53 PM
I don't have VC6, so I can't make a stand-alone Windows version.
Check this out -- you can now download it, minus the GUI side, for free:

http://msdn.microsoft.com/visualc/vctoolkit2003/

Of course there are a number of other free compilers to try as well:

http://www.thefreecountry.com/compilers/cpp.shtml

rung
04-25-2004, 08:14 PM
Check this out -- you can now download it, minus the GUI side, for free:

http://msdn.microsoft.com/visualc/vctoolkit2003/

Of course there are a number of other free compilers to try as well:

http://www.thefreecountry.com/compilers/cpp.shtml

Thanks, I'll check it out. I tried forever to get Digital Mars to work, but there are too many non-ANSI calls in the code (notice all the #IF WIN32 in the headers). Now gcc on cygwin compiled with only one very minor change and worked great. Installation under cygwin couldn't be easier (just need to select gcc and make in the setup utility) and then "make" away.

lart2150
04-28-2004, 10:33 PM
I have .net 2k3 i'm downloading the rest of the code right now to see if I can get it to compile

edit: I tried to compile it with .net 2k3 and vs 6. I gave up quick with 2k3 it did not like the dsp/w files. vs 6 also did not like the dsp/w files but I got it to start to compile but I was getting errors left and right finaly giveing up. if I had the make files for nmake I could compile a native windows binary

rung
05-03-2004, 09:38 PM
I have updated the tydemux to allow editing of the scc file. To make an edited scc file, you feed it a ty (-i option), a cut file (-c option), and a desired scc file (-d option). When a cut file is given with the scc option, no video or audio files are generated - just an edited scc file.

I have also included the batch file that I use. It adds the cygwin dll to the path and calls tydemux with the all the parameters. Just put the batch file in the same directory as tydemux.exe and make a shortcut on the desktop. Then just drag a ty file onto the icon and it will generate video, scc and audio files. If a cut file exists with the same name as the ty, it will only generate an edited scc file.

I have also found that I don't have to make menus in scenarist. I use ifoedit's "merge menu" option to steal the menus from a more friendly menu creator (I use tmpgenc dvd author).

rung
05-08-2004, 04:28 PM
There has to be an easier way to get closed-captioning into DVD. This is what I am doing:

1) Extract ty.
2) Make edited mpg.
3) With cut file that edited the mpg, I make an edited scc file with the modified tydemux.
4) Use scenarist to make a VOB with cc stream and chapters.
5) Import this VOB and chapter info into another DVD authoring program and make menus.
6) Merge these menus into the scenarist VOB's using infoedit.

Anybody see any short cuts I am missing?

Thanks,
Rung

rung
06-04-2004, 10:50 PM
I updated the modified tydemux package at the top of the thread.

Changes include:
1) Correct non-drop frame processing of the scc file.
-> Before this change you would notice that the closed-captions would delay longer and longer from where they intended. Now they stay perfectly in-sync with the video/audio.

2) Support for modern ty files.
-> tydemux was writen for what I consider obsolete ty files. These old ty files had all the headers stripped out (you would get this type of ty if you used tystudio to download the recording). The old version of tydemux would handle the new files most of the time, but it would struggle at the segment headers and sometimes crash. Now the master chunk headers are read (if there) and the junk chunks are automatically skipped.

3) Supprt for chunkedit ty files (beta)
-> If you edit recordings with chunkedit (http://dealdatabase.com/forum/showthread.php?t=31799) , this version of tydemux will process those recordings. More testing is required to make sure this works under all cases.


As before, cygwin executable and modified source files are included.

Regards,
Rung

fyang
06-11-2004, 12:34 PM
Rung,

Thanks for the nice job. But looks like it does not generate scc file for S2 Dtivo. I took a look at the source code, function parse_chunk_video_remainder_S1() does write the scc data to the output file, but parse_chunk_video_remainder_S2() does not.

I am trying to compile it using VC6 on windows 2000, but where to get those header files such as "common.h", "global.h", tygetopt.h, and "tyabout.c"?

rung
06-11-2004, 09:27 PM
Rung,

Thanks for the nice job. But looks like it does not generate scc file for S2 Dtivo. I took a look at the source code, function parse_chunk_video_remainder_S1() does write the scc data to the output file, but parse_chunk_video_remainder_S2() does not.

I am trying to compile it using VC6 on windows 2000, but where to get those header files such as "common.h", "global.h", tygetopt.h, and "tyabout.c"?

Thanks! The source files for the rest of tystudio can be found in this tar: tystudio-0.5.0-beta2.tar.gz (http://dvd-create.sourceforge.net/tystudio/tystudio-0.5.0-beta2.tar.gz). How about I post an update that puts the calls in the "S2" routines as well, and you can give me some feedback if it works?

edit: okay, try the new file at the top of the thread. I updated the parse_chunk.c file, but I don't know if there is anywhere else that needs to be changed for S2. Let me know.

fyang
06-13-2004, 12:53 AM
Rung, thanks a lot for the update.

Yes, it now works for S2 Dtivo too. Please see the attachment for details (also including an error log) of my testings on S2 Dtivo.

I thought that the CC data is only retained by MFS_FTP extraction. (http://dealdatabase.com/forum/showthread.php?t=34120). But I actually got the CC data from TyTool extraction using your new tydemux, which surprised me. Tydemux generates identical scc data files for both mfs_ftp and tytools extraction .ty files.

Sorry for the late response. I have just gotten chance to see your post here.

rung
06-15-2004, 03:47 PM
Rung, thanks a lot for the update.

Yes, it now works for S2 Dtivo too. Please see the attachment for details (also including an error log) of my testings on S2 Dtivo.

I thought that the CC data is only retained by MFS_FTP extraction. (http://dealdatabase.com/forum/showthread.php?t=34120). But I actually got the CC data from TyTool extraction using your new tydemux, which surprised me. Tydemux generates identical scc data files for both mfs_ftp and tytools extraction .ty files.

Sorry for the late response. I have just gotten chance to see your post here.

Man, that's a lot of errors. Someone out there must have a some source modifications for S2 tydemux. When I processed Matrix 3, there wasn't a single error (S1 stream). Let me know if all your your streams spew all those errors.

fyang
06-16-2004, 05:39 PM
I have tried several other S2 Dtivo ty files. They all produced the same kind of errors.

I will try to use VC6 to debug the tydemux source code (got it compiled already) to see what happens. Could anyone provide with some details of the tystream data structure of S2 Dtivo? Thanks

rung
06-17-2004, 06:27 AM
I have tried several other S2 Dtivo ty files. They all produced the same kind of errors.

I will try to use VC6 to debug the tydemux source code (got it compiled already) to see what happens. Could anyone provide with some details of the tystream data structure of S2 Dtivo? Thanks

The tystudio whitepaper is here (http://dvd-create.sourceforge.net/tystudio/tystream.shtml). You may also want to search alt.org (http://alt.org/forum/index.php?t=thread&frm_id=2) for S2 info. Make sure you check the original version to make sure I haven't messed anything up with my modifications.

Do you mind posting your VC6 compilation? I would like to include it in the distribution so others don't need to install cygwin to run it.

Thanks,
Rung

fyang
06-18-2004, 12:45 AM
Rung,

Nothing magic to get the tydemux compiled. Below is the steps I have done for it:

1. download tystudio source from "http://dvd-create.sourceforge.net/tystudio/tystudio-0.5.0-beta2.tar.gz".

2. download mjpeg source from "http://cvs.sourceforge.net/viewcvs.py/dvd-create/tydemux/mjpeg/Attic/mjpeg.zip". (Not sure if we need this, but tydemux may needs some .h files from it. So at the step 4 below I added the path mjpeg\mjpeg_play\win32 to the include path of tydemux. eg. VisualStudio: Tools: Options: Directories: Include Files. )

3. unzip tystudio-0.5.0-beta2.tar.gz and mjpeg.zip, and overwrite the files under tydemux directory with your mods of such as chunk_parse.c, etc.

4. Open the tydemux.dsw and set "tydemux files" in the workspace as Active Project, and choose Build: Rebuild tydemux.exe. That's it

Please let me know if you have any question.

Update: I have attached my VC6 compilations here. Looks like I can only attach files under 1MB, thus I get rid of some unnecessary files from the original packages. Just unzip it and then click the VC6\tydemux.dsw.

rung
06-19-2004, 02:45 PM
Update: I have attached my VC6 compilations here.Thanks. Looking at the mod dates, it looks like the changed files are the tydemux.opt, tydemux.plg and the tydemux.ncb files. Is that right? Can you post a compiled windows executable?

Thanks again,
Rung

rc3105
06-19-2004, 10:38 PM
Rung,

Nothing magic to get the tydemux compiled. Below is the steps I have done for it:

2. download mjpeg source from "http://cvs.sourceforge.net/viewcvs.py/dvd-create/tydemux/mjpeg/Attic/mjpeg.zip". (Not sure if we need this, but tydemux may needs some .h files from it. So at the step 4 below I added the path mjpeg\mjpeg_play\win32 to the include path of tydemux. eg. VisualStudio: Tools: Options: Directories: Include Files. )


you may need the mjpeg cvs that was current back when tystudio was posted

fyang
06-22-2004, 11:34 PM
you may need the mjpeg cvs that was current back when tystudio was posted

Thanks for the info. I have just noted that there is a newer version of mjpeg at http://dvd-create.sourceforge.net/tystudio/mjpeg_play.tar.gz
But l also realized that tydemux does not need anything from mjpeg.

fyang
06-22-2004, 11:55 PM
Looking at the mod dates, it looks like the changed files are the tydemux.opt, tydemux.plg and the tydemux.ncb files. Is that right? Can you post a compiled windows executable?



tydemux.plg you mentioned is just my build log (in html format), and .opt and .ncb may just be vc6 database/config files (I guess). Those files were automatically generated by VC6. I might be wrong at this point though. (I am working on embedded software, and only knew a little about microsoft windows development environment.)

rung
06-23-2004, 04:55 AM
The tydemux.exe and some makefiles are attached below. Thanks. I tried-to run tydemux.exe and it said "The application failed to start because MSVCRTD.dll was not found. Reinstalling the application may fix this problem"

malfunct
06-23-2004, 09:35 AM
Thanks. I tried-to run tydemux.exe and it said "The application failed to start because MSVCRTD.dll was not found. Reinstalling the application may fix this problem"

Thats the standard visual c++ runtime from visual studio 6. Shouldn't be hard to come up with, might even be a redistributable package on microsoft.com you could download.

fyang
06-23-2004, 12:02 PM
Thanks. I tried-to run tydemux.exe and it said "The application failed to start because MSVCRTD.dll was not found. Reinstalling the application may fix this problem"
The MSVCRTD.dll could be found at "http://www.dll-files.com/cgi-bin/cgiwrap/dll-files/topdown/download.pl?file=msvcrtd.zip==". Unzip it into winnt\system32 should solve the problem.

malfunct
06-23-2004, 12:29 PM
The MSVCRTD.dll was included in the above zip file (tydemuxMake.zip). Unzip it into winnt\system32 should solve the problem.

It should also work from anywhere in the path of the program, including the working directory for the program.

EDIT: Thats why winnt\system32 (or windows\system32 for those non-server os's) works, its in the path

rung
06-23-2004, 09:11 PM
Yep, that did it - works now, thanks. Is it just me, or is the cygwin compile much faster than the "native" microsoft executable?

malfunct
06-24-2004, 12:41 PM
Yep, that did it - works now, thanks. Is it just me, or is the cygwin compile much faster than the "native" microsoft executable?

Was the compile from VC6 a debug version? If so it has no optimizations and is bloated with symbol info.

fyang
06-24-2004, 11:40 PM
Was the compile from VC6 a debug version? If so it has no optimizations and is bloated with symbol info.
Ooops! That's my mistake. Please try this one (release version). Thanks.

Edit: zip file removed to save space. Please see the zip file at top of the thread.

rung
06-25-2004, 04:48 AM
Ooops! That's my mistake. Please try this one (release version). Thanks.That's the ticket. Much faster - thanks! Even faster now then the cygwin version (I think).

EDIT: I added your executable, dll, mak and plg file to the distribution zip at the top of the thread.

malfunct
06-25-2004, 10:18 AM
That's the ticket. Much faster - thanks! Even faster now then the cygwin version (I think).

EDIT: I added your executable, dll, mak and plg file to the distribution zip at the top of the thread.

Before you start distributing the msvcrt dll on a public forum make sure you are in compliance with the redistribution licence that microsoft gives. Don't want you getting in any unecessary trouble with MS and I don't personally know the rules.

fyang
06-25-2004, 11:30 AM
Before you start distributing the msvcrt dll on a public forum make sure you are in compliance with the redistribution licence that microsoft gives.

Good point.

Might be truouble free to add a note and let the user downloading it by self. "msvcrt.dll" could be found at many websites, such as "http://www.dll-files.com/cgi-bin/cgiwrap/dll-files/topdown/download.pl?file=msvcrtd.zip==".

malfunct
06-25-2004, 12:10 PM
Good point.

Might be truouble free to add a note and let the user downloading it by self. "msvcrt.dll" could be found at many websites, such as "http://www.dll-files.com/cgi-bin/cgiwrap/dll-files/topdown/download.pl?file=msvcrtd.zip==".

The complete set of redistributables are available from MS:

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q259/4/03.ASP&NoWebContent=1

I am still looking for the licence that comes with vc6 since I only have vc7 (Visual Studio .NET 2003)

EDIT: As far as I can see, as long as the file is on the redistributable list, you can just include it with your app no questions asked. There is a redist.txt file on Disc 1 of the visual studio 6 installation that lists the redistributable files. BTW this is my intpretation of the information I read on microsoft.com so I don't want to be held responsible for any actions taken as a result of my interpretation :)

rung
06-25-2004, 02:04 PM
There has to be a compile option that would bind the required calls in the executable. The original Tystudio package was compiled with VC6 and didn't require the dll.

malfunct
06-25-2004, 02:47 PM
There has to be a compile option that would bind the required calls in the executable. The original Tystudio package was compiled with VC6 and didn't require the dll.

You can statically link the C runtime into the file in which case you don't need to distrubute the runtime in a separate dll.

fyang
06-28-2004, 04:12 PM
You can statically link the C runtime into the file in which case you don't need to distrubute the runtime in a separate dll.

Thanks for the hint, this one should no longer needs the dll.

Gotten a lots of errors like below when I first tried to statically link the runtime libraries. And finally realized that I had mixed the "multithreaded" and "multithreaded DLL" between projects.
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)

rung
07-01-2004, 09:51 AM
this one should no longer needs the dll.

I replaced the exe in the package with this one and removed the vc6 dll.

Masnark
08-18-2004, 05:25 PM
I replaced the exe in the package with this one and removed the vc6 dll.

Hey,
Haven't tested this yet, but it sounds like some real nice work.

How long approximately does it take to produce the Close Caption file from a TY file? (Figures for your machine and your machine speed would be sufficient - I just want to have a general figure).

rung
08-18-2004, 07:18 PM
Hey,
Haven't tested this yet, but it sounds like some real nice work.

How long approximately does it take to produce the Close Caption file from a TY file? (Figures for your machine and your machine speed would be sufficient - I just want to have a general figure).

Never timed it. I guess about five-ten minutes for a movie on a 1GHz machine.

Abubo
08-24-2004, 05:33 PM
So the tydemux worked on my system and now I have a .scc file. What I really wanted to do was to produce an dvix/xvid/wma compressed archive of the show with subtitle displayed; anyone know of a tool which will do that? Which encoder or compression tool will take a subtitle script supported by ccadsi.exe?

rung
08-25-2004, 06:34 AM
I think fyang has a thread about that. Check here (http://dealdatabase.com/forum/showthread.php?t=36740).

damasus
10-18-2004, 03:25 PM
When I use the command line with my cutfile, scc file and tyfile, it simply dumps me the usage info. When I drag the .ty file onto the shortcut, it for some reason doesn't see the .cut file and proceeds to generate the elemental streams, which is not what I want.

Could someone clarify the -s option? -1 is for version 1 and -2 is for version 2? Does version here mean series or software rev? I have a Series 1 with software version 3.xx, am I to use -2? (I've tried both, neither will give me the scc file)

I've tried both the cygwin and native win versions.

Streams and cuts were done using TyTool 9r17 and the gop editor.

What am I missing here? Help is apreciated.

Thanks

rung
10-18-2004, 04:04 PM
When I use the command line with my cutfile, scc file and tyfile, it simply dumps me the usage info. When I drag the .ty file onto the shortcut, it for some reason doesn't see the .cut file and proceeds to generate the elemental streams, which is not what I want.

Could someone clarify the -s option? -1 is for version 1 and -2 is for version 2? Does version here mean series or software rev? I have a Series 1 with software version 3.xx, am I to use -2? (I've tried both, neither will give me the scc file)

I've tried both the cygwin and native win versions.

Streams and cuts were done using TyTool 9r17 and the gop editor.

What am I missing here? Help is apreciated.

Thanks


You need to use -s 2, per usage output. Cut files need to come from tystudio, not tytools, also per usage output:
tydemux -s 1/2 [option] -i infile -a outfile_audio -v outfile_video

Where -s 2 is manditory:
-s 2 for Tivo version 2.x and up

Where option is:
-c cutfile (Use a TyEditor cut file)
-d sccfile (Create Scenarist closed-caption file)
-h/? (help - writes this message)

damasus
10-18-2004, 05:17 PM
Thanks for the quick reply.

I got here from this thread http://www.dealdatabase.com/forum/showthread.php?p=177565#post177565
where step 1 is "1. tytool: convert ty stream into vob files, cut out commercials..."

Yep, using cuts from TyStudio did the trick. Now, onward...
Thanks again

Marie
01-02-2005, 11:39 PM
I got the tydemux.exe on my Win XP but when I try to run it, it opens and closes a DOS window so quick I cannot read what it says. Is tydemux supposed to open a DOS window? Or is it supposed to work in conjuntion with Tystudio? :confused:

rung
01-03-2005, 05:20 AM
I got the tydemux.exe on my Win XP but when I try to run it, it opens and closes a DOS window so quick I cannot read what it says. Is tydemux supposed to open a DOS window? Or is it supposed to work in conjuntion with Tystudio? :confused:

The modified version of tydemux in this thread is a standalone command utility. You can run it from a batch file or from the command line ("Start", "Run...", "Cmd").

What is DOS? :p :D

Regards,
Rung