Log in

View Full Version : BatchMux plugin - MuxMan authoring with DVD2SVCD


Pages : 1 [2] 3 4

Sir Didymus
22nd May 2007, 11:51
That's really odd, if confirmed... :confused:

Just checked in the code...
In case of DVD chapters, the process performed by Mplex_hack for producing the celltimes.txt file is straightforward...

It simply looks for the file "dvd2svcd chapters file.ini" in the source folder, copying the chapters points, one to one, from one file to the other...

Fishman0919
22nd May 2007, 12:23
The movie is The Painted Veil R1... I run it on one pc with dvdauthor.exe and one with BatchMux both using HC .21. Both completed but the one done with BatchMux has the chapter points off. I used chapterxtractor and got the chapter points from the rip file from DVD2DVD. I then manually author it with Muxman and that worked fine.... chapter point are correct.

Sir Didymus
22nd May 2007, 13:25
So, I am interested on three files in your system:

1) The "dvd2svcd chapters file.ini" in your source folder
2) The Celltimes.txt in your working folder, produced by the BatchMux plugin
3) The Celltimes.txt, which is working fine when manually authored, extracted with chapterxtractor

Could you check for the differences among the three ?
Or post them, or send to me at:
sir_didimus (at) libero.it

Thanks!
SD

manolito
22nd May 2007, 20:30
Here in PAL land I cannot reproduce the problem. Did some short test encodes using HC 0.21 and CCE 2.70, and in all cases the chapter points were the same.

Could this be a NTSC issue? DVDAuthor gets its chapter information in absolute time values (like 01:55:12) while BatchMux needs frame numbers. So for BatchMux the frame rate has to be considered also.

Is there any frame rate conversion involved in the conversion process? Like going from hard telecined to soft telecined or vice versa?

Cheers
manolito

Mr_Odwin
22nd May 2007, 20:41
An issue that I had with Muxman was that the frame numbers used as chapter points assume an NTSC framerate of 30 instead of 29.97. Could this be the issue? If the difference drifts slowly over the title then it's possible this is the case.

Fishman0919
22nd May 2007, 21:47
This is from Matrix Revolutions R1... I already had it rip As an .ISO on my HD

dvd2svcd chapters file.ini

[CHAPTERS]
Chapter0001=0
Chapter0002=5616
Chapter0003=10836
Chapter0004=14833
Chapter0005=21177
Chapter0006=25833
Chapter0007=33853
Chapter0008=43280
Chapter0009=51173
Chapter0010=56893
Chapter0011=61804
Chapter0012=67180
Chapter0013=70524
Chapter0014=74624
Chapter0015=83424
Chapter0016=86740
Chapter0017=89876
Chapter0018=97816
Chapter0019=101372
Chapter0020=107236
Chapter0021=112736
Chapter0022=119588
Chapter0023=123588
Chapter0024=128369
Chapter0025=132120
Chapter0026=139305
Chapter0027=146592
Chapter0028=150852
Chapter0029=155496
Chapter0030=160441
Chapter0031=165544
Chapter0032=169033
Chapter0033=172896

CellTimes.txt

5616
10836
14833
21177
25833
33853
43280
51173
56893
61804
67180
70524
74624
83424
86740
89876
97816
101372
107236
112736
119588
123588
128369
132120
139305
146592
150852
155496
160441
165544
169033
172896

ChapterXtractor chapters.txt

0
7020
13545
18541
26471
32291
42316
54100
63966
71116
77255
83975
88155
93280
104280
108425
112345
122270
126715
134045
140920
149485
154485
160461
165150
174131
183240
188565
194370
200551
206930
211291
216120

I set ChapterXtractor to 30 fps

again the BatchMux ver is off but the manually author Muxman is right on

An issue that I had with Muxman was that the frame numbers used as chapter points assume an NTSC framerate of 30 instead of 29.97. Could this be the issue? If the difference drifts slowly over the title then it's possible this is the case.

yep, with 29.97 fps by the end of the movie the chapters are off

but in this case I talking mins off not just a few frames or sec

manolito
22nd May 2007, 23:53
I think I figured it out:

DVD2SVCD always calculates the chapter frame numbers based on the encoding frame rate. For a NTSC telecined film this would be 23.976 fps. After the encode Pulldown is applied to reach the required playback rate of 29.97 fps. This means that all DVD2SVCD chapter points will be off.

I wrote a small batch file to verify my theory:

:fixparams
IF !%1 == !-f GOTO getfolders
SHIFT
GOTO fixparams

:getfolders
SET Muxed_Folder=%~dp4

SET commandline=%1
:loop
SHIFT
IF !%1==! GOTO mplex_hack
SET commandline=%commandline% %1
GOTO loop

:mplex_hack
mplex_hack.exe %commandline%

Copy %Muxed_Folder%CellTimes.txt OldChp.txt
IF EXIST NewChp.txt DEL NewChp.txt
FOR /f %%a IN (OldChp.txt) DO CALL :Write %%a

COPY NewChp.txt %Muxed_Folder%CellTimes.txt
IF EXIST ???Chp.txt DEL ???Chp.txt

EXIT

:Write
SET /A Chapter=%1 * 29970 / 23976
ECHO %Chapter% >> NewChp.txt


Save this file as "Pulldown_Mplex_hack.bat" and save it in your DVDAuthor folder. Then point DVD2SVCD to this batch file instead of the original "Mplex_hack.exe".

If it works then Sir Didymus has some work to do. :devil:

