PDA

View Full Version : DV timecode ==> subtitles?


ou8thisSN
26th May 2005, 21:40
the DV camera I have, it records the date/time and other information into a "data code". I actually wish there was a way for it to just be embedded into the video itself, but it isnt.

I have been learning how to export DV into DVDs, and I was wondering is there anyway to export the data code (as Sony refers to it) and somehow make that a subtitle that can be turned on and off?

communist
26th May 2005, 22:34
Thats a nice idea - the only thing I know of is the AviSynth plugin called DVInfo. Maybe using this you can somehow create a DVD compliant subtitle - though I wouldn know how.
http://www.avisynth.org/warpenterprises/

thor300
26th May 2005, 22:59
I have used dvdatecode v1.2, it creates a txt file that can be converted to DVD subs with Subtitle workshop. Its a lot of work by the way, you should look for a complete guide.
A search for dvdatecode returned this: http://forum.doom9.org/showthread.php?s=&threadid=89215

neily
27th May 2005, 00:14
First of all, you have to consider which authoring tool you are going to use. Some accept text input and generate the bitmaps, others require the bitmaps.

There are numerous subtitling tools around - look at the Doom9 list. Many utilities for transferring DV actually embed the date code in the file title.

I don't think there is likely to be a tool which does what you want completely automatically, but there are many tools that help. Besides, depending on your use, you may want to include simple location data as well, so some manual input will be required.

Personally, for all my transfers, I keep a small tab-delimited text file that includes the file name, frame count, date, and location. I use Sonic ReelDVD for authoring, and it was not too difficult to write a program that generates the requisite .sst file and subtitle bitmaps, which includes the location, date, and age of my children, who appear in 95% of the files.

ou8thisSN
27th May 2005, 00:57
perhaps one of you can be persuaded to write a guide or something. i am far too novice to even attempt to write anything. I was just wondering if there was a guide or a program or somehting.

surely the data code as a purpose or why else would they include it in the camcorder to begin with...

thor300
27th May 2005, 11:31
Ok, heres a short how-to using freeware only:

4 apps needed:
- DV_Datecode
- Subtitle Workshop
- srt2sup
- MuxMan (or IfoEdit)

Run DVDATECODE

Open the created sub-file in Subtitle workshop (sub-file in same folder as DV file)
File - SAve as...
Select SubRip in the dialog that comes up, then OK, an SRT file will be saved

In srt2sup:
File - Open as Text, SRT file
Click Settings - Global, set some colors that make sense, also select for transparent for background color.
Click on the ALL button so all subs are selected in the list
Click menu SUP File - Save... and it will create DVD compatible subs. Can take a while.

Multiplex with MuxMan (or IfoEdit)

That should be all.

IF you use IfoEdit i think you need another app to change the colors, its called SupRemap, open the IFO files there, enter the hex values for color you used in srt2sup (click Settings - IFO colors to display them in srt2sup), then save ifo.

If you use another dvd authoring app with subtitle support you just need to save to the correct format for that authoringapp in Subtitle Workshop.

ou8thisSN
28th May 2005, 04:37
hi thanks for the response, what program do you use to edit your DV video?

I am using Adobe Primiere 6.0 and there exists a conflict with that program and DV_DATECODE. It says that Adobe throws away the date code when you save your compilation as a D1 DV AVI file with it.

So I cant use adobe Primiere 6.0 obviously... so it seems like you have done this before, what did you use to edit your video, that still preserves the date code when you're done with whatever you are doing.

Thanks

thor300
28th May 2005, 16:07
Ulead videostudio and virtualdub both keeps the datecode.
I dont know about any advanced editors, maybe Vegas can do.

ou8thisSN
28th May 2005, 17:44
dude, all i'm using is winDV to extract my video files.

as you may or may not know WinDV makes like a file for each time the camera is turned on or off, so there are about 110 files for about 61 minutes of video.

All i am looking for was an editor that will simply let me edit the clips together, then join them all into 1 DV AVI file and still preserve the new updated datecode... which adobe primiere doesnt want to do.

I am hoping your Ulead will let me do this. I got the trial version last night.

