View Full Version : Dubman MPEG2 decoding issue
Flintz
9th October 2007, 10:50
Hi,
I have a little problem with batch-decoding several MPEG2-files via Dubman. The situation is a followed:
1. I have created all the d2v project files for the MPEG2 files.
2. I opened Dubman and created a job for running all the d2v files and converting them to AVI files.
For that I used the following AVS skript in Dubman:
MPEG2Source("%1")
ConvertToYUY2(interlaced=true)
3. Let Dubman run
The problem was now, that dubman skipped all the files, so there is something wrong there. For debugging I saved the temporal-created dubman.avs file in the "Documents and Settings" folder, to see if the parsing is correct.
And now comes the funny part: When I open the dubman.avs in the "Documents and Settings" folder manuelly I get an error message about VirtualDub being unable to open one of the input files, BUT when I copy the very same dubman.avs to a different folder (JUST different folder no change in the content of the file) I am suddenly able to open the avs-file via VirtualDub without any problems.
Does anyone have an idea whats causing this weird behaviour?
P.S.: Dubman worked without problems on converting some WMV files...so it seems like it is related somehow to the MPEG2Source command or the dgdecode.dll in the AVISynth-Plugins folder
Flintz
9th October 2007, 14:14
Ok, here are some filespaths:
the media-files are located in:
D:\MPEG2
are named mpeg2_crowdrun_xx.mpg while xx is an increasing number for increasing bitrates:
One exemplary *.d2v:
DGIndexProjectFile13
1
\MPEG2\mpeg2_crowdrun_04.mpg
Stream_Type=0
MPEG_Type=2
iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=16:9
Picture_Size=1920x1080
Field_Operation=0
Frame_Rate=25000 (25/1)
Location=0,0,0,D4C
d00 1 0 0 0 0 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
d00 1 0 40039 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 434646 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 821551 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 1203727 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 1589483 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 1976397 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 2365796 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 2760744 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 3151774 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 3550810 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 3954851 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 4384137 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 4795378 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 5231025 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 5685321 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 6142536 0 0 92 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2
900 1 0 6510304 0 0 32 92 b2 a2 b2 a2 b2 a2 b2 a2 b2 a2
900 1 0 6897100 0 0 92 ff
FINISHED 100.00% VIDEO
The temporary dubman.avs created in \C:\Documents and Settings\Mediateket
looks like this:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\dgdecode.dll")
MPEG2Source("D:\MPEG2\mpeg2_crowdrun_08.d2v")
ConvertToYUY2(interlaced=true)
And the job-file saved by DubMan looks like this:
// VirtualDub job list
// This is a program generated file -- edit at your own risk.
// Job file generated by DubMan VirtualDub Job Manager
//
// $numjobs 19
//
// $job "MPEG2 to AVI"
// $input "C:\\Documents and Settings\\Mediateket\\dubman.avs"
// $output "D:\\MPEG2\\mpeg2_crowdrun_04.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script
VirtualDub.Open("C:\\Documents and Settings\\Mediateket\\dubman.avs",0,0);
VirtualDub.audio.SetSource(1);
VirtualDub.audio.SetMode(0);
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.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(11);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetSmartRendering(0);
VirtualDub.video.SetPreserveEmptyFrames(0);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.audio.filters.Clear();
VirtualDub.SaveAVI("D:\\MPEG2\\mpeg2_crowdrun_04.avi");
VirtualDub.Close();
// $endjob
cutted it off, just the first job.
DGIndex and DGDecode.dll are "dgmpgdec148_20060720" downloaded from the avisynth.org webpage.
I've verified the problem on two different computers.
Guest
9th October 2007, 15:04
What is the full path of the different folder that you move the AVS file to to make it work?
Try editing the D2V to put d: before the source file path and let me know if that changes things.
Consider using latest DGIndex/DGDecode:
http://neuron2.net/dgmpgdec/dgmpgdec150b5.zip
Flintz
9th October 2007, 15:18
Ok, I've found out when exactly the error occurs:
Whenever the media-files (*.d2v) are not on the same partition as the *.avs file the error occurs.
Adding a D: in front of the line of the path in the *.d2v files solved the problem. Seems like DGIndex is (even with absolute paths enabled) just making absolute paths regarding to the partition without the drive-letter. But thats a bit strange?!
Guest
9th October 2007, 15:28
Yes, I'm surprised about that too. Can you try with the latest DGIndex?
Flintz
9th October 2007, 15:32
I have found out another thing ;) (yeah, discovery-day):
The error doesn't occur when DGIndex is being executed manually, but I am using a little batch file, I've found in the forums here:
set filetype=*.mpg
set dgindex=C:\Programfiler\AviSynth 2.5\DGIndex.exe
for /R %%A in (%filetype%) do IF NOT EXIST "%~1%%~pnA.d2v" "%dgindex%" -IF=[%~1%%~pnxA] -OF=[%~1%%~pnA] -exit
Guest
9th October 2007, 16:16
Ask the batch file author to fix it so it retains the drive letter.
Flintz
10th October 2007, 08:16
I've found the solution, the corrected script looks like this:
set filetype=*.mpg
set dgindex=C:\Programfiler\AviSynth 2.5\DGIndex.exe
for /R %%A in (%filetype%) do IF NOT EXIST "%~1%%~pnA.d2v" "%dgindex%" -IF=[%~1%%~dpnxA] -OF=[%~1%%~dpnA] -exit
Notice the "d" in front of the pnxA-argument. As you can guess "d" stands for drive ;) now its working
Guest
10th October 2007, 14:08
Cool. I hope you have notified the batch file author so that others can benefit from your analysis.
snowden
10th October 2007, 16:47
weird stuff, i never thought about the 'alternate partitions' problem; I just assumed that and avs or d2v filepath pointed to a file in any directory relative to the partition it is in itself. Indeed, it does do this, I just never thought about trying to access files in another partition.
Anyway, glad you figured it out, Flintz. I'd be interested to know where you got the info that you should add 'd' to the argument.
In case you are wondering, I originally got the batch command here:
http://forum.doom9.org/showthread.php?t=114932
Also, i found this to be of very good help with the batch commands:
http://en.wikibooks.org/wiki/Guide_to_Windows_commands
I'll make sure to update my post to take this into account. :)
Flintz
10th October 2007, 16:58
How I found out how to add the 'd'? I guessed ;) No honestly: I didn't know what the pxnA did, so I disabled one letter at once:
pxn: Didn't work at all
pnA: Ah, extension missing
pxA: Ah, filename was missing
xnA: Ah, path missing
So I just guess that a 'd' could add the drive-letter and I guessed correct :D
snowden
10th October 2007, 17:15
Brilliant, the process of elimination. Took me a lot longer than that because I found that if I changed the order of the commands positions (i.e. not the arguments), nothing worked, and I spent hours trying to figure out what was wrong until i realised i had moved the "%dgindex%" variable into the wrong position in the command. ;)
I have been using a vbscript file to batch encode my avs files that automatically makes a batch virtualdub jobs file, and i found that the limitation in it only allowed me to do a single-pass on encoding; does DubMan make it easy to do 2-pass? I've never used it before, and seeing as you use it yourself...
I also tweaked the same file to batch mux the avi to an mp3 or whatever audiotype i wish...i'll update that next.
EDIT: Dubman does work for batch 2-pass compression of videos. :D
Flintz
10th October 2007, 17:24
@neuron2: Right, you gave me the correct direction to look for the problem ;)
@snowden: I cannot tell you how well DubMan works with 2-pass encoding, because I use it myself just for batch-conversion of big amount of little clips (preparing a subjective videotest here). But dubman ist definetly able to handle 2-pass encoding, because it is explicitly stated in the documentation at the advanced example: http://dubman.sourceforge.net/help/example.html
I guess its working that way that you create two consecutive tasks with differen *.vcf virtualdub-settings.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.