The chapter points only have to be recalculated if DVD2SVCD applies Pulldown (or if DGIndex decides that Force Film has to be applied). For PAL nothing has to be done, and for NTSC real interlaced video also no recalculation should be necessary.

Please let me know if it works...

Cheers
manolito

Fishman0919
23rd May 2007, 04:12
Sorry, no good... same result

CellTimes.txt

11972
18792
27748
33320
46856
54312
69740
81517
87604
99624
112520
119780
132644
148357
158601
169408
184292
186797

ChapterXtractor chapters.txt

0
14966
23490
34685
41650
58570
67890
87175
101896
109505
124530
140650
149725
165805
185446
198251
211760
230365
233496

Sir Didymus
23rd May 2007, 08:23
I think I figured it out:

DVD2SVCD always calculates the chapter frame numbers based on the encoding frame rate. For a NTSC telecined film this would be 23.976 fps. After the encode Pulldown is applied to reach the required playback rate of 29.97 fps. This means that all DVD2SVCD chapter points will be off.

I wrote a small batch file to verify my theory...

If it works then Sir Didymus has some work to do. :devil:
...
Please let me know if it works...

Cheers
manolito

Me too I think Sir Didymus has some work to do... :cool:

From the logs of Fishman0919 it is clear your explaination is correct: all chapter point should be multiplied by the factor of 1.25 when DVD2SVCD applies pulldown flags to an NTSC source.

The problem is: how to implement the bugfix in a clean way ?

I have a couple of NTSC DVD in my collection... Not sure about they are telecined or not, however. I will try to replicate the issue on my PC in the next days...

For the moment thanks to Fishman0919 for the bug report and the testing and double thanks to manolito for the support and co-operation in the developement and improvement of the BatchMux plugin...

The bug will be fixed ASAP, I am quite confident about...

EDIT: Hmmm... Maybe I have a nice idea...

:sly:

I noticed that apart the "dvd2svcd chapters file.ini" file, also the "DVD Maestro Chapters File.chp" is produced by DVD2SVCD. This file (apparently) contains chapters in the standard NDTC format: hh:mm:ss:ff. Using this file instead of the former, since BatchMux.exe is already enabled to accept this format, should solve the issue...

Am I right ?

Are there any implications in adopting always this second timecode file instead of the classical Celltimes.txt ?

Cheers,
SD

Nick
23rd May 2007, 11:13
EDIT: Hmmm... Maybe I have a nice idea...

:sly:

I noticed that apart the "dvd2svcd chapters file.ini" file, also the "DVD Maestro Chapters File.chp" is produced by DVD2SVCD. This file (apparently) contains chapters in the standard NDTC format: hh:mm:ss:ff. Using this file instead of the former, since BatchMux.exe is already enabled to accept this format, should solve the issue...

Am I right ?

Are there any implications in adopting always this second timecode file instead of the classical Celltimes.txt ?

Cheers,
SD

There is one. If the conversion is done from AVI, the DVD Maestro chapters file is empty. So if chapter info is gained from this file, AVI-to-DVD conversions will presumably have no chapters.

Sir Didymus
23rd May 2007, 13:12
OK. When I wrote "always" I really meant "both for PAL and NTSC, in the dvd2dvd + dvd chapters mode".

In the avi2dvd mode, the DVD chapters option is meaningless right ? I mean, only fixed chapters are possible in this case, and for fixed chapters the overall process is not affected by this bug...

Do you agree ?

Nick
23rd May 2007, 13:15
Doh! Yes, my bad.

Sir Didymus
23rd May 2007, 13:20
:)

So, it takes more to discuss than to code it...
I hope to have a new beta to test soon...
this evening, most probably...

Cheers,
SD

manolito
23rd May 2007, 13:56
But I see a problem in DVD2DVD mode when fixed chapters are selected. In this case the chapter files created by D2S are both empty, but you still cannot use the old way of chapter creation when Pulldown is used.

In this case Mplex_hack.exe calculates the chapter points from the movie length which it reads from the D2S project file, right? This routine also must be modified. It is actually pretty easy, because there is an entry in the project file "Pulldown=No" or "Pulldown=Yes". If yes then the the chapter points have to be multiplied by 1.25.

@fishman0919
I just ran my quick and dirty batch file here, and it worked. The batch file has to be in the same folder where Mplex_hack.exe is located (probably, but not necessarily the DvdAuthor folder).

Cheers
manolito

Fishman0919
23rd May 2007, 14:10
@fishman0919
I just ran my quick and dirty batch file here, and it worked. The batch file has to be in the same folder where Mplex_hack.exe is located (probably, but not necessarily the DvdAuthor folder).

Cheers
manolito

I have a sub folder in DVDAuthor ... BatchMux

C:\Program Files\DVD2SVCD\DVDAuthor

C:\Program Files\DVD2SVCD\DVDAuthor\BatchMux

I put all the files, both Mplex_hack.exe and Pulldown_Mplex_hack.bat are there.

I am running a new disc now, just about fininhed encoding.

Will let you know the results.

manolito
23rd May 2007, 15:34
OK, just finished testing another workaround which should work for any source, whether Pulldown is involved or not.

This time I hijack the authoring process, not the muxing. Here is the file, I call it "Run_DvdAut_hack.bat"

SET Muxed_Folder=%~dp2
%SYSTEMROOT%\system32\FIND "SourceFolder" /i "%Muxed_Folder%MPlex_log.txt" > temp.txt
FOR /f "tokens=1,2 delims=--> " %%a IN (temp.txt) DO SET SourceFolder=%%b\
IF EXIST temp.txt DEL temp.txt