thor300
28th May 2005, 18:26
Ok, if no advanced editing use virtualdub, easy and fast:
- Load first file
- Click File -> Append AVI segment
*Select second file
*Make sure to select "Autodetect additional segments by filename" (at the bottom of the Append dialog window)
*Click the Open button and it loads all the files
- Video -> Direct Stream Copy (important)
- File Save as AVI...

Note: Virtualdub can stop loading if segments are missing, then you need to File -> Append again, select the file where it stopped last time. Repeat untill all segments are loaded.

Edit: Ulead videostudio can do it too if you prefer that, with optional transitions between each segment. Just drag and drop all the files to the storyboard when in editing mode.

ou8thisSN
28th May 2005, 19:01
okay, the way winDV named the files, it seems like I have to append each avi file manually....

is there a better way?

also in virtualdub, how do i save the final file (after i make my simple edits) as a DVI AVI file WITHOUT including the audio?

and why the hell is the screen so messed up in virtual dub, it shows you like 90% of the screen on the left and 10% on the right?


EDIT: I just appended 3 files together in Vdub and did a bit of editing, I saved it under File/Save option, and it didnt offer any way of saving just the video. Anyway, I loaded that fine in DVDATECODE and it didnt find any timecode at all. So Either I am doing something wrong or I dont know what... if you see this please help.

thor300
28th May 2005, 19:39
I think you are seeing the whole screen on the left, the "10% on the right" is the output pane. Click Options -> Swap Input/Output panes" to switch between the two, or rightclick and choose a zoom percentage so both are visible. In your case you will not need to see the output pane anyway; its used to preview if you add filters.

To remove audio in virtualdub: Click Audio -> No Audio before saving the new avi file.

Been a while since i used WinDV. Ulead videostudio can also create new file at scene change, thats the setting i always use and virtualdub has no problems to autoload the segments. Bad luck for you, manually loading 100+ files doesnt sound like fun =)

thor300
28th May 2005, 19:41
To your edit: You probably forgot to set Video -> Direct Stream Copy, and then virtualdub would create an uncompressed RGB AVI file, ie a new file without original datecodes.
Remember these 2 steps before saving:
Video -> Direct Stream Copy
Audio -> No Audio

ou8thisSN
28th May 2005, 19:43
EDIT: nevermind this post

ou8thisSN
28th May 2005, 20:00
Originally posted by thor300
To remove audio in virtualdub: Click Audio -> No Audio before saving the new avi file.

Been a while since i used WinDV. Ulead videostudio can also create new file at scene change, thats the setting i always use and virtualdub has no problems to autoload the segments. Bad luck for you, manually loading 100+ files doesnt sound like fun =)

right, well thanks to you i resized the windows, and after clicking on Direct stream video, DV_DATECODE was able to generate a subtitle stream from the new edited and joined DV AVI datastaem!

only problem (perhaps the general ignorance on my part) is that there is no Audio menu, so i dont still understand how to deselect the audio.

I dont see any Audio/NO Audio menu or option anywhere... Under the Options menu there is only a "sync to audio" option.

And I guess I can use Ulead to capture the video, since it works for you and then do my simple edits in Vdub and then be doen with it.

thor300
28th May 2005, 20:39
Originally posted by ou8thisSN
I dont see any Audio/NO Audio menu or option anywhere... Under the Options menu there is only a "sync to audio" option.

Could it be that you are using VirtualdubMod? If so, you click on Streams -> Stream List, then click the Disable button and OK to remove audio.

ou8thisSN
28th May 2005, 20:45
yes i am using virtualdubmod, i didnt mention it because i didnt think it was important. anyway will try what you suggest. thanks for everything...

i hope this subtitle thing works. btw on your post above this you said "To your edit: You probably forgot to set Video -> Direct Stream Copy, and then virtualdub would create an uncompressed RGB AVI file, ie a new file WITHOUT original datecodes."


I think you meant to say With, not without right, becuase as i said, when i did that, the datecodes were preserved.

thor300
28th May 2005, 20:53
Sorry, english is not my language =) What i ment was that the new file would be saved as RGB without datecodes if you FORGOT to set Direct Stream copy :)

ou8thisSN
28th May 2005, 23:26
hey, so now i tried to fool around with your method of producing subtitles, and no matter what format I save it as, I cant get it to work using DVD-Lab, it gives me all kinds of errors when I try to generate a subtitle stream in it, regardless of whether it is in sub or srt format.

