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. |
|
|
#101 | Link |
|
Registered User
Join Date: Jul 2002
Location: Arizona - Where DST Doesn't Exist
Posts: 143
|
I just spent my entire weekend using about every method suggested by folks in this forum (& thread) to convert a PAL source to NTSC. The video conversion isn't a problem unless this is what drives the audio being out of sync. Synching up the audio is. Some conversion techniques say you can just mux the converted video with the original soundtrack. Others say use bsweet. I've used bsweet to convert 25000 to 23976 and 25000 to 29970. Done it. Been there. Audio is still out of sync and I've pretty much given up. Can't be this hard. Maybe it's the authoring program. I've tried IFOEdit and TMPGenc DVD. Can't afford much more.
|
|
|
|
|
|
#102 | Link |
|
Registered User
Join Date: Aug 2002
Posts: 467
|
I'm sorry you're having such a difficult time. I haven't seen these type of issues. Whenever I convert the frame rate (i.e. change the duration of the video), I have used both BeSweet and AVISynth's built-in conversion to alter the audio without sync issues (although you have to be very careful in AVISynth to keep from losing any precision in your calculations, and of course there is a pitch shift). However, I normally do conversions that don't change the duration at all. In that case I don't touch the audio at all, and I don't have sync issues there either.
Perhaps some more details are needed. Xesdeeni |
|
|
|
|
|
#103 | Link |
|
Registered User
Join Date: Jul 2002
Location: Arizona - Where DST Doesn't Exist
Posts: 143
|
OK. I've resolved myself to figuring this out. I'm re-reading this entire thread to see if I missed something or messed something up. Can you just confirm that the following is the script I should use for PAL DVD to NTSC DVD? If there's a line that should be there that isn't let me know. I took this from one of the web page sources mentioned in this thread.
I'd like to be able to do a conversion where I don't have to modify the audio as well. Thanks. # PAL DVD (50 fps) to NTSC DVD (59.94 fps) LoadPlugin("SmoothDeinterlacer.dll") LoadPlugin(PluginPath + "MPEG2DEC.dll") InputVideo = MPEG2Source("PALDVD.d2v") SmoothDeinterlace(tff=true, doublerate=true) BilinearResize(720, 480) ChangeFPS(59.94) SeparateFields() SelectEvery(4, 1, 2) |
|
|
|
|
|
#104 | Link |
|
Registered User
Join Date: Apr 2004
Posts: 45
|
Just wanted to interject and offer a PAL<->NTSC script that has served me very well. I've never had to worry about audio sync, which is a good thing.
Since it's quite long (including comments) I've put the script here . It requires this VirtualDub filter to operate. I'll admit I've never done a NTSC->PAL with it, but I use it on a semi-daily basis for PAL->NTSC and I've yet to have an unsatisfactory result despite feeding it numerous sources all in various forms, including MPEG-2 and DirectShowSource. |
|
|
|
|
|
#105 | Link |
|
Registered User
Join Date: Aug 2002
Posts: 467
|
The bad thing about the Internet is that old stuff stays around a long time :-|
The script makoto916 links is the earliest version of my conversion script. It uses the VirtualDub filter Gunnar Thalin wrote. I ported the filter to AVISynth because:[list=1][*]the script was so complicated, [*]the dual nature of the script was slow, [*]the AVISynth version can operate on YUV space directly, so it's faster[/list=1]However, the script old-hack quotes shouldn't work at all (sorry, that page needs a refresh). Ahem.... Anyway: First, make sure you are using AVISynth 2.5. Next get the 2.5 version of SmoothDeinterlacer. Then get DGMPGDec. Place all the DLLs in the AVISynth 2.5 plugin directory. That way you can do away with the LoadPlugin() lines. Use DGIndex like you would DVD2AVI and create your .D2V and .AC3 files. Then start with this script: Code:
MPEG2Source("PALDVD.d2v")
YV12toYUY2(interlaced=true) # Don't use this script if the source is completely progressive
SeparateFields() # Correct bug in...
Weave() # ...SmoothDeinterlacer
SmoothDeinterlace(doublerate=true)
Then add these lines: Code:
LanczosResize(720, 480) ChangeFPS(59.94) SeparateFields() SelectEvery(4, 0, 3) Weave() Xesdeeni |
|
|
|
|
|
#107 | Link | |
|
Registered User
Join Date: Jan 2003
Posts: 1
|
Quote:
Thanks for all your info in this thread! I have used your method to do a PAL-to-NTSC conversion, and it looks very nice! My one question is, is the above workaround still necessary, or has the smoothdeinterlacer bug you mention been fixed by now? Out of curiosity, what exactly is the bug? Thanks again! |
|
|
|
|
|
|
#108 | Link | |
|
Registered User
Join Date: Aug 2002
Posts: 467
|
Quote:
. Besides, I'm not even sure how the above work-around works. AFAIK, SeparateFields() and Weave() are exactly opposites of one another, so doing both should effectively be a NOP. As a result, any info available after them had to be available before. And since this doesn't actually change SmoothDeinterlacer, I can't really see how it is SmoothDeinterlacer's fault. Also, see note below...All that being said, I was recently pointed to KernelDeint/KernelBob by scharfis_brain. I've modified my conversion script to use this instead, and the results are at least as good as with SmoothDeinterlacer. Also, they appear to be faster with the older script-based KernelBob. The above-linked version should be faster still. So while it pains me to say this, I'd recommend using KernelDeint instead. I'm trying to get some time to update my standards conversion web page. I intend to streamline it to a smaller set of conversions, with more explanation to enable people to handle the more unique situations they seem to hit. And in addition to switching to KernelDeint, I will use AVISynth 2.5 and DGMPGDec instead of DVD2AVI. Note also, that in the course of testing KernelDeint/KernelBob, I found a similar problem to the one in SmoothDeinterlacer. I tried a bunch of things, although the SeparateFields()/Weave() trick didn't seem to work. I eventually found that I was able to correct the problem by explicitly using AssumeFrameBased()/AssumeFieldBased() as appropriate. My scripts are at home, but I'll post them on my web page when I update it. Xesdeeni |
|
|
|
|
|
|
#109 | Link |
|
King of the Jungle
Join Date: Mar 2003
Location: Shoreditch, London
Posts: 429
|
Hi Xesdeeni,
would you mind showing an example of the your script using the new Kerneldeint as I am having difficulty getting it to work well. The results look really bad and stuttery. Cheers. |
|
|
|
|
|
#110 | Link |
|
Registered User
Join Date: Aug 2002
Posts: 467
|
These should give you the idea:
PAL to NTSC Code:
AVISource("PALDV.avi") # Interlaced PAL input from DV (bff, 25i fps)
AssumeFrameBased() # Just in case
AssumeBFF() # Just in case (redundant with order=0 below?)
KernelBob(order=0) # Order = 0 for bff, 1 for tff => 50p fps
LanczosResize(720,480) # Convert to NTSC size, still at 50p fps
ChangeFPS(59.94) # Use replication...
#ConvertFPS(59.94) # ...or interpolation to change to 59.94p fps
AssumeFrameBased() # Just in case
AssumeTFF() # Makes frame 0 become even field below
SeparateFields() # We will be throwing out 1 of each pair
SelectEvery(4,0,3) # Choose even then odd, or TFF (use AssumeBFF()...
# ...or SelectEvery(4,1,2) here for BFF
Weave() # Combine fields for encoder
Code:
AVISource("NTSCDV.avi") # Interlaced PAL input from DV (bff, 29.97i fps)
AssumeFrameBased() # Just in case
AssumeBFF() # Just in case (redundant with order=0 below?)
KernelBob(order=0) # Order = 0 for bff, 1 for tff => 59.94p fps
#ChangeFPS(50) # Use replication...
ConvertFPS(50) # ...or interpolation to change to 50p fps
LanczosResize(720,576) # Convert to PAL size, still at 50p fps
AssumeFrameBased() # Just in case
AssumeTFF() # Makes frame 0 become even field below
SeparateFields() # We will be throwing out 1 of each pair
SelectEvery(4,0,3) # Choose even then odd, or TFF (use AssumeBFF()...
# ...or SelectEvery(4,1,2) here for BFF
Weave() # Combine fields for encoder
Note that for DVD content, I recommend DGMPGDec. Using that, you would use MPEG2Source() in place of AVISource() above. However, the output of MPEG2Source() is YV12, which some filters can't handle. ConvertFPS() is one. And your codec might not accept this either, so there may be another conversion performed outside of your script on the input to the codec. Unfortunately, there is a bug with some versions of the Microsoft converter (I don't know if it's fixed in XP) that causes color gradients (bands), so it's a good idea to pay attention to what your codec prefers as an input and serve that. Xesdeeni |
|
|
|
|
|
#111 | Link |
|
Registered User
Join Date: Mar 2004
Location: CA
Posts: 21
|
hello Xesdeeni,
There is a lot of great info here, just a bit difficult to grasp. I been through this thread trying to figure out the best way to convert my PAL dvd (25fps) to a NTSC dvd. Frankly, I am running into a bunch of trouble. I copied your script and saved as .avs, but TMPGEnc always gives me an error with line 1, cannot load file. The path is definitely correct. When I load this script in VirtualDub (Run Script), I get the same error message. I can't figure out what I'm doing wrong. Out of curiousity, I loaded the d2v file directly as the video source, and the output was ok, but not very smooth during playback. Any help would be appreciated. |
|
|
|
|
|
#112 | Link | |
|
Moderator
![]() Join Date: Feb 2002
Posts: 641
|
Quote:
Last edited by easy2Bcheesy; 12th September 2004 at 13:24. |
|
|
|
|
|
|
#114 | Link | |
|
Registered User
Join Date: Mar 2004
Location: CA
Posts: 21
|
Sorry. I should be more clear. The script/instructions I followed were from Xesdeeni's earlier post above.
Quote:
Thanks for the help. |
|
|
|
|
|
|
#117 | Link |
|
Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,341
|
Just start with the following (two line) script
MPEG2Source("c:\file.d2v") ConvertToYUY2() and replace c:\file.d2v with the actual path of your d2v. Open it in VDub/VDubMod to see whether you see something. |
|
|
|
|
|
#118 | Link |
|
Registered User
Join Date: Mar 2004
Location: CA
Posts: 21
|
Just to be sure, I ran the install for Avisynth 2.5.5 again, and it said install was successful. I am pretty sure that it is installed on my system. I believe DVD-rebuilder needs Avisynth to work properly. That programs works fine.
I have tested again and still get the same error: "MPEG2Source: Could not find file. ("PATH\FILENAME.avs, line 1")" This error occurs in both VDub and TMPGEnc. What I am doing: - Decrypt a PAL dvd to the HD (this is not a movie house dvd, but rather a video recording of an event convert to dvd format). Contents are PAL 704x576, MPEG2, 4:3, 25 fps, Interlaced. - Open vob in DGMPGDec and Save Project to create d2v and ac3 files - Create script in Notepad and save .avs file I am positive that the file path is correct in the script. I used the basic 2 line script. Is there any other way to see if Avisynth is installed correctly? Thanks again for the help. |
|
|
|
|
|
#120 | Link | |
|
Registered User
Join Date: Mar 2004
Location: CA
Posts: 21
|
Just to be clear:
I used the basic 2 line script suggested by Wilbert above: Quote:
|
|
|
|
|
![]() |
|
|