%SYSTEMROOT%\system32\FIND /C "Pulldown=No" "%SourceFolder%dvd2svcd project file.d2s"
IF NOT ERRORLEVEL 1 goto Author

Copy %Muxed_Folder%CellTimes.txt OldChp.txt
IF EXIST NewChp.txt DEL NewChp.txt
FOR /f %%a IN (OldChp.txt) DO CALL :Write %%a

COPY NewChp.txt %Muxed_Folder%CellTimes.txt
IF EXIST ???Chp.txt DEL ???Chp.txt

:Author
DvdAut_hack.exe %1 %2
EXIT

:Write
SET /A Chapter=%1 * 125 / 100
ECHO %Chapter% >> NewChp.txt


Put the file where "Dvd_Aut_hack.exe" is located and point DVD2SVCD to this batch file instead of the original "DvdAut_hack.exe". (Make sure to get rid of the previous batch file which hijacked "Mplex_hack.exe")

How it works:
The file needs to get the "Source Folder" where the D2S project file is located. This information is extracted from the Mplex log file. Then the project file is searched for the "Pulldown=" entry. If "Pulldown=No" then DvdAut_hack.exe is called without doing anythig, otherwise the chapter points are modified.

Cheers
manolito

Sir Didymus
23rd May 2007, 15:46
But I see a problem in DVD2DVD mode when fixed chapters are selected. In this case the chapter files created by D2S are both empty, but you still cannot use the old way of chapter creation when Pulldown is used.

In this case Mplex_hack.exe calculates the chapter points from the movie length which it reads from the D2S project file, right? This routine also must be modified. It is actually pretty easy, because there is an entry in the project file "Pulldown=No" or "Pulldown=Yes". If yes then the the chapter points have to be multiplied by 1.25.
...


You are right!
Actually fixed chapters are calculated until the upper boundary of MovieFrames is reached. This value should also be scaled. (I mean, actually the effect of the bug should consist in the fact that the chapter points should be precise but the last chapters are most probably missed)...

Your suggestion of reading (and using) the Pulldown=No or Yes flag is much clean than my previous idea...

Do you know if this Pulldown=No or Yes flag is set both in avi2dvd and in dvd2dvd mode ?

Cheers,
SD

EDIT: be careful. If you hack the process at the authoring stage you change the chapter points both for the avi2dvd and for the dvd2dvd mode. When the mode is avi2dvd (fixed chapters), actually - IMHO - the effect of the bug is not the underestimation of the chapter points of the factor of 1.25, but the missed inclusion of the last chapters in the celltimes.txt file. Actually the code used for the fixed chapters generation is the following (in case of NTSC VideoFps --> 30):


// fixed chapters generation
if (MovieFrames>MIN_FR_LAST_CHAP)
{
for (ChapPoint=ChaptersLength*VideoFps;
ChapPoint<MovieFrames-MIN_FR_LAST_CHAP;
ChapPoint+=(ChaptersLength*VideoFps))
{
fprintf(out,"%I64d\n", ChapPoint);
}
}

manolito
23rd May 2007, 16:32
Do you know if this Pulldown=No or Yes flag is set both in avi2dvd and in dvd2dvd mode ?

Yes, the pulldown flag is also used (and of course set to NO) in AVI2DVD mode.

EDIT: be careful. If you hack the process at the authoring stage you change the chapter points both for the avi2dvd and for the dvd2dvd mode. When the mode is avi2dvd (fixed chapters), actually - IMHO - the effect of the bug is not the underestimation of the chapter points of the factor of 1.25, but the missed inclusion of the last chapters in the celltimes.txt file.

Well, I do not see any problems with this approach so far. Remember that my batch file only jumps into action if "Pulldown=Yes". If "Pulldown=No" which is true for all AVI2DVD conversions, the batch file does absolutely nothing. It does not touch the "Celltimes.txt" which has been created by Mplex_hack.exe.

Since I never have to deal with NTSC stuff, my main question is if my logic is solid. I assume that the chapter correction should take place whenever pulldown is used. No other condition is checked. Do you agree with my assumption?

Cheers
manolito

Sir Didymus
23rd May 2007, 17:40
Yes and No...

I mean, two different type of corrections should be implemented when the pulldown flag is "Yes":

1. In avi2dvd mode, pulldown flag is "No", and no corrections should be applied. (By the way, how 24fps avi files are handled in DVD2SVCD ?)

2. In dvd2dvd mode, when DVD chapters are used, if pulldown flag is "Yes" the number of chapters in the celltimes.txt file is correct, but all of the DVD chapters should be multiplied by 1,25.

3. In dvd2dvd mode, when fixed chapters are used, if pulldown flag is "Yes" the number of chapters in the celltimes.txt file is wrong (since the MovieFrames in my post above is relative to the encoded frames, I think), but the position of the chapters itself should NOT be multiplied by 1,25 since the chapter points are calculated using the chapter length (in seconds) and the VideoFps, which is always 30 for NTSC, and it is relative to PRESENTATION frames, not to ENCODED frames...

Am I wrong ?

Nick
23rd May 2007, 17:47
1) I think Manolito is incorrect on this one. If you feed an AVI at 23.976 (NTSC film) framerate, pulldown is applied and the pulldown flag is set to Yes. Just run my test piece

[VOBFiles]
VobName_0=D:\test.avi
...
Deinterlace=None
Pulldown=Yes
Width=720
Height=480

2) That is how I understand it

3) Not sure. I don't have an NTSC DVD to hand. Only PAL DVD's and NTSC AVI footage.

