Log in

View Full Version : BeSweet PAl -> NTSC problem


dhv
23rd February 2003, 10:10
There is problem with frame rate conversion from PAL 25 fps to NTSC 23.976 fps. I try to decode AC3 to six waves, downsampling to 44100 Hz and convert PAl to NTSC. I read the FAQ and there is a statement that not all frame rate conversions work, but PAL/NTSC is the common thing. For Me 25 --> 23.976 (ot 24) fps conversion is most important, because PAL soundtracks are 4% faster than normal. Here is the logs:


BeSweet v1.5b16 by DSPguru.
--------------------------
Using azid.dll v1.8 (b825) by Midas (midas@egon.gyaloglo.hu).
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).

Logging start : 02/23/03 , 10:57:37.

c:\GordianKnot\BeSweet\BeSweet.exe -core( -input e:\Audio\VTS_07_1 - 0x80 - Audio - AC3 - 6ch - 48kHz - DRC - English - DELAY 0ms.ac3 -output e:\Audio\result- -6ch -logfile C:\GORDIANKNOT\BESWEET\BeSweet.log ) -azid( -L 0 -l 0db ) -ota( -r 25000 23976 ) -ssrc( --rate 44100 )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : e:\Audio\VTS_07_1 - 0x80 - Audio - AC3 - 6ch - 48kHz - DRC - English - DELAY 0ms.ac3
[00:00:00:000] | Output: FL, FR, SL, SR, C, LFE
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] +-------- AZID -------
[00:00:00:000] | Input Channels Mode: 3/2, Bitrate: 384kbps
[00:00:00:000] | Total Gain: 0.000dB, Compression: None
[00:00:00:000] | LFE levels: To LR -INF, To LFE 0.0dB
[00:00:00:000] | Center mix level: BSI
[00:00:00:000] | Surround mix level: BSI
[00:00:00:000] | Dialog normalization: No
[00:00:00:000] | Rear channels filtering: No
[00:00:00:000] +------ Shibatch -----
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] | Dest. Sample-Rate: 44.1KHz
[00:00:00:000] | Attenuation : 0.0db
[00:00:00:000] +-------- FRC --------
[00:00:00:000] | Source Frame-Rate: 25000
[00:00:00:000] | Dest. Frame-Rate: 23976
[00:00:00:000] +---------------------


-------------------------------------

BESWEET caused an invalid page fault in
module SHIBATCH.DLL at 0197:00afa909.
Registers:
EAX=000bb500 CS=0197 EIP=00afa909 EFLGS=00010202
EBX=004f7920 SS=019f ESP=006bfbd8 EBP=fffdaf00
ECX=0002ed40 DS=019f ESI=004f7920 FS=630f
EDX=bffc9490 ES=019f EDI=006d724c GS=0000
Bytes at CS:EIP:
f3 a5 a1 e8 2d b0 00 0f af 05 1c 2e b0 00 50 ff
Stack dump:
2e82be10 00000000 2e5c035b 2e8d3c1b 008e4240 006bfc28 00000000 010021d7 00000005 3ffc0000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000

------------------------------------

The AC3 file is standard 48kHz 5.1 channel soundtrack. My system is P3 Celeron 1.2 GHz, MB Gigabyte, 256 MB SD-RAM, Win98 SE. (On other systems this not working also). I try also BeSweet v1.4 and the result was the same.

Excuse my English, Thanks in advance.

moon1234
25th February 2003, 01:39
See Below

moon1234
25th February 2003, 02:30
This I can help you with.

I have done over 100 conversions from PAL DIVX/DVD to NTSC FILM SVCD so here is the process that I use:

Assumptions:
The audio is either AC3 or MP3. These are the only two audio codes I deal with. I don't mess with MPEG 5.1 or AC3 to AC3 conversion. It is a pain in the ass and not worth it. You can't tell the difference with a good DPL II decoder. I use DVD2SVCD for all of my work. Substitue manual processes for any that are automated with DVD2SVCD. I also assume that you will be using the GUI for BeSweet. I can never remember all the command line switches. I use CCE, process should be similar for TMPEG.

Process:
1. Select your DVD/AVI in DVD2SVCD.
2. Enter all pertinent info (Bitrates, Descriptions, etc.) Make sure that you choose to edit the AviSynth script as part of the encode process. Also make sure that you select the option to NOT delete any files.
3. Begin the conversion. DVD2SVCD will rip the audio for you to the temp directory. If the audio is MP3 and you are using a fairly new version of DVD2SVCD (1.5.10 , etc) then let madplay convert the file to .WAV. If the audio is AC3 then kill besweet when it starts running. Also kill BeSweet after Madplay gets done.
4. The AviSynth script file will pop up for you to edit. Minimize it and DVD2SVCD at this point.
5. If your audio is AC3 then launch up BeSweet Gui and continue on. If your audio is MP3 then skip to step 6.