The reason I am using this program is because that was what's recommended in the Doom9 DV => DVD guide. if there is another program like it that lets you create fairly regular menus, etc and will accept the subtitle stream without errors, please let me know.

I dont know about IFOedit, can i use it to do that stuff or have chapters with thumbnail pictures or screens?

thor300
29th May 2005, 01:28
Nope, IFOEdit will not do that.

Whats the errors you get in DVD-Lab?

AFAIK you dont even need to use Subtitle Workshop for DVD-Lab subtitles, just import the SUB or SSA file that DVDatecode created (SUB for speed and SSA for acuracy but very slow to generate). In DVD-Lab, click on Sub 1, then in the window that comes up you click Import, then select the Sub, srt or ssa file, then click on Generate Subtitle Stream (takes some time). Then that should be it...

ou8thisSN
29th May 2005, 01:59
you think it gives me all these errors because i tried to "test" the sub file without any video or audio tracks there? i think that might be it... anyway i'm right now following your advice and using VideoStudio9 to capture my video into DV AVI into the computer

I will then use Vdub to edit my clip together, then process the video/audio, import into DVD Lab and *hope* the subtitles then work without error...

The errors i got were in relation to "this does not match the orginal time sequence, want me to fix it?" i click OKay, then it gives me a new Error saying "this subtitle conflicts with another subtitle at another point" all the way through... its like all errors. I am assuming it is this becuase i didnt have a video file or an audio file there, and since you said it worked for you..

will update the thread when all this is done, in about 8 hours or so.

ou8thisSN
30th May 2005, 07:14
Originally posted by thor300
Nope, IFOEdit will not do that.

Whats the errors you get in DVD-Lab?

AFAIK you dont even need to use Subtitle Workshop for DVD-Lab subtitles, just import the SUB or SSA file that DVDatecode created (SUB for speed and SSA for acuracy but very slow to generate). In DVD-Lab, click on Sub 1, then in the window that comes up you click Import, then select the Sub, srt or ssa file, then click on Generate Subtitle Stream (takes some time). Then that should be it...

OK, here is the problem, of which I am now sure:

When i run DV_DATECODE on my stream, it generates an SSA file and a SUB file. In DVD LAB, after I import the video and audio streams, I click on Sub1, and it brings up the new dialog box.

First of all: DVD Lab will not recognize the SUB file as a valid format, it will however recognize the SSA file. Then I see all my subtitles loaded in, and i click the "Generate" button.

Thats when the problem occurs. it says "generating..."

then it says "Checking for Overlapping..."

and a new box pops up saying "The subtitle at 00:00:16:24 overlaps with previous subtitle. Do you want to fix it?"

There are only two options OK or Cancel. Cancel brings you back to the Subtitle menu without any generated subtile. if you push OK, then it says:

"The End Time is less or equal start time at 00:00:17:33 Do you want to fix it?"

and again, only two choices: OK or Cancel, Pushing "OK" creates an endless loop of these two messages over and over again.

I dont know how you got DVD Lab to work, but if you can help me out, This is the last step I am stuck on...

Btw, this is DVD-Lab PRO... should i get the regular one?

thor300
30th May 2005, 19:43
Maybe its worth a try to first use Subtitle Workshop to convert the ssa file (or sub file) to srt (save as.. -> SubRip format). Then import the SRT file to dvd-lab. This conversion is text only, very fast. Make sure Subtitle Workshop has the correct framerate, and the Input framerate and FPS box should both be the same (29.97 for NTSC and 25 for PAL)

DVD-Lab Pro should not make a difference, since the subtitle support in the cheap version was taken from the Pro version, with some limitations.

Your audio problems is fixed now? If ever problems with audio extraction i have found Goldwave to work where others fail.

ou8thisSN
31st May 2005, 00:42
I converted it to every type of file format that DVD-lab accepts and it still gives be the same exact warning. How did you get it to work for you? did you get it to work for you or are you just guessing as to how it should work?

I converted it to all the file types that DVD-lab recognizes, but its the same. I opened it as a read only file, still the same result.

do you think it has to do with DV_Datecode and the way it makes the subtitle?

EDIT: I also posted this message in the DVDLab Pro forums and someone said:

