Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > (HD) DVD, Blu-ray & (S)VCD > One click suites for DVD backup and DVD creation

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd May 2007, 13:12   #61  |  Link
Sir Didymus
Registered User
 
Join Date: Mar 2004
Location: Italy
Posts: 948
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 ?

Last edited by Sir Didymus; 23rd May 2007 at 13:16.
Sir Didymus is offline   Reply With Quote
Old 23rd May 2007, 13:15   #62  |  Link
Nick
One click is all it takes
 
Nick's Avatar
 
Join Date: Mar 2002
Location: Heart of the Broad Acres
Posts: 1,404
Doh! Yes, my bad.
Nick is offline   Reply With Quote
Old 23rd May 2007, 13:20   #63  |  Link
Sir Didymus
Registered User
 
Join Date: Mar 2004
Location: Italy
Posts: 948


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
Sir Didymus is offline   Reply With Quote
Old 23rd May 2007, 13:56   #64  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,093
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
manolito is offline   Reply With Quote
Old 23rd May 2007, 14:10   #65  |  Link
Fishman0919
FishmanMod Android Dev
 
Fishman0919's Avatar
 
Join Date: Apr 2004
Location: Somewhere else, maybe Arizona Bay
Posts: 1,143
Quote:
Originally Posted by manolito View Post
@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.
__________________
"Cinderella story, out of nowhere,
former greenskeeper, now about
to become the Masters champion.
It looks like a mirac- it's in the hole!"
Fishman0919 is offline   Reply With Quote
Old 23rd May 2007, 15:34   #66  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,093
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"

Code:
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
manolito is offline   Reply With Quote
Old 23rd May 2007, 15:46   #67  |  Link
Sir Didymus
Registered User
 
Join Date: Mar 2004
Location: Italy
Posts: 948
Quote:
Originally Posted by manolito
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):

Code:
// 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);
        }
 }

Last edited by Sir Didymus; 23rd May 2007 at 15:56.
Sir Didymus is offline   Reply With Quote
Old 23rd May 2007, 16:32   #68  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,093
Quote:
Originally Posted by Sir Didymus View Post
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.

Quote:
Originally Posted by Sir Didymus View Post
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
manolito is offline   Reply With Quote
Old 23rd May 2007, 17:40   #69  |  Link
Sir Didymus
Registered User
 
Join Date: Mar 2004
Location: Italy
Posts: 948
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 ?
Sir Didymus is offline   Reply With Quote
Old 23rd May 2007, 17:47   #70  |  Link
Nick
One click is all it takes
 
Nick's Avatar
 
Join Date: Mar 2002
Location: Heart of the Broad Acres
Posts: 1,404
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
Code:
[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.
Nick is offline   Reply With Quote
Old 23rd May 2007, 18:56   #71  |  Link
Sir Didymus
Registered User
 
Join Date: Mar 2004
Location: Italy
Posts: 948
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...

Last edited by Sir Didymus; 20th June 2007 at 11:11.
Sir Didymus is offline   Reply With Quote
Old 23rd May 2007, 20:04   #72  |  Link
Fishman0919
FishmanMod Android Dev
 
Fishman0919's Avatar
 
Join Date: Apr 2004
Location: Somewhere else, maybe Arizona Bay
Posts: 1,143
Quote:
Originally Posted by Sir Didymus View Post
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.
__________________
"Cinderella story, out of nowhere,
former greenskeeper, now about
to become the Masters champion.
It looks like a mirac- it's in the hole!"
Fishman0919 is offline   Reply With Quote
Old 23rd May 2007, 20:22   #73  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,093
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:

Quote:
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
manolito is offline   Reply With Quote
Old 23rd May 2007, 20:37   #74  |  Link
Sir Didymus
Registered User
 
Join Date: Mar 2004
Location: Italy
Posts: 948
Quote:
Originally Posted by Fishman0919
...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!
Sir Didymus is offline   Reply With Quote
Old 23rd May 2007, 20:40   #75  |  Link
Nick
One click is all it takes
 
Nick's Avatar
 
Join Date: Mar 2002
Location: Heart of the Broad Acres
Posts: 1,404
Quote:
Originally Posted by manolito View Post
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.
Nick is offline   Reply With Quote
Old 23rd May 2007, 20:49   #76  |  Link
Sir Didymus
Registered User
 
Join Date: Mar 2004
Location: Italy
Posts: 948
Quote:
Originally Posted by manolito
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...


Quote:
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.

Quote:
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...

Quote:
Anyway, I'm gonna do some more testing with the new Mplex_hack.exe. I'll report back...
Thanks manolito!

Last edited by Sir Didymus; 23rd May 2007 at 20:55.
Sir Didymus is offline   Reply With Quote
Old 23rd May 2007, 20:52   #77  |  Link
Sir Didymus
Registered User
 
Join Date: Mar 2004
Location: Italy
Posts: 948
Quote:
Originally Posted by Nick
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!

Last edited by Sir Didymus; 23rd May 2007 at 20:57.
Sir Didymus is offline   Reply With Quote
Old 23rd May 2007, 21:48   #78  |  Link
Fishman0919
FishmanMod Android Dev
 
Fishman0919's Avatar
 
Join Date: Apr 2004
Location: Somewhere else, maybe Arizona Bay
Posts: 1,143
Bingo, Chapters matchup perfectly with both Superman Returns R1 and The Chronicles of Narnia: The Lion, the Witch, and the Wardrobe R1
__________________
"Cinderella story, out of nowhere,
former greenskeeper, now about
to become the Masters champion.
It looks like a mirac- it's in the hole!"
Fishman0919 is offline   Reply With Quote
Old 24th May 2007, 10:41   #79  |  Link
Fishman0919
FishmanMod Android Dev
 
Fishman0919's Avatar
 
Join Date: Apr 2004
Location: Somewhere else, maybe Arizona Bay
Posts: 1,143
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)

Code:
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)
__________________
"Cinderella story, out of nowhere,
former greenskeeper, now about
to become the Masters champion.
It looks like a mirac- it's in the hole!"

Last edited by Fishman0919; 24th May 2007 at 10:49.
Fishman0919 is offline   Reply With Quote
Old 24th May 2007, 13:10   #80  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,093
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
manolito is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:05.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.