We need to get the AC3 file into .WAV format so that we can pitch shift/time shift correct. Click the Input button and select your AC3 file. It is located in the DVD2SVCD temp directory. Leave the Output file at its default. Now click the AZID 1 tab. Enter -3db in the "LFE to LR Channels" field. Click the Stereo checkbox and select Surround2 from the drop down list. This will create a Dolby Prologic II downmix from a 5.1 AC3. Also does a nice job on AC3 stereo. Lastly check the Normalize box and type in 100.

Click the BeSweet button and then click the "AC3 to WAV" button.
6. Now we need to use an Audio Editor to Pitch Shift the audio. I like to use SoundForge 6. I have also used CoolEdit Pro 2. They both work.

Since 95% of PAL based content was origionally film (and most studios are lazy) the audio has most likely just been sped up. We need to slow it down and eliminate the chipmunk effect.

For Soundforge you open the .WAV file and select the Effects>Pitch>Shift menu item. Uncheck "Preserve Duration" and then move the "Cents" slider bar to -72.4 (Don't type it in. It will round to the nearest cent) The transposition ratio should read .95904. Click the "OK" button. Soundforge will stretch the file back to its origional length (Well very close. It is always off by at least 20ms, but this will not be noticeable.) Save the file and then close Sound Forge.

For CoolEdit you do a pitch shift, but select resample. You need to type in 104.271 for the shift value. This will also not be 100% time accurate, but should be within 10-20ms or the correct time. Save your corrected file.

7. Now we need this file in MP2 format for our SVCD (If your target is some other format then encode to whatever format you want). Launch BeSweet back up and this time click the Input file and select the .WAV file that you pitch corrected. Click "OK". Hit the drop down list to select the format to convert to and select MP2. Now click the output button and select MP2 from the drop down list. Double click on the file that shows up on the left. It should be named Encoded_Audio_1.mp2. If it isn't there then type in that filename. Click "OK". Now click the "2Lame" button. Check "Encoding mode" and select "Stereo" from the drop down list. check "PSY Model" and select 2. I use a bitrate of 224, you can use what you like. Now click the "BeSweet" button and then click the "WAV to MP2" button. Your file will be converted to MP2.

WOW, Whew take a breather. We are not done yet.

8. Remember we still have that AviSynth script minimized from hours back (Well maybe not hours). We now need to bring that back up. Here is where the tricky part comes in. If you are converting a 16:9 movie then change the BicubicResize line to look like: (I convert mostly DIVX files that have already been trimmed and resized to 640x360. Most PAL DVD's are 720x576 with larger black bars. I suggest trimming the bars off before you resize. www.avisynth.org for the commands.)

BicubicResize(480,360,0,.75)

This will correctly resize the movie. If you forgot to select 16:9 back in DVD2SVCD then you will also need to add borders:

AddBorders(0,60,0,60)

And finally you will need to change the framerate to NTSC film:

AssumeFPS(23.976)

If your movie was fullframe then just resize to 480x480. I know there are purists that say that this is not a true 4x3, but you won't be able to tell the difference.

So your Final AviSynth script will look like:

LoadPlugin("C:\PROGRA~1\DVD2SVCD\MPEG2Dec\mpeg2dec.dll")
AVISource("path to file",False)
ConvertToYUY2()
BicubicResize(480,360,0.0,0.75)
AddBorders(0,60,0,60)
AssumeFPS(23.976)

Click "Ok" and let the video convert.

9. What you thought that was it? Well we will need to manually run pulldown after the video conversion is over. If you don't want to wait around for the file to finish then you can always repeat steps ala the recover button.

OK. Once the video conversion is finished, kill BBmpeg if it pops up and starts multiplexing your file. Also kill DVD2SVCD. Now we need to run pulldown on our converted file. This will instruct the playback device (Your DVD player) to telecine the file on the fly as it is being played. Here is the batch file that I use. Paste this into notepad and save it as pulldown.bat
----------------------------
"C:\Program Files\DVD2SVCD\Pulldown\pulldown.exe" "C:\Documents and Settings\moon1234\Desktop\Tes7\Encoded_Video_CCE_PAL.mpv" "C:\Documents and Settings\moon1234\Desktop\Tes7\pulldown.mpv"
cd "C:\Documents and Settings\moon1234\Desktop\Tes7"
del Encoded_Video_CCE_PAL.mpv
ren pulldown.mpv Encoded_Video_CCE_PAL.mpv
--------------------------------
Modify it to match the paths to the files on your machine.

10. Once pulldown has been applied you will need to launch DVD2SVCD back up and click the "Misc" tab. Click the recover button and select the project file that is displayed. Select "Muxing and cutting" from the drop down list. Now click continue.

DVD2SVCD will mux your Audio and Video files together with BBmpeg and create the SVCD for you.

11. This is almost the last step trust me. If you look in the temp directory you will have a file called BBmpeg_Muxed_file.mpg. You may watch this file in your favorite DVD player. I like WMP with the Intervideo decoder filters. You want to make sure that the audio is in sync with the video. Find a spot in the movie where there are people talking. The faster the better. The audio should be spot on with their lips. If it isn't then you will need to do step 12.

12. If the audio is behind the lipsync then we will need a negative audio skew. If it is ahead of the lipsync then we will need a positive audio skew. The easiest way of doing this is to open up the DVD2SVCD temp folder. You are looking for a file called DVD2SVCD.ini. Open this file in notepad and do a searchfor bbMPEG "audioDelay Adjustment". It should be 180 by default. If the audio was coming after the lip movement then lower this number (Try 140). If the audio was coming before the lip movement then increase the number (Try 220). Save the file then go back to step 10.

Once you have the audio skew correct you can burn the SVCD .CUE files using Nero. Pop them in your DVD player and be amazed that you did your first PAL DIVX/DVD conversion and that it looks awasome and sounds awesome.

I hope this was helpful, if not long.

-Moon1234

dhv
25th February 2003, 08:37
Thanks for your complete answer.
In fact I'm trying to do something different - I want to make DTS audio CD from isolated PAL soundtrack, which is accelerated by 4%
I want six channels decoded to wav, so I can edit them with CoolEdit Pro. I can slow them down with CoolEdit, but this takes loooong time. I was hoping BeSweet can do this, but it crashed. So I must continue use CoolEdit Pro.
Anyway, thanks for sharing your experience.

moon1234
25th February 2003, 21:25
AFAIK there are no free, or cheap, DTS encoders. From your previous post you seem to already have the tools to do this. The process that you are using is actually the best one. You may have a problem stretching the AC3 files individually. None of the desktop apps are sample accurate when stretching, so your final 6 .WAV files will not be the same length. You may not be able to tell though.

My next question is why do you want to do this? There will be no quality gain in going from AC3 5.1 to DTS.

-Moon1234

dhv
26th February 2003, 08:36
Yes, I have the tools, they are not free. SurCode CD DTS and CoolEdit Pro. The reason I want to do this conversion is my weird reciever. It has bad Dolby Digital decoder (Dynamic range compression cannot be swithed off!), but DTS is just perfect. I know the quality of DTS will be no different (in fact even slitly worse, but practically unnoticeably).
CoolEdit Pro is sample accurate, I tested it. The lenght of the waves is perfectly equal after stretching. The problem is that it is too slow and must repeat everything 6 times. That's why I hope BeSweet will be fixed in the future.

DAWG98
18th April 2003, 04:32
IMO Prosoniq's Timefactory does the best timeshifting. Besweet and Cooledit cannot touch it. Perfect result.

FulciLives
2nd May 2003, 04:41
Hello :)

I once had a problem using BeSweet to convert AC-3 to AC-3 when using the preset PAL (25fps) ---> NTSC (23.976) option. It would result in a new AC-3 sound file that had popping or clipping noises. Very annoying. However, I was instructed by DSPGuru to use the most current Beta versions of BeSweet and the BeSweet GUI and have not have any problems since. Clean sound and the lipsynch is perfect.

However ...

When I made my DVD-R (video converted to 23.976 NTSC resolution) and added my AC-3 audio tracks I found that some DVD players could not "handle" the AC-3 if I had gone from a 2.0 AC-3 to a 2.0 AC-3 yet the same DVD players had no problem if I had gone from a 5.1 AC-3 file to a 5.1 AC-3 file. I did find a couple of players (a Panasonic RV-32 and a Cyberhome CH-500) that had no problems what-so-ever with either the 5.1 or 2.0 AC-3 soundtracks. Yet my Pioneer (model 606D which is an older model) and a Samsung (a friend's machine I do not know the model number otherthan it is 2 to 3 years old according to my friend) would both do 5.1 AC-3 but not 2.0 AC-3 (which would either lock the players up or cuase stuttering playback).

For the record I only ever made 2 DVD-R discs that were converted from PAL to NTSC. One had the movie in 5.1 and a trailer in 2.0 whereas the otherone just had the movie with a 2.0 AC-3 audio track. Again, the Pioneer couldn't handle the 2.0 AC-3 but did the 5.1 AC-3 perfectly. So I assume that BeSweet does someting in the 2.0 AC-3 to 2.0 AC-3 conversion that some players don't like. I don't know if the PAL to NTSC was the problem or the 2.0 to 2.0 but the 5.1 to 5.1 doing PAL to NTSC seems to work fine. Very odd.

For the record the final 2 NTSC DVD-R discs were authored with SpruceUp since it is the only fairly easy-to-use authoring program I am aware of that accepts AC-3 input. So it could be that SpruceUp was the problem as I never tried to re-create these discs using a different authoring program (I attempted to learn Maestro but had a VERY slight nervious break down attempting to do so).

- John "FulciLives" Coleman

P.S.
I have a Cyberhome CH-500 DVD player that does a really great PAL to NTSC conversion so in the future I am considering using it as a source to play back a PAL DVD (converting to NTSC) and simply doing a recording to a Panny stand alone DVD recorder. Of course this means that if the original has a 5.1 AC-3 track I will only get a 2.0 AC-3 track on the Panny DVD-R but it sure beats doing it on the computer ... it took a 2.4Ghz P4 with 512MB running WinXP Home about 17 hours to re-encode the ripped PAL DVD to NTSC using VBR 2 pass mode on TMPGEng ... although I must say the result was rather stunning in terms of picture quality. But I've done a couple LaserDiscs to a stand alone Panny DVD recorder and it also amazingly does a great job in the SP/120 minute recording mode and at real time speed! My two tests resulted in a DVD-R that looked to me to be as good as the original LaserDisc ... at least on a 27 inch television. And in case anyone is wondering ... the Cyberhome CH-500 is the only DVD player that does proper PAL to NTSC conversion while also being able to disable both macrovision and CGMS/A so although I haven't tried it yet I see no problem why I can't use it as a source for the Panny stand alone DVD recorder.

kenma
4th June 2003, 01:54
I read this thread to create svcds and much more....what I am interested in is the pitch shifting of an audio file, but not as described here from pal to ntsc, but from ntsc-to-pal. I do need to do the pitch shifting from NTSC23.976 to PAL. I'm wondering if you mention to help me with this issue ? I do need the settings for SoundForge (Pitch shift settings). I want to pitch shift an ac3-file which I was converting to six waves already. How to batch process these 6 files with the same pitch-shift settings in SoundForge ?
Is there a better tool to do that job out there ? Maybe direct ac3-pitch-shifting ? I tried BeSweet for it, but the chipmunk effect is not that funny as it sounds...I hope you could help me with it.

moon1234
6th June 2003, 06:02
There are two ways to compress the audio. One is to play it back faster. This is called pitch shifting. You are changing the the duration of the audio by playing it faster. So you wind up with a shorter overall file. This process will make higher pitched people sound like chipmunks. Some people can tell the difference, some can't. I sure can.

The other option is to time compress the file. This process will retain the origional pitch of the audio, but will slice out very small portions of the audio (Resample) to make the total playing time shorter. This is very effective when there is a small amount of compression (less than 8%) If you compress more than 8% strange artifacts start to appear, especially in speech and music.

The option is up to you.

Option 1
-------------
To pitch shift your AC3 file that you have separated into six waves using Soundforge do the following:

Open the first wav file and then select the Effects>Pitch>Shift menu item. Move the slider bar to a positive 72.4 cents value. Uncheck the preserve duration check box. Then start the pitch shift.

Once the shifting is done, then save the file and open the next wav. Repeat the above. Soundforge will remember the last setting for cents so you just need to click ok.

One you have shifted the Wav's you will need to use an AC3 encoder to reassemble the wav's into an AC3 file. The only "Working" tool that I know of is Softencode. BeSweet can do this , but there are some LFE issues.

If you are making an SVCD you really should be downmixing using Besweet/AZID to a DPLII optimized .Wav then pitch shifting and finally encoding to .MP2
--------------

For time compressing you can use the same process but use the appropriate menu options. I don't do this so I don;t have exact instructions.

Hope that helped.

-Moon1234