Sir Didymus
23rd May 2007, 18:56
I coded a quick bug correction release of Mplex_hack as follows:

1. In avi2dvd mode, when pulldown flag is "Yes", the MovieLenght variable (which is used to generate fixed chapters) is stretched by the factor of 1,25 - but only when this variable is generated starting from encoded frames, e.g. when using CCE 2.70 as encoder... :)

2. In dvd2dvd mode, when DVD chapters are used, if pulldown flag is "Yes", the DVD chapters are stretched by the factor of 1,25.

3. In dvd2dvd mode, when fixed chapters are used and pulldown flag is "Yes", again the MovieLenght variable (which is used to generate fixed chapters) is stretched by the factor of 1,25 - but only when this variable is generated starting from encoded frames.

Edit 20-06-2007 Link removed. See first page for the last available release...

Hem... Fishman0919... Any feedback will be appreciated...

Fishman0919
23rd May 2007, 20:04
Hem... Fishman0919... Any feedback will be appreciated...

I just started Superman Returns R1 and with Mplex_hack_beta_1.0

I will let you know of the results, any other info you need... please let me know.

manolito
23rd May 2007, 20:22
Since I have no NTSC Film DVD source, I had to create one for testing first.

Results:
For DVD2DVD with fixed chapters you are absolutely right:

3. In dvd2dvd mode, when fixed chapters are used, if pulldown flag is "Yes" the number of chapters in the celltimes.txt file is wrong (since the MovieFrames in my post above is relative to the encoded frames, I think), but the position of the chapters itself should NOT be multiplied by 1,25 since the chapter points are calculated using the chapter length (in seconds) and the VideoFps, which is always 30 for NTSC, and it is relative to PRESENTATION frames, not to ENCODED frames...

Am I wrong ?

The number of chapters is wrong, and the chapter positions should NOT be multiplied by 1.25. With the new Mplex_hack Beta the chapter points came out correctly (using QuEnc).


For AVI2DVD conversions my knowledge is very limited. All my AVI sources are 25 fps. As Nick stated for a 23.976 AVI D2S does apply pulldown. If the chapter points have to be corrected in this case depends on how Mplex_hack.exe creates the fixed chapters.

And what happens if the source AVI has a non standard frame rate? Does D2S automatically convert the frame rate to a DVD compliant rate? I have no idea.

Anyway, I'm gonna do some more testing with the new Mplex_hack.exe. I'll report back...

Cheers
manolito

Sir Didymus
23rd May 2007, 20:37
...I will let you know of the results, any other info you need... please let me know.

You are doing exactely what I need (testing, from NTSC land) for correcting the nice bug you have discovered.

That's very much appreciated!

Nick
23rd May 2007, 20:40
And what happens if the source AVI has a non standard frame rate? Does D2S automatically convert the frame rate to a DVD compliant rate? I have no idea.

Yes, that's exactly what it does, and very, very badly as a rule!!
I wouldn't worry too much about non-standard rates - the results are generally so poor in my experience as to be considered useless.

Sir Didymus
23rd May 2007, 20:49
Since I have no NTSC Film DVD source, I had to create one for testing first.

Results:
For DVD2DVD with fixed chapters you are absolutely right:
The number of chapters is wrong, and the chapter positions should NOT be multiplied by 1.25. With the new Mplex_hack Beta the chapter points came out correctly (using QuEnc).

Wow! manolito! you are quicker than the flash! Thanks for this confirmation. My hypotheses were based just on theories, but I have to admit that having the code of Mplex_hack in front of me help a lot for producing good theories...
:)


As Nick stated for a 23.976 AVI D2S does apply pulldown. If the chapter points have to be corrected in this case depends on how Mplex_hack.exe creates the fixed chapters.

Right. Actually, when Non Drop Time Code references are used in the code, these are reflecting "absolute timing" information, and are independent from the application of pulldown to the encoded source. When Movie Length or other timing information is derived by encoded frames, then this timing are stretched, depending on the "Pulldown=". By the way, thanks a lot for pointing out the parameter to look at for the clean implementation of the patch.


And what happens if the source AVI has a non standard frame rate? Does D2S automatically convert the frame rate to a DVD compliant rate? I have no idea.

Neither I have...


Anyway, I'm gonna do some more testing with the new Mplex_hack.exe. I'll report back...

Thanks manolito!

Sir Didymus
23rd May 2007, 20:52
Yes, that's exactly what it does, and very, very badly as a rule!!
I wouldn't worry too much about non-standard rates - the results are generally so poor in my experience as to be considered useless.

Mhhh... Good to know...

Edit: In the last days this thread became really interesting and instructing!

Fishman0919
23rd May 2007, 21:48
Bingo, Chapters matchup perfectly with both Superman Returns R1 and The Chronicles of Narnia: The Lion, the Witch, and the Wardrobe R1

Fishman0919
24th May 2007, 10:41
Hummm, ran into a little problem with X-men 2 R1.
I encoded with TMPGEnc 2.524 keeping both DD and DTS
.... just to try something different.
I start the project last nite and this morning my VIDEO_TS folder is 94.9 GB (101,932,920,832 bytes) and growing

Encoded_Video_TMPGEnc_NTSC.mpv = 3.09 GB (3,326,899,370 bytes)

Extracted_audio_1.ac3 = 428 MB (449,455,104 bytes)

Extracted_audio_2.dts = 721 MB (756,947,598 bytes)

VIDEO_TS now = 95.9 GB (103,006,662,656 bytes)