"Sub cannot be overlapped. In fact sub cannot be displayed continously. Between two sub's, there must a gap of at least one frame duration. I think you need to click OK and DLP will fix the time codes for you. "


This message suggests something wrong with the way DV_DateCode is extracting/formatting the subtitles... what do you think?

thor300
31st May 2005, 01:46
I dont understand why it would not import the SUB file. I have done this and so far its working with all kinds of supported subtitle files. I have seen one of your errors when using SSA files, but no endless loops as you describe. Could it be that its not working so well with NTSC? I have a PAL DV cam, what about you?

What happens if you convert the SUB file to SRT and then try to import that SRT in DVD-Lab? Did you try that or you tried to convert only the SSA file?

ou8thisSN
31st May 2005, 02:11
I dont understand why it would not import the SUB file. I have done this and so far its working with all kinds of supported subtitle files. I have seen one of your errors when using SSA files, but no endless loops as you describe. Could it be that its not working so well with NTSC? I have a PAL DV cam, what about you?

What happens if you convert the SUB file to SRT and then try to import that SRT in DVD-Lab? Did you try that or you tried to convert only the SSA file?


yeah, mine is an NTSC camera... could that be it?

i dont remember whether or not i have tried a SUB to SRT conversion, perhaps I'll try that. I will try and report back. I cant believe it will work for PAL and not NTSC...

perhaps I'm looking at this the wrong way:

Like i told you before, I dont want anything complicated, all i want is the video and audio and this subtitle/DV_datecode thing. No fancy motion chapter menus or anything like that, just various chapter points for 60 minutes of video per disc.

I mean even 5 minute chapter points would be fine too. There are 30+ tapes that I need to transfer, and I dont have the time or desire to create some kind of professional DVD materpiece or something....

I just want everything that was on the camcorder tape into my DVD: the video, audio and the datecode with the ability to turn it on and off. thats all.

if you can help me do this in some other program, like IfoEdit or something, that would be fine too. DVD-Lab has a great interface but if it refuses to accept NTSC subtitle coding, or is conflicting with the program that captures the Datecode, then its useless for me...


EDIT: okay, i converted SUB from DVDATECODE to SRT in Subtitle Workshop. Of course it gave me errors, if i click through all the errors it finally says:

Error generating Subtitle Stream. Start Time of a subtitle < End time of previous subtitle. Check the Timing.

thor300
31st May 2005, 03:08
Was just about to reply when i saw your edit. It could be that it messes up timecodes from NTSC DV, maybe some kind of overlapping problem. I noticed that DV_Datecode was made by someone with a German emailadress, and Germany is also PAL... I was trying to fool DV_datecode into thinking my DV files was NTSC, to test if i could re-create your problem with files that worked fine when in PAL, but the only result was that DV_Datecode just stood there doing nothing =) Maybe its a good idea to email this guy and ask if NTSC is a common problem and if so, does he have a fix to send you. His email is stef[insert at here]skydiver.de

About IFOEdit, you can create chapters, but no menu. If you want to give it a go without menus i rather recommend MuxMan, its simpler and also supports SUP subtitlefiles and chapters (i think). IFOEdit has a more confusing GUI and loads of advanced stuff you dont need.

thor300
31st May 2005, 03:20
If it was me, i would try to run it through DVD-LAB and test it in a software DVD player, or even burn it to an RW disk for testing. You sai you clicked through to the end, then got an error, "Error generating Subtitle Stream. Start Time of a subtitle < End time of previous subtitle. Check the Timing", but after all, the subtitle stream IS generated, right? So you can try to finish the process to see if there are subs. I will give it a try also, im going to manually edit in some overlaps in an SRT file and author a small dvd with DVD-lab.

EDIT: Ok, im done, i got those warnings aboput overlap, but no matter what i did i could not get that final error message. So i cant make a realistic test, sorry.

ou8thisSN
31st May 2005, 03:28
I bet you're right, about that German/Pal thing. I went to the guy's site who created DV_DATECODE, and he links to other programs that are also german, and there are no choices about whether its NTSC or PAL, and I bet its formattted for PAL which is why i see errors and you dont. I ran it through DVD-Lab converting the sub to SRT using Subtitle workshop. Then i ran the compile and I saw the usual errors, i clicked OKay, through them, and compiled a second time, then it went through and created a stream, although I suspect the stream is wrong or mistimed or something... but its a datecode, not a big deal, except that this was a 2 minute file, with a 61 minute video, i might have to click OKAY for 10 minutes or something, which can get annoying or worse.


