I have been trying for some time to convert NTSC video from my DV camcorder to PAL, this is with the aim of writing to DVD or SVCD to send to my family overseas. Initially I use Cyberlink's Power Director PRO to save the video to MPEG2 at 8000kbps, 720x480 resolution, framerate = 29.97
I then used TMPGenc to demultiplex this NTSC video so as to obtain the separate video and the audio streams.
With pointers from this forum to various conversion articles I have been successful in using Avisynth with TMPGenc to do the video conversion, and pretty good it is too! At last after struggling for months with Power Director PRO I now have PAL video which no longer exhibits the 'jerkiness'
As for the audio, well that is what I can't figure out:
I have tried using BeSweet to convert the audio (used the preset 'NTSC -> PAL [29.970 to 25.000]'), I have also tried using WSOLA.exe to do the conversion. I have tried various routes, WAV to MP2, MP2 to MP2, WAV to WAV, I have with and without the 'downconvert sample rate', I have tried just about all the options I can think of. Here is a summary of what I get ..
1. WSOLA wont work, I get a 'MEM ALLOC' error, a WAV file is created of roughly the right size but when I play it is silent.
2. Using BeSweet I can produce MP2 audio but depending on the switches I use the length of the audio varies, if I load the MP2 into a player I find out the length does not match that of my video.
3. Regardless of which MP2 I take from my BeSweet run, using 'simple multiplex' in TMPGenc together with my converted video (extension .mpv) the result is that the audio is completely out of sync. Usually the audio is running way too slow. By the end of the video the audio stream has only got to about 3/4 of the way through!
I have read up all the docs I can find, most talk about backing up DVD's, or converting them from PAL<=>NTSC. I can't find anything that specifically deals with converting from MPEG video which originated from DV camcorder footage (i.e. 29.97 fps). Most of the examples seem to deal with converting audio from AC3.
I can't figure out whether I should be downsampling or not. Should I be aiming for 48Khz sampling or 41khz? What about total bitrate, what should I be aiming for? I am a complete novice and I am finding this very hard to understand.
The conversion articles which have been my source of information so far have been:
"Converting SVCD PAL 25fps to SVCD NTSC 23.976fps" author 'Machine514', dated Jul 7
"Standards Conversion" author 'xesdeeni2001', dated Jul 2
I am very grateful to the authors of these articles as they have been a great help in getting me this far, but I still need help with the audio side of things.
can someone please help, this is driving me nuts!
thanks,
Kevin
+ Reply to Thread
Results 1 to 15 of 15
-
-
Originally Posted by kevinm
I ask this because the ALL DVD players will play Pal and NTSC material, it is just a matter of what they output (NTSC or PAL-60). Then we come down to the display (TV). Most sets sold in Europe over the last 10 or 15 years or so will handle at least Pal-60 and most will also handle NTSC. Not sure about other PAL regions tho (isn't Australia Pal?)
If the answer is that you don't need to convert, kick yourself and save yourself a lot of work.
On to fixing your existing problem.
When you encode your mpeg with avisynth and TmpGenc, encode video only, no audio.
Extract the audio to a wav file from the original DV AVI using goldwave, resample to 48khz if needed. Before saving, use the feature that changes the length (can't remember the exact option, its easy enough to find), and change the length of your audio to match the video, save.
Now encode this wav to mp2 usiong your favourite encoder (beSweet, Tmpgenc etc).
Multiplex with the video (if you need to) before authoring and burning.
Hope this helps. -
Thanks Bugster for your reply ..
Good question about whether I really need to convert to PAL. I do know that some of my family (in the UK) have very old TV sets so I suspect they will have a problem displaying NTSC signal. Maybe they should have replaced their TV when they bought their DVD player! So, for now I would like to pursue this goal of converting NTSC to PAL.
When I encode my video using avisynth and TMPGenc I am only encoding the video. The audio stream I get by using the tools/simple demultiplex feature in TMPGenc. Then I take this audio stream and attempt to framerate adjust using BeSweet.
Last night I tried an experiment to check the integrity of the MP2 file from TMPGenc and also the demultiplex process and multiplex process ..
Step 1. Take original MPEG (from Power Director PRO), using TMPGEnc 'simple demultiplex' option (under mpeg tools) extract the separate video and audio streams (test.m2v & test.mp2)
Step 2. Using TMPGenc 'simple multiplex' (mpeg tools section), load test.m2v and test.mp2, start the multiplex operation ..
I get warning at the end of the multiplex process ..
"Warning 6425 s packet cause buffer underflow. The mpeg file might cause error when it is played"
Step 3. Load the multiplexed video from step 2 into WINDVD player ..
Video plays, but the audio is approximately three seconds ahead of the video stream!! (this was noticed about 1/2 way through the 1hr video)
Doesn't this point to a problem with the multiplex/demultiplex function in TMPGenc? (actually I am using TMPGenc plus)
BTW the original MPEG (from Power Director Pro) plays perfectly in WINDVD, video and audio is in sync.
Some statistics on the original MPEG I am using from PD Pro ..
Total length = 1hour, 2 secs
Video:
MPEG2
bitrate = 8mbps
framerate = 29.97hz
resolution = 720x480
aspect ratio = 4x3
Audio:
Mpeg
bitrate = 192kbps
sampling rate = 48khz
sampling bits = 16
(statistics obtained from WINDVD)
thanks,
Kevin -
Why not import the video directly as DV AVI, you are using TmpGnec anyway, to re-encode. So you will probably be better encoding from the avi to mpeg once (in Tmpgenc) than twice. Then you can also use goldwave as I suggested, this should give you more flexibility than the BeSweet method.
Why not try this with a short clip (5 or 10 mins) to see if you can make it work.
BTW, windows movie maker is perfectly adequate for capturing DV, though I wouldn't recomend it for anything else! -
I use Power Director Pro to do the editing, adding titles, transition effects, etc. I paid $100 US for it and haven't given up on it yet. The support from Cyberlink sucks (actually it is pretty much non-existent) but the product seems ok, apart from it's inability to do decent NTSC to PAL conversion.
As long as I encode at high bitrate (8mbps) the MPEG quality from PCR Pro is pretty good.
I could try what you suggest. I need to get Goldwave .. is this freeware?
At the end of the day I still need my editing environment, hence PD Pro. But I would like to try the experiment you suggest.
Do you expect using DV AVI in TMPGenc to fix my problems? Are the TMPGenc problems being caused by starting from MPEG? Are you suggesting the MPEG from PD Pro is 'faulty' in some way?
thanks,
Kevin -
Goldwave is shareware, get it from www.goldwave.com
Its not that the mpeg from PD pro is 'faulty', I don't know which encoder engine they use, but trying to convert NTSC to PAL starting with a multiplexed mpeg is maybe part of the problem. Cannot PD pro render to a DV AVI, or some other avi format? (DV would be preferred as it is the same as the source).
You are re-encoding anyway in the Tmpgenc step, and is this always to be avoided if possible due to the quality loss that occurs. I am just trying to find a method that will get your audio and video in sync. You seem happy with the video side of things using avisynth and tmpgenc, this should work just as well with the avi as source rather than an mpeg, so I have suggested a way of getting the audio to the same length. Try it. If it works, great, if not, all you have lost is a little time. -
I think that PD Pro can capture and save to DV AVI but after editing it saves to MPEG format. However I am not 100% certain about this, I will check.
If I go the DV AVI route I will end up needing an extra hard drive, but since I am currently using a partitioned drive for my OS and my video work that wouldn't be a bad idea anyway.
I remember that I have cooledit which I last ran on my old Win98 machine. I could try installing that on my Win XP machine, I think it should work. I don't think I have a license for the MPEG2 encoder though. Oh heck, bang goes another hundred bucks. Teach me to try to do this on a shoestring budget.
For now I will try Goldwave, looks like I have 30 days to get this working,
thanks for all your help. Keep suggesting different routes, it is easy for me to get stuck on one idea.
Kevin -
Bugster,
I found this in the TMPGenc 2.5 Plus FAQ on the Pegasus web site ..
"4. TMPGEnc Plus General Issues
Q4-01 The sound of the created MPEG file is out of sync.
A Is the original source file captured MPEG?
In MPEG capture, when the video card drops frames internally, the time-axis may be corrected. When such a file is read via DirectShow, TMPGEnc Plus acquires the image and the sound separately, the time-axis slips and this may be missed by DirectShow. Depending on the compatibility of the source file and the decoder, it may be able to encode normally without sound gap. "
The MPEG I get from PD Pro shouldn't have any dropped frames as I captured using non-real time mode, but it does point to possible problems if the MPEG source bing used in TMPGenc was not from TMPGenc itself.
Is there any tool out there I can use to analyze my PD Pro MPEG file to see if there are dropped frames?
Kevin -
I used Goldwave's timewarp feature to convert audio from NTSC 29.97 to PAL 25fps. I used a factor of 84.175% which if my calculations were right should be the correct value. (why do all the presets only cover 23.976)
I then used TMPGenc multiplex to mux the 'warped' audio back with the PAL video stream (which I obtained using avisynth & TMPGenc). The audio run much too slow. So next I loaded the video only stream (.m2v from avisynth process) into TMPGenc preview, it said it was only 38 mins, 26secs long, the original video was 1hr 2secs long ! Clearly the NTSC to PAL conversion using avisynth is not working properly yet. Yes it gives me smooth video but I had not noticed it was running so fast.
I need help now with fixing my avisynth script to get the correct length video, but I wondered as this was a video question should I be posting it to another forum? I could post my avisynth script here but I don’t want to break any of the forum rules.
BTW I managed to get Power Director PRO to output DV AVI. I created a short (20 sec) clip. I used TMPGenc to demultiplex it, then multiplex it back together again. The audio was in sync still, however I repeated the test but using MPEG exported from PD PRO and the audio was still in sync. I think I need to have a much longer clip for the experiment to show up anything.
Anyway, I need to get avisynth working properly or the whole NTSC to PAL conversion is a non-starter,
thanks,
Kevin -
Can't help you with avisynth as I have never used it. Shame oyur video conversion process isn't working as well as you thought.
Framerates. NTSC is 29.97fps as you know, and thats what you get from your DV Cam. However, many DVD's originat from Film, which is 24fps. So they are encoded at 23.97fps (pretty close to 24 I think you will agree) and then have 3:2 pulldown flags added. This tells the DVD player to repeate certain fields within the video to achieve an actual playback rate of 29.97fps. This is why the BeSweet presets are 23.97 and 25, as the tool is aimed mostly at DVD rippers.
When film material is prepared for NTSC video or TV broadcast, a technique called Telecine is often used. This is a bit like pulldown except the repeated fields are actually included in the stored/broadcast information. In these cases, Inverse-telecine can be used to get the video back to 23.97fps and conversion to Pal from there is simply a matter of speeding up the movie (audio and video) by approx 4%.
As your source is DV, it is truly 29.97fps. I am no expert on this, but am reliably informed that trying to use inverse telecine on a true 29.97fps video will result in a very poor looking result, so I wouldnt reccomend this route.
However, if you can't IVTC, then you must lose some frames otherwise the speed difference between 29.97 and 25 will be too big. I am not sure what is the best method for this, perhaps a post on one of the advanced conversion forums will elicit a better response to thsi question. Your target should be to get smoothest possible playback with the smallest difference in overall movie length you can achieve.
As you source is DV, there is a tool that claims to do format conversion here: www.dvunlimited.com. I have not tried this tool so cannot vouch for it in anyway, I have just seen this link by another poster. It might be what you are looking for, it might be a piece of junk. I think there is a free trial version so it won't cost you anything other than a bit of time to give it a try. -
I have previously tried "aDVanced DV PAL/NTSC Converter" (about a month ago) and yes it did work, apart from not insignificant artifacts of the conversion which the author said he was working on improving. I didn't consider the product to be working well enough to justify the $98 US and had decided to give it another try after some time had passed and hopefully the quality had been improved.
My hopes were raised when I read the guide on this website ..
"Standards Conversion (on the cheap)" by xesdeeni2001 - Guide added Jul 02, 2003
I followed the instructions for “VII. NTSC (video) DVD (29.97i Fps) -> PAL DVD (25i Fps)”
This was the closest to what I was trying to do, only difference was that the original video source was DVD. So for the first step in my avisynth script I just made some changes so instead of importing the output from DVD2AVI I just imported the MPEG (from PD PRO) directly. This appeared to work, but have since found out that the speed is wrong. It may be that some of the options set in the script need to be there if the source is from DVD2AVI but not if the source is straight MPEG. As you say, perhaps I now need to post questions on this to another forum,
Kevin -
Bugster,
I posted my questions to the 'Advanced Conversion Forum' as you suggested. I have got some help but no answers yet. Someone questioned whether I should have ChangeFPS(50) in my avisynth script, I am looking into this at the moment. From the avisynth docs it appears that the behavior of ChangeFPS depends on the version of avisynth being used. It is confusing but if I read the docs correctly v2.5 removes frames and duplicates frames and ends up with the same video length as the original. This may be why multiplexing stretched audio with the converted video doesn't work for me.
Perhaps I need to use an older version of avisyth so it works with the commonly used audio conversion procedures?
To me it would seem desirable to keep the same video length after conversion as the original but the docs do say that the plugins which adjust the video length during the conversion can end up with superior video.
Kevin -
Sorry, I can't help you with avisynth stuff, i really know very little about it.
-
Try using TMPGEnc's built0in standard's converter. It is supposed to drop and duplicate frames correctly to acheive the same length as the source video (or so I believe, it worked on Finding Nemo
..........don't ask, it wasn't for me)
-
Hi,
sorry for the delay but I think my email filtering must have directed the forum post notification into the deleted bin. I need to fine tune my filter setup. (I am having to filter a lot of emails these days).
I have been working with the guys from the Doom9 forum these past few weeks and with their help managed to resolve my audio sync problems.
In the end the cause was identified as being BAD MPG from Power Director Pro. It is creating MPG which according to the header is 29.97fps when in fact the frame rate is really 30fps. Once I knew this it was then easy to fix in avisynth using 'assumefps(clip,30)'
I have attached my final .avs script which I used with avisynth to frameserve to TMPGenc. In TMPGenc I load the PAL SVCD template and output my SVCD MPG. The resulting video is smooth and the audio is in sync.
Some notes on preparing the data:
1) load the MPG from PD PRO into TMPGenc/tools. Demultiplex to produce the .m2v (video) and .mp2 (audio) streams.
2) Open up DVD2AVI and load the .m2v and write out the project file (.d2v). Now you have the input files for the following .avs script ..
In TMPGenc load the following .avs script (just load this file where you would normally input the video file (bottom of TMPGEnc screen) ..
PluginPath = "c:\AVISynth25\Plugins\"
LoadPlugin(PluginPath + "MPEG2Dec3.dll")
LoadPlugin(PluginPath + "SmoothDeinterlacer.dll")
LoadPlugin(PluginPath + "mpasource.dll")
video=mpeg2source("D:\CONVERSION\ntsc_8000.d2v", idct=5) # Project file from DVD2AVI
video=assumefps(video,30) # assumefps is needed here because PowerDirector PRO produces
# video with a header saying it is 29.97fps when infact it is 30!
# If this step is not done then audio will be out of sync.
audio=MPASource("D:\CONVERSION\ntsc_8000.mp2")
video=audiodub(video,audio)
video=Bob(video) # Separate fields and interpolate them to full height.
video=BicubicResize(video,720, 576) # Resize to PAL square-pixel frame size. (Use 720,576 for CCIR.)
video=ConvertToYUY2(video,interlaced=true)
video=ConvertFPS(video,50) # Convert field rate to PAL, using Blend Mode.
video=SeparateFields(video) # Undo Bob ..
video=SelectEvery(video,4, 0, 3) # Even field first. Use SelectEvery(4, 1, 2) for odd field first.
video=Weave(video) # Finish undoing Bob.
return(video)
(Note, there are other MPEG encoders for avisynth, including one which will read the MPG file directly but I was guided to use MPEG2SOURCE as it produces a superior result. The small overhead of creating the DVD2AVI project file (.d2v) is not really any problem.
Thanks to all for your help,
Kevin
Similar Threads
-
when Pal dvd has correct Ntsc audio (Pal>Ntsc conver)
By spiritgumm in forum Video ConversionReplies: 15Last Post: 13th Oct 2011, 12:57 -
Newbie needs to convert NTSC VHS tapes to PAL DVD
By mcullen8320 in forum Newbie / General discussionsReplies: 3Last Post: 13th Nov 2008, 13:51 -
Newbie with PAL / NTSC prob.
By Lucianp in forum Newbie / General discussionsReplies: 7Last Post: 23rd Mar 2008, 10:38 -
NTSC-PAL-NTSC (25-23.976+pulldown) and audio sync problem - related?
By ecc in forum Video ConversionReplies: 14Last Post: 14th Nov 2007, 11:34 -
Newbie needs bitrate calculation advice to convert my 1st PAL to NTSC
By queen_anne in forum Video ConversionReplies: 35Last Post: 20th May 2007, 21:48