MuxMan version 0.15R
Opened script file C:\Program Files\DVD2SVCD\Movie\BatchMux.mxp
Accepted video C:\Program Files\DVD2SVCD\Movie\Encoded_Video_TMPGEnc_NTSC.mpv size = 3326899370
Accepted audio C:\Program Files\DVD2SVCD\Movie\Extracted_audio_1.ac3
Accepted audio C:\Program Files\DVD2SVCD\Movie\Extracted_audio_2.dts
expanded database to 300 entries.

02:35:15 Begin multiplex VTS01.
Title Segment List
Segment_1
Maximum audio duration 481078 fields.
Starting scene Segment_1_scn1 at 00:00:00:00
Starting scene Segment_1_scn2 at 00:01:49:18, requested for 00:01:49:11
Starting scene Segment_1_scn3 at 00:05:20:26, requested for 00:05:20:20
Starting scene Segment_1_scn4 at 00:07:11:00, requested for 00:07:10:25
Starting scene Segment_1_scn5 at 00:12:25:17, requested for 00:12:25:11
Starting scene Segment_1_scn6 at 00:15:33:20, requested for 00:15:32:10
P-STD buffer underflow by 11133 bytes at 84112295, sector 307500.
P-STD buffer underflow by 13801 bytes at 84116799, sector 307529.
Starting scene Segment_1_scn7 at 00:17:55:13, requested for 00:17:55:10
Starting scene Segment_1_scn8 at 00:19:23:22, requested for 00:19:23:16
Starting scene Segment_1_scn9 at 00:22:45:18, requested for 00:22:45:10
Starting scene Segment_1_scn10 at 00:26:07:07, requested for 00:26:07:05
Starting scene Segment_1_scn11 at 00:29:13:11, requested for 00:29:13:06
Starting scene Segment_1_scn12 at 00:31:07:23, requested for 00:31:07:15
Starting scene Segment_1_scn13 at 00:33:38:20
Starting scene Segment_1_scn14 at 00:35:06:17, requested for 00:35:06:15
Starting scene Segment_1_scn15 at 00:39:47:01, requested for 00:39:46:25
Starting scene Segment_1_scn16 at 00:45:32:06, requested for 00:45:32:00
Starting scene Segment_1_scn17 at 00:47:14:22, requested for 00:47:14:15
Starting scene Segment_1_scn18 at 00:50:20:13, requested for 00:50:20:05
Starting scene Segment_1_scn19 at 00:53:14:05, requested for 00:53:13:25
Starting scene Segment_1_scn20 at 00:55:37:23, requested for 00:55:36:05
P-STD buffer underflow by 4648 bytes at 300700667, sector 935889.
P-STD buffer underflow by 10880 bytes at 300703670, sector 935907.
P-STD buffer underflow by 21289 bytes at 300708174, sector 935938.
Starting scene Segment_1_scn21 at 00:57:10:17, requested for 00:57:10:15
Starting scene Segment_1_scn22 at 00:59:17:18, requested for 00:59:17:10
Starting scene Segment_1_scn23 at 01:04:51:06, requested for 01:04:51:00
Starting scene Segment_1_scn24 at 01:09:18:20, requested for 01:09:18:16
Starting scene Segment_1_scn25 at 01:14:43:16, requested for 01:14:43:10
Starting scene Segment_1_scn26 at 01:18:13:05, requested for 01:18:12:25
Starting scene Segment_1_scn27 at 01:24:46:20, requested for 01:24:46:15
Starting scene Segment_1_scn28 at 01:27:10:06
Starting scene Segment_1_scn29 at 01:30:26:02, requested for 01:30:26:00
Starting scene Segment_1_scn30 at 01:32:28:22, requested for 01:32:27:11
Starting scene Segment_1_scn31 at 01:36:37:20, requested for 01:36:37:10
Starting scene Segment_1_scn32 at 01:41:09:00
Starting scene Segment_1_scn33 at 01:43:24:10, requested for 01:43:24:00
Starting scene Segment_1_scn34 at 01:46:30:23, requested for 01:46:30:20
Starting scene Segment_1_scn35 at 01:48:31:07, requested for 01:48:31:05
Starting scene Segment_1_scn36 at 01:53:35:13, requested for 01:53:34:05
Starting scene Segment_1_scn37 at 01:58:11:02, requested for 01:58:10:22
Starting scene Segment_1_scn38 at 02:02:06:12, requested for 02:02:06:07
Starting scene Segment_1_scn39 at 02:04:30:05, requested for 02:04:29:27
Starting scene Segment_1_scn40 at 02:05:02:25, requested for 02:05:02:17
SeqEnd at C64C74A6.

I stop with 97.0 GB (104,256,565,248 bytes)

Any files or info needed, please ask

Edit: I closed the windows at the bottom of the screen and closed DVD2DVD and noticed Muxman process is still running... VIDEO_TS is now 98.1 GB (105,439,358,976 bytes)

manolito
24th May 2007, 13:10
It does not look like this is caused by BatchMux. Muxman detected a couple of buffer underflows, and if something like this happens, Muxman does not finish the authoring correctly. It does not behave like DVDAuthor which will finish and leave it up to you if you want to keep the result.

In your case Muxman seems to be in an endless loop. This has not happend to me so far (maybe it was introduced with the latest version 0.15R), but if underflows were present, the VIDEO_TS folder would never contain all the files necessary for burning.

Bottom line: TMPGEnc did a bad job encoding your video. Switch to CCE, HC or QuEnc...

Cheers
manolito

Sir Didymus
24th May 2007, 13:51
Some encoders produce clips without the sequence end code at the end...