Also, in subtitle workshop when i load the SUB file, it starts playing the accompanying video along with the subtitle, but every few frames I will see a flash of white around the datecode subtitles, I think this is related to the mis-timed or overlapping frame issue.

Do you know of any DV timecode extractor for NTSC?
EDIT: I wonder if there is a way to extract and make subtitles from the DV AVI stream using Subtitle workshop itself...

I think i am quite sure the reason for this problem is becuase of the NTSC/Pal problem....

thor300
31st May 2005, 03:49
EDIT: I wonder if there is a way to extract and make subtitles from the DV AVI stream using Subtitle workshop itself...


Not that i know of, but i think i have found something. In Subtitle Workshop, after loading the subtitle, you press F10 to fix errors, or the menu route Tools -> Information and errors -> Fix all errors. THEN save it as SRT and try again.

I understand what you are going through with all those tapes to convert, i been there myself. One cant afford reoccuring problems when the job is that big. Its often tempting to find an easy way out and then regret later for taking too many shortcuts. Better do it right the first time. :)

ou8thisSN
31st May 2005, 03:54
Not that i know of, but i think i have found something. In Subtitle Workshop, after loading the subtitle, you press F10 to fix errors, or the menu route Tools -> Information and errors -> Fix all errors. THEN save it as SRT and try again.

I understand what you are going through with all those tapes to convert, i been there myself. One cant afford reoccuring problems when the job is that big. Its often tempting to find an easy way out and then regret later for taking too many shortcuts. Better do it right the first time. :)


it says total errors 2: warning too short duration
Fixed errors:0
i push Fix errors, it wont fix...

EDIT: OKAY!! I dont want to start celebrating yet, but Subtitle workshop found 32 errors in the SRT file, and fixed 30 of them, 2 were the same as before: too short duration

anyway, after the fix, DVD-Lab didnt give me any errors! for the first time...
so i will burn my movie, and take a look at how the subs line up, etc... I think i got it now


btw.. do you happen to know how the AddBorders() function works in Avisynth?

i cropped 60 pixels in my stream in the top and bottom, and then used the bicubicresize to fill the screen. It was suggested that I add black borders and save bitrate... but when i type in:

AviSource("E:\SWD_tape1\CCE Product\ActualTest.avi")
Crop(0,60,0,-60)
SeparateFields()
AddBorders(0,60,0-60)
ConverttoYUY2()
ReInterpolate411()
odd=SelectOdd.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
evn=SelectEven.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
Interleave(evn,odd)
Weave()
DoubleWeave.SelectOdd()

it crashes CCE/Vdub/Avisynth... do you have any idea what i need to put in those values to get them to work?

thor300
31st May 2005, 04:10
Theres some settings under Tools -> Information and errors -> Settings, make sure "overlapping subtitles" are selected both under the Check For and Fix tab. I guess its all fine there, but i have no idea anymore :)

Did DVD-Lab still complain about overlaps?

thor300
31st May 2005, 04:20
Oh, goood news, finally :)
The addborders function should not have negative values. Change that line to Addborders(0,60,0,60). Crop() should have the -60, dont change that one.

Theres not so much bitrate to save with that cropping, with DV one can just "max" out the bitrate anyway and still fit 1 hour in one DVD. It is however true that one can save a little, since home footage is usually shaking too much. I usually encode at CBR 8000 when using PCM audio, can go up to CBR 9500 when using AC3 but am satisfied with 8000.

ou8thisSN
31st May 2005, 04:32
okay, (0, 60, 0, 60) doesnt work, it says CCE Error: max pixel size can be 720 x 540; what i have is 720 x 600. So i need to change it. It works with (0,30,0,30) but I dont know if I am stretching anything doing that... is that the correct number of pixels or what not? I dont know or understand anything about this stuff

thor300
31st May 2005, 04:40
Oh, sorry i didnt notice at first. When addborders comes after Separatefields it must be half the value, so addborders(0,30,0,30), or leave it at 60 and move that line to before the SeparateFields() line.

