View Full Version : Want to create a simple DV video to DVD app
M1ckey M0use
12th June 2003, 08:31
My father is thinking of buying a DVD burner to put his DV video to DVD. To get him the best quality, he should be using a 'real encoder' instead of the on he has on his video edit software.
But my father isn't a nerd as i am so i want to give him a 'one (maybe two) click solution'. It's just for creating the DVD. No fancy stuff like chapters etc.
I'm a delphi programmer so thats what i'm going to use. I'll publish the app with LGPL license like all of my apps so sources will be availible to all.
I hope to get some help/tips from you guys to point me in the right direction. Maybe you know of command line apps that i haven't heard of. Maybe you have delphi examples for some of the steps that are involved. I know dvd2svcd is a delphi programmer too. Maybe he is willing to share some of his code? (demuxing an avi, calling cce).
As i see it now, i need to use a lot gui programs. One of the plugins of dvd2svcd uses AutoIt (http://www.hiddensoft.com/AutoIt/) for scripting these gui apps. It looks quite a good solution.
I.m.h.o. these are the steps to be taken:
- Get length of AVI (Delphi source: http://www.schedule7.com/avitip/)
- Demux AVI (AutoIt script on virtualdub?)
- Convert audio to AC3 (besweet)
- Calc bitrate to fit movie on DVD (??)
- Encode Movie with CCE (Create AVS, Create ECL, run with AutoIt script?)
- Author DVD (AutoIt script on IfoEdit?)
- Make ISO (ImgTool)
Do you have any comments on this? Can you fill me out with the missing parts (bitrate calc for DVD size) Are there apps that i didn't know of and that are better 'scriptable'?
Rob
http://www.robvonk.com
TFM_TheMask
12th June 2003, 09:57
Hi,
I'm Very interested in this project. I'm trying to implement creating a dvd also in my program The FilmMachine, which at this time creates a (S)VCD from AVI. My program is also written in Delphi so if you need some help just ask. It also uses CCE and creates images with the use of lkimage.dll.
You can also look voor avi-info on this (http://yaai.sourceforge.net/) site (with delphi source).
M1ckey M0use
12th June 2003, 10:51
Thanks for your reaction.
It looks like you're almost there. You only need to add the following:
- Calc bitrate to fit movie on DVD (??)
- Author DVD (AutoIt script on IfoEdit?)
- Make (DVD) ISO (ImgTool, lkVCDimager can't create DVD iso's)
These parts shouldn't be too hard considering the fact that you already managed to control CCE from your delphi program. And creating an iso isn't a 'must have' as the nero software i got with my burner can burn the files without an iso.
Question: Is there any reason why you don't release the sources?
Note: I don't hope you're using code of Avi-info in your program because Avi-info was released under GPL (although i doubt that you can release under GPL because Delphi libraries are copyighted. But thats another discussion) and we all know what that means..
Rob
TFM_TheMask
12th June 2003, 13:46
I didn't use the code of Avi-Info, because I didn't know the program when I was searching on how to get avi information. I found a lot of code snippets on a view forums which I put together.
I use avi-info a lot for getting quick info on a movie I downloaded.
It also helped me to get a better look on avi-files. Also the audio extraction part of the first version did not work on my computer, I had to make my own version of this.
Why I don't release my code is because I am not satisfied with it and I have a lot to improve. Maybe later when I am quite satisfied with the outcome and when all wishes are implemented I will release the sourcecode.
Latexxx
12th June 2003, 15:50
http://www.lukesvideo.com/ratesandsizes.html
Nocturno
13th June 2003, 01:39
Demux AVI (AutoIt script on virtualdub?)
you can make an virtualdub .VCF file and run virtualdub commandline
- Calc bitrate to fit movie on DVD (??)
bitratewithoutaudio = targetsize(MB) * 8192 / movietimeinseconds
but you probably guessed that.. :)
- Author DVD (AutoIt script on IfoEdit?)
working on that too .. it's a bit tricky but do-able..
in vb it's stuff like this (with the autoit.dll)
ifotitle = "IfoEdit v0.9"
Shell homepath$ + "ifoedit/ifoedit.exe", vbNormalFocus
Sleep 500
WinWait ifotitle, "", 0
BlockInput 1
Sleep 500
Send "!d"
Send "a"
'enter ifoedits authoring mode
Convert audio to AC3 (besweet)
again simple commandline stuff..
i've made an dvd2dvd and a dvd2svcd app in vb that do the same things using cce as encoder.., be happy to help but i don't know much delphi..
M1ckey M0use
13th June 2003, 07:03
More reactions already than i expected.
Nocturno: Nice info about running things from command line.
I got the idea for using AutoIt from MDVDAUTH, the plugin to create DVD's with DVD2SVCD. This guy created an AutoIt script for ifoedit. You can download the program with source here:
http://www.iespana.es/jsoto/
It will probably help us finding the right commands.
Rob
Ookami
13th June 2003, 08:16
Rob, try to find the sources from the old releases of FitCD, it could help quite a bit.
Also, I asume you know Doom9's source page in your sleep ;) .
Good luck.
Mijo.
M1ckey M0use
13th June 2003, 11:06
Ookami:
I'm a regular visitor of doom9.org, checking the news every day. I've backed up a lot of movies with DVD2SVCD. Creating DVD's is a whole new area for me because i've got my burner just one week now. So i have to dig in to that.
I know FitCD and i think it's a good tool to calculate the avg bitrate for SVCD's. But i'm looking for a way to calculate the bitrate for DVD's. Probably try to convert some and look what overhead the IFO and VOB stuff create. It's not top priority (for me) to get it right on the exact megabyte as DVD's are quite large and most home movies will fit on one DVD easily. Maybe others want a more accurate method for large movies.
And yes, i know the sources page of doom9.org. But most programs are written in C and thats not my strongest point.. :)
Nocturno:
I can't seem to find a way to create a vcf for saving the wav from an avi... I think it's more for processing filters etc. i think. But you can correct me if i'm wrong.
Update:
It seems that FitCD has some DVD options now too. I'll check it out..
Update 2:
I remembered FitCD being Open Source under GPL (http://forum.doom9.org/showthread.php?s=&threadid=13481&highlight=fitcd) but nothing about that on the new website anymore (http://mitglied.lycos.de/fitcd/).
Nocturno
14th June 2003, 07:11
vcf for demuxing .wav from .avi
----------------
VirtualDub.Open("DRIVE:\\PATH\\TO\\AVI.avi",0,0);
VirtualDub.audio.SetSource(1);
VirtualDub.audio.SetMode(1);
VirtualDub.audio.SetInterleave(1,500,1,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression();
VirtualDub.audio.EnableFilterGraph(0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.audio.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveWAV("DRIVE:\\PATH\\TO\\TARGETAUDIO.wav");
VirtualDub.Close();
-------------------------------
you get the picture .. replace the drive and pathstrings by the filenames..
start (i used nandub in an old program of mine.. should work with vdub too
nandub.exe /s"DEMUX.VCF" /x /r
the quotes are for filenames/paths with spaces.. /x is exit when doen.. can't remember /r .. /s is start
nan/virtualdub .vcf files need double slashes in paths..that's something to remember..
d:/test/movie.avi is in a vcf file :
d://test//movie.avi
good luck
DDogg
15th June 2003, 18:15
Rob, I can't help you with much except to suggest you take just a few minutes and encode a DV segment with CCE, using all the tricks and then do the same with ProCorder by just dragging the source into ProCorder and selecting your output. I think you will see a radical difference specifically when source is interlaced DV, especially if your dad shoots DV like I do (less than perfect lighting, shakes, bad pans, etc.). The difference at DVD bitrates may not be as large as those readily apparent on Interlaced DV > SVCD encodes, but it should only take a small bit of time for you to tell if that direction is worth pursuing.
M1ckey M0use
15th June 2003, 21:35
Ok, ddog, i'll check it out. Dunno what the quality of his moves are. I get a test sample next weekend. He has a 3 CCD Sony cam so if the quality is bad, it's not the camera's fault :) I'm testing now with some clips that i've captured with my TV card.
For the curious. My first scratch sources can be downloaded here:
http://www.robvonk.com/dvvideo.zip
Don't expect a working program. There's not even a version number in it. I'll update the sources now and then. When i do, i'll post a note here.
Have the demuxing and besweet stuff done. Buzy now with calling CCE. I managed to call CCE with Autoit but Now i have to monitor when CCE is finished. I'll see what has to be done for procoder.
My first tests with ifoedit authoring were not very successful :(. The AC3 audio is awfull out of sync. When i mux the demuxed WAV with virtualdub, the audio is in sync. Can't figure out why that is. I've searched for other freeware solutions for DVD authoring but i can't find one.
Rob
Nocturno
15th June 2003, 22:28
for cce:
i made autoit.dll wait for the window with the term "encoding myfilename.m2v" (or something like that)in it
(winwaitactive) if i remember correctly
then winwaitactive the normal cce window title.
that workes for 2pass as wel as cbr, because the firs pass doesn't produce a myfilename.m2v so it waits for that window.
(don't have my sources with me here at work so it's off the top of my head).
M1ckey M0use
17th June 2003, 09:54
@ddog: i tried procoder and it sure looks nice. The droplet is easy to call from a program and the quality of the output is good (probably better than cce) with my tv capture card captured clip. Do you have any tips how to find out if your source is odd/or even lined?
@Nocturno: That is a reasonable solution that might work. I was thinking of creating a loop like this:
repeat
repeat
Do some updating/monitoring stuff like the progressbar of dvd2svcd
waitforsingleobject with timeout
until not timed out but finished
That should be doable.
My now i might be concentrating on procoder as the output really looks nice for my captured clips.
to be continued..
TFM_TheMask
22nd June 2003, 19:47
Hi there,
I made a dll from the AviInfo module I use in my program The FilmMachine. You can extract all information from an avi-file and even extract the audio from it.
Maybe you can use this AviInfo.dll in your program and skip the VirtualDub part. Example in delphi is included.
You can download the dll at: http://members.home.nl/thefilmmachine/Download/Avi Info dll v0.9.7.rar
M1ckey M0use
23rd June 2003, 07:14
Okay, thanks. I'll take a look at it.
This weekend i got some sample videos to play with and i must say that the quality of procoder suprised me. So i think thats the way to go.
I also found out that it's hard to find simple DVD authoring programs that support m2v. So i probably have to stick with Ifoedit for that.
Rob
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.