Release 1.0 of the BatchMux.exe program (it is the authoring wrapper of the plugin) have a patch for this very specific condition...

This release is not included in the plugin download (I was planning to update it in the next - needed - release of the plugin itself...)...

Do you mind checking if this release of BatchMux.exe:

http://forum.doom9.org/showthread.php?t=116297&highlight=BatchMux

is fixing the problem ?

Cheers,
SD

Fishman0919
24th May 2007, 14:16
It does not look like this is caused by BatchMux. Muxman detected a couple of buffer underflows, and if something like this happens, Muxman does not finish the authoring correctly. It does not behave like DVDAuthor which will finish and leave it up to you if you want to keep the result.

In your case Muxman seems to be in an endless loop. This has not happend to me so far (maybe it was introduced with the latest version 0.15R), but if underflows were present, the VIDEO_TS folder would never contain all the files necessary for burning.

Bottom line: TMPGEnc did a bad job encoding your video. Switch to CCE, HC or QuEnc...


Cheers
manolito

True about TMPGEnc... just want to try something new/diff for testing. With TMPGEnc, DVD2DVD doesn't do the pulldown it's done with TMPGEnc...just trying diff stuff to see if something would fail

Sir Didymus
24th May 2007, 16:51
In your case Muxman seems to be in an endless loop. This has not happend to me so far (maybe it was introduced with the latest version 0.15R)...


A similar situation was present in FAVC (and kindly reported by Mr_Odwin some days ago).

Apparently the trouble holds just when using the free version of MuxMan+BatchMux v0.9. The glitch seems to be not present in the professional version of MuxMan (18.8).

By loading (and running) the BatchMux.Mxp project file produced by DVD2SVCD with MuxMan 18.8, I am quite sure that the issue will disappear.

I implemented a patch in BatchMux 1.0 (see my post just above) that should be able to recover from this condition, but it's not a definitive solution. In order to solve the issue in a radical way MuxMan 15R should be updated; however I am not sure if this is in the priorities of MpuCoder...

Fishman0919
24th May 2007, 19:09
re-ran the authoring part with new patch in BatchMux 1.0, worked perfect.

VIDEO_TS = 4.33 GB (4,650,047,488 bytes)

Sir Didymus
24th May 2007, 20:55
Hei Fishman0919, in the last days you gave to me some very nice news (and you performed some excellent tests with the BatchMux plugin...)...

:thanks:

I think it's time to upgrade the plugin to release 1.5 (it should include the new BatchMux.exe 1.0 and the new Mplex_hack 1.0)... Next week, most probably...

Fishman0919
24th May 2007, 21:19
Hei Fishman0919, in the last days you gave to me some very nice news (and you performed some excellent tests with the BatchMux plugin...)...

:thanks:

I think it's time to upgrade the plugin to release 1.5 (it should include the new BatchMux.exe 1.0 and the new Mplex_hack 1.0)... Next week, most probably...

NP, thank you for making an excellent plug-in... glad I could help

manolito
24th May 2007, 21:50
Here are some test results using the new Mplex_hack Beta:

Setup:
BatchMux 1.4
New Mplex_hack.exe Beta1
BatchMux.exe 1.0
Encoder: QuEnc

AVI2DVD mode, NTSC (Pulldown ON): OK
(thanks to Nick for providing a NTSC source AVI)
AVI2DVD mode PAL: OK

DVD2DVD mode PAL, DVD Chapters: OK
DVD2DVD mode PAL, Fixed Chapters: OK

DVD2DVD mode NTSC Film (Pulldown ON), DVD chapters: OK
DVD2DVD mode NTSC Film (Pulldown ON), Fixed chapters: OK


What is missing so far is NTSC interlaced Video (Pulldown OFF), I will test this tomorrow.

So far the new Mplex_hack.exe looks like winner. :)


@Sir Didymus:
I have no idea how you implemented the fixed chapter fix when using CCE 2.70. Do you think it is necessary to test the new Mplex_hack.exe with CCE 2.70 and maybe earlier CCE versions also?


Cheers
manolito

manolito
24th May 2007, 23:16
Test Update:

For NTSC Interlaced @29.97 the new Mplex_hack.exe also delivers the correct chapter points. No matter if Fixed Chapters or DVD Chapters are selected.


Cheers
manolito

Sir Didymus
25th May 2007, 08:20
Here is the way the Pulldown fix is implemented:

For DVD chapters, there is no much to say: the lines of the chapter file are represented as Encoded Frames and MuxMan need a representation in terms of Presentation Frames. When Pulldown flag is on, all entries of this file should be scaled by 1,25.

For fixed chapters, in the previous version, in the step 6 of the code, the following parameters were extracted from the DVD2SVCD files (this is just the initialisation of the involved variables...):


PalFlg = 0;
MovieFrames = 0;
hh = mm = ss = ff = 0;


now also pulldown is extracted:


PalFlg = 0;
PulldownFlg = 0;
MovieFrames = 0;
hh = mm = ss = ff = 0;


The two timing representations of the movie length (in frames and in ND time code - hh, mm, ss, ff) are extracted and - in the new beta of Mplex_hack, when the Pulldown flag is set, the MovieFrames variable is updated in order to represent Presentation Frames (not Encoded Frames):


if (PulldownFlg)
{
MovieFrames = MovieFrames + MovieFrames/4;
}


These two distinct representations are both needed, since, depending on the different DVD2SVCD modes, just one of the two is present in the configuration files of DVS2SVCD. For the production of the proper Celltimes.txt just MovieFrames is used, but this variable should represent Presentation Frames, not Encoded Frames...