ou8thisSN
31st May 2005, 22:23
okay, success! the subtitle thing seems to work. I took the .sub file and opened it in subtitle workshop and corrected the errors, and it loaded just fine in DVD-Lab. I compiled and image and it seemed to work as it should, although i just fast forwarded through the clip.

I didnt burn a DVD-R yet because there are still problems with video image quality, especially with when the camera pans. i see lots of ghosting or trailing when the camera pans and its distracting... All I did was take the original stream, edit in vdub, then deinterlace in adobe primiere, and load it up in CCE, and encode 4 pass VBR, 2000 min, 8500avg, 9500max. with the progressive frame flag and zigzag, under the "quality" tab.

the filters I used were Convolution3d and ReInterpolate411. I dont know, i'm not really satisfied with the results.

What filters do you use?

thor300
31st May 2005, 22:44
Im not so found of deinterlacing, on a normal TV it looks better keeping the interlacing. Did you use the script you posted earlier, the one with addborders problems? Theres no deinterlacing there, and therefor no reason to encode it as progressive. Try to remove the Progressive setting in CCE and re-encode. I cant tell you if you should set Top Field First or not, PAL and NTSC are different there i heard, but i think you should uncheck Top Field First for NTSC. Cant say for sure, hope someone else can help.

To encode it faster for test purposes you could set it to CBR 8500 and then reencode at VBR when the CBR result looks ok.

I dont use much filters for DV, and Reinterpolate411 is for NTSC only. Anyway, I just dont think you can blame the filters for that ghosting-thing, you should try to encode it interlaced and preferrably burn it on an RW disk and test on you standalone player.

ou8thisSN
31st May 2005, 22:52
i'm sorry, I wanted to mention that AFTER i edited in Vdub, i took the AVi stream and DeInterlaced in Adobe Primiere, creating a new, progressive stream. After that I used progressive settings in CCE for the final product.

Although I just did a quick trial using the interlaced stream and interlaced settings on CCE, and the ghosting was all but gone, comparable to the original file.

Both my TVs are HDTVs, so i'm trying to get the quality as best as I can, but it seems to be the fault of the camera, as it is only a single-CCD cam thats not professional quality anyway, so its wrong of me to expect DVD-Like Results :)

ou8thisSN
1st June 2005, 18:18
Right... well I just made my first "complaint" DVD-R of one of the home movies. I got the subtitles to work.... mostly, after all those errors. I think they still work although I havent watched the entire video to make sure, I skipped around but i think they are okay.

In relation to the audio, i finally got my Pioneer DVD player to recognize the stream. I ended up using an Official Lisenced Dolby Digital Encoder and that fixed the problem.

I also emailed the author of DV_Datecode explaining the issues i had, and pointed him to this thread, perhaps he'll be persuaded to take a look and create a newer version of his program for us poor NTSC folks so future people wont have to go through the frustrations i had...

Anyway thank you for all your help. I am 99% satisfied with the results!

thor300
1st June 2005, 23:17
What dolby digital program did you use that didnt work with your Pioneer and what pioneer model is that? Im curios coz Pioneer is the only brand of player for me, so i like be aware of potential conversion software problems causing pioneer compatibility issues. My pioneer (DV444, 4-5 years old) plays all kinds of AC3 i ever made with ffmpeg/Besweet.

ou8thisSN
2nd June 2005, 04:32
Pioneer DV-434 I got that about 5-6 years ago too. And yes it had played everything except these DVD-R discs that i made with Ac3machine/Besweet.

I used a program called Surcode for Dolby Digital, it was a plug-in for Adobe Primiere Pro 1.0

it is a lisensed Dolby Digital Encoder... and apprently it works. I will use it as long as it makes my disc compatible with all sorts of DVD player brands... especially the exotic/expensive ones that are usually very picky.

BTW: does it matter if I dont separate the Video from the audio before I encode with CCE using Avisynth? the guide says to but i dont see why that should matter. I have already encoded my audio using the Dolby encoder from the original avi stream with both audio and video.

for some reason that Dolby codec doesnt like it when you separate the video from the audio and encode to .ac3. So after i finished editing in virtualdub i saved a new avi file with both video and audio (didnt disable the audio stream from the streams list). I am encoding now... hopefully it should work just as it did before.