View Full Version : Codec Setting for programming
iNFO-DVD
21st April 2005, 23:01
If I were to program some application of some sort and wanted to tell the program XVID pass1 1000 bitrate, then the equivent for pass 2, how can one achieve this?
I dont want the codec window display I want to do it automatically, any idea's? If not xvid, does divx let u?
unmei
22nd April 2005, 14:57
i think you can configure all of xvid by setting its registry keys (i've never done it tho).
PS: in a 2-pass scenario bitrate has no meaning in the first pass (and the config window doesn't let you set it until second pass..).
iNFO-DVD
22nd April 2005, 18:11
Thanks I'll look into it. I also noticed both XVID and DivX have reg entries for bitrate e.t.c.
Anyway, thanks for replying, it was my first post :)
unmei
22nd April 2005, 20:12
oh welcome and good stay then (i didn't notice before) :D
dungweaver
23rd April 2005, 05:49
Well I found a way to invoke 2pass XviD (under VirtualDub) and via a VBS script. All it needs is for you to have defined the settings and bitrates in VirtualDub config files (vcf's)
I don't think the actual Matrix being used is stored in the vcf, it seems to use the 'last used' one; perhaps via the Registry.
Sample code follows. Prompts for a directory then does rest based on file chosen. This one is used for converting SD TV mpeg recordings.
YMMV plus IANAD (I Am Not A Developer)
VirtualDubPath = "C:\Winapps\VirtualDub-MPEG2\VirtualDub.exe "
p1vcf= "C:\Winapps\VirtualDub-MPEG2\sdDTV_ulr_592x336_trel_AQ_pass1_1100.vcf"
p2vcf= "C:\Winapps\VirtualDub-MPEG2\sdDTV_ulr_592x336_trel_AQ_pass2_1100.vcf"
'
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "My own TV recordings |*.mpg"
objDialog.InitialDir = "D:\temp\Captured Videos\myPVR"
intResult = objDialog.ShowOpen
If intResult = 0 Then
Wscript.Quit
Else
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(objDialog.FileName)
origFile = objFSO.GetAbsolutePathName(objFile)
TmpFile = "C:\temp\C re-encoded_AVI\tmp_" & objFSO.GetBaseName(objFile) & ".avi"
NewFile = "C:\temp\C re-encoded_AVI\" & objFSO.GetBaseName(objFile) & ".avi"
' Wscript.Echo origFile,TmpFile,NewFile
vdubargs1 = VirtualDubPath & " /s" & p1vcf & " /p" & Chr(34) & origFile & Chr(34) & "," & Chr(34) & tmpFile & Chr(34) & "/r /x"
vdubargs2 = VirtualDubPath & " /s" & p2vcf & " /p" & Chr(34) & origFile & Chr(34) & "," & Chr(34) & newFile & Chr(34) & "/r /x"
' start of VirtualDub code
Dim WSHShell, exit_code
Set WSHShell = WScript.CreateObject("WScript.Shell")
exit_code = WSHShell.Run(VirtualDubPath & vdubargs1, 0, True)
exit_code = WSHShell.Run(VirtualDubPath & vdubargs2, 0, True)
' end of VirtualDub code
'End of inResult check follows
End If
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.