In case MovieFrames is derived from the ND time code (hh:mm:ss:ff) then this variable is already representing Presentation Frames, so there is no need to scale it by 1,25.

In case MovieFrames is not derived from the ND time code - e.g. when it is fetched from the configuration files of DVD2SVCD, then it represents Encoded Frames, so it is necessary to scale it by 1,25.

Before this step, it take place the segment of code for supporting CCE 2.70:


// In case MovieFrames == 0 try to get this parameter from the ECL file generated by CCE
if (MovieFrames==0)
{
MovieFrames=GetMovieFramesFromEcl();
}


Where GetMovieFramesFromEcl() basically performs the following:


MovieFrames=encode_last-encode_first+1;

But also in this case, the MovieFrames extracted from the ECL expresses Encoded Frames.

So, to answer your question, an impact of the presence of the Pulldown handling on the CCE 2.70 exist (I would say more than just an impact it is a straight relationship). However, due to way the code is implemented I am very confident it should work. I have to admit I did not test this condition...

Hope this quick description is sufficient to clarify...

Thanks a lot for your further testing and for the very nice news and confirmation of the good behaviour of Mplex_hack_beta1.0 !
It is really appreciated !

Cheers,
SD

ChickenMan
25th May 2007, 08:25
Been away for a couple of weeks on holidays and I see all this new action :) Keep it up guys. Will do some testing also as soon as I get myself re-organised.

Sir Didymus
25th May 2007, 08:38
Hi ChickenMan!

Take your time... I will wait for some feedback also from your side before updating the whole plugin.

For making it short, and for the benefit of possible other casual readers, the two component (Mplex_hack.exe and BatchMux.exe) need to be updated. You may get the most recent releases here:


Edit 20-06-2007 Link removed. See first page for the last available release...

Cheers,
SD

manolito
25th May 2007, 21:27
@Sir Didymus

Thanks for the explanation about how CCE 2.70 chapters are implemented.

I still had the urge to test it, and -Bingo- I did find bugs!

Mode DVD2DVD, source was NTSC FILM, Pulldown ON.
For fixed chapters the chapter points were at the correct position, but the last chapters of the movie were missing.

For DVD chapters all chapter points were there, but at the wrong positions. They should have been expanded by 1.25, but obviously they were not.

Just to make sure my source was OK I crosschecked using QuEnc, and here everything was perfect.


And I also found another issue which is not related to chapter creation at all and which has been there all the time:

Mplex_hack.exe seems to assume that the Mplex command line always starts with the parameter "-f". This is not always true. In my tests I often use "Keep original audio", and many times DVD2SVCD determines that there is an audio delay which must be corrected. In my latest test the Mplex command line issued by DVD2SVCD was like this:

"E:\Programme\DVD2SVCD\DVDAuthor\Mplex_hack.exe" -1 17ms -f 8 -o "I:\Movies\MPlex_Muxed_File00.mpg" "I:\Movies\Pulldown_Encoded_Video_NTSC.mpv" "I:\Movies\Extracted_audio_1.ac3".

Please notice that there are two additional parameters in front of the "-f" parameter. In this case Mplex_hack.exe fails to determine the needed folder information.

I found that the solution is to simply discard the delay parameters in front of the "-f" parameter. I never got a sync problem when I just ignored these parameters.


And last something OT:
I always have the urge to try newer versions of the SVD2SVCD helper applications. AviSynth 2.57 works well with D2S, but for DGIndex / DGDecode it is different. Version 1.45 which comes with D2S is the only version which works. Newer versions (from 1.46 to 1.49) all have issues:
For PAL sources they all crash as soon as the encoder starts. For NTSC sources they seem to work at first glance. But they all detect NTSC interlaced video falsely as Film which leads to very ugly results. So do yourself a favor and stick with 1.45....


Cheers
manolito

Sir Didymus
25th May 2007, 22:56
...
Mode DVD2DVD, source was NTSC FILM, Pulldown ON.
For fixed chapters the chapter points were at the correct position, but the last chapters of the movie were missing.

For DVD chapters all chapter points were there, but at the wrong positions. They should have been expanded by 1.25, but obviously they were not.

Just to make sure my source was OK I crosschecked using QuEnc, and here everything was perfect.

This is possible only if the Pulldown flag, in the "dvd2svcd project file.d2s" file is (wrongly ?) set to "No"...
Could you post the Mplex_hack.log file ?


And I also found another issue which is not related to chapter creation at all and which has been there all the time:

Mplex_hack.exe seems to assume that the Mplex command line always starts with the parameter "-f".

That's right...


This is not always true. In my tests I often use "Keep original audio", and many times DVD2SVCD determines that there is an audio delay which must be corrected. In my latest test the Mplex command line issued by DVD2SVCD was like this:

"E:\Programme\DVD2SVCD\DVDAuthor\Mplex_hack.exe" -1 17ms -f 8 -o "I:\Movies\MPlex_Muxed_File00.mpg" "I:\Movies\Pulldown_Encoded_Video_NTSC.mpv" "I:\Movies\Extracted_audio_1.ac3".

Please notice that there are two additional parameters in front of the "-f" parameter. In this case Mplex_hack.exe fails to determine the needed folder information.

I found that the solution is to simply discard the delay parameters in front of the "-f" parameter. I never got a sync problem when I just ignored these parameters.

Good to know...
I simple was not aware of the different variants of the command lines passed to Mplex...
Do you know if there are other arguments like the one you have discovered, that should be taken into account ?
It will be quite easy to implement the delay parameter (BatchMux.exe always is perfectly adequate to support it...), but it would be important to know what is the overall set of arguments generated by DVD2SVCD.


And last something OT:
I always have the urge to try newer versions of the SVD2SVCD helper applications. AviSynth 2.57 works well with D2S, but for DGIndex / DGDecode it is different. Version 1.45 which comes with D2S is the only version which works. Newer versions (from 1.46 to 1.49) all have issues:
For PAL sources they all crash as soon as the encoder starts. For NTSC sources they seem to work at first glance. But they all detect NTSC interlaced video falsely as Film which leads to very ugly results. So do yourself a favor and stick with 1.45....

Cheers
manolito


Nice to know... Never tryed anything else than the DGDecode version bundled with DVD2SVCD... Since it seems this version works quite well, have you specific needs/good reasons for upgrading ?

Anyway, well, it seems there is still some work to perform before releasing a new version of the plugin...

:rolleyes:

Cheers,
SD

manolito
26th May 2007, 02:07
This is possible only if the Pulldown flag, in the "dvd2svcd project file.d2s" file is (wrongly ?) set to "No"...
Could you post the Mplex_hack.log file ?


Yes , you are right (as usual). When using CCE 2.70 with DVD2SVCD the pulldown flag in the D2S project file is not reliable. In all my tests with CCE 2.70 using NTSC film sources DGIndex determined Film and activated "Force Film". D2S did apply pulldown, but in the D2S project file the pulldown flag was set to "No". No wonder that Mplex_hack.exe got it all wrong.

But there is a very easy fix. Whenever DVD2SVCD applies pulldown it renames the video stream. If the name of the original video stream was "XYZ.mpv" it will be renamed to "Pulldown_XYZ.mpv". I believe that this would be a foolproof way for Mplex_hack.exe to determine if pulldown was used or not. Just parse the video stream file name for "Pulldown" and set the pulldown flag accordingly.


For the Mplex parameters all I could find so far is that D2S can issue delay parameters for the two supported audio streams which appear in front of the "-f" parameter. The format is "-1 xxms -2 yyms". As I already said I never had any sync problems just ignoring these parameters.


Cheers
manolito

ChickenMan
26th May 2007, 11:11
I just tried my first AVI2DVD encode using BatchMux.exe ver 1.0, Mplex_hack.exe ver1.0, MuxMan 0.15R, Nicks latest Ac3Enc and CCE 2.70. Chapter points set to 5min (300sec).

AVI was 1hr 41min 15sec long NTSC @ 23.976fps with MP3 audio. All went fine. Played final VIDEO_TS folder and all is well and in sync, however, chapter points were at exactly 5min intervals but stopped at 1hr 20min.

A quick calculation shows 101min * 0.8 (thats 1 / 1.25 ) = 80.8min and thats where the last chapter point was put in, at 80min.

EDIT: Checked the Project file and Pulldown was set to NO, even though a Pulldown_Encoded_Video_NTSC.mpv was correctly produced.

Sir Didymus
26th May 2007, 19:20
...
But there is a very easy fix. Whenever DVD2SVCD applies pulldown it renames the video stream. If the name of the original video stream was "XYZ.mpv" it will be renamed to "Pulldown_XYZ.mpv". I believe that this would be a foolproof way for Mplex_hack.exe to determine if pulldown was used or not. Just parse the video stream file name for "Pulldown" and set the pulldown flag accordingly.


I see...
However, if we change the way Mplex_hack.exe is acquiring the PulldownFlg (using the avi filename instead of some configuration parameters), this have the consequence that avi files whose original filename is "Pulldown_xxx.avi" can not be allowed anymore within DVD2SVCD... Right ?
It would be nice to understand what is the rule adopted by DVD2SVCD when it applies pulldown and implement something similar instead...

@ChickenMan
OK. I see. Thanks for confirming the issue discovered by manolito...
:)

Nick
26th May 2007, 19:40
No - this is not the case.
It is not the original AVI that is renamed.
What he means by the "original video stream" is the MPV file - the encoded MPEG2 video stream created by D2S.

The video encoder is called to create a stream called Encoded_Video_CCE(or whichever encoder)_PAL(or NTSC).mpv

If pulldown is to be applied - which as I understand it is only in the case of a 23.976fps source or use of the IVTC function - the pulldown command line is set to input Encoded_Video_*.mpv and output Pulldown_Encoded_Video_*.mpv . It is this latter file that is used for muxing.

You can therefore tell whether Pulldown has been applied from the parameters in the Mplex_hack commandline - if the filename of the video stream to be multiplexed has "Pulldown" as the first word, pulldown has been applied. If it doesn't, it hasn't.

Hope this clarifies!
Cheers
Nick

manolito
26th May 2007, 19:49
Exactly!
Thanks for the clarification...

Cheers
manolito

Sir Didymus
26th May 2007, 20:14
OK! I see! Thanks for the clarification Nick...

So, there is no drawback in fetching the PulldownFlg variable from the Mplex command line, as suggested by manolito... Let's code it...

:)

Cheers,
SD

Edit. OK. here it is the link for a quick fix of the two problems reported above. Pulldown is now fetched from the command line (video file argument) and the presence of optional audio delay arguments should not break the plugin anymore.
For the moment, these arguments, if present, are just discarded - I will include them in the process in a future time...

Edit 20-06-2007 Link removed. See first page for the last available release...

ChickenMan
27th May 2007, 13:06
Just downed Beta 3, trying it now :)

EDIT: Just tried on an NTSC 29.97 avi (no pulldown ) and all chapter points present and correct. Bed time, more testing tomorrow. :)