Log in

View Full Version : PAL to NTSC


Ruffa-Duffa
13th April 2014, 08:11
Let me start by saying I know this is a widely discussed topic and I supposedly should be able to figure this out on my own. Buuuut I can't. So bare with me. I'm trying to convert my own DVD rips from 25 fps to 23.976 fps without quality loss. I don't care about the difference in resolution. Video is easy. A little mkvmerge here, a little framerate change there and done. Audio is the hard part. I'm working with ac3 so eac3to would be and has been in the past fine with its -slowdown command however there's no option to pitch correct it. Meaning (since my DVDs were pitch corrected when I bought them) the command puts it to the right speed but about 4.096% lower in pitch. My next step was trying to use BeSweet but I've run into many problems. I believe I'm using BeSweet v1.5b31. Now when trying to encode it with aften.exe (as I believe I must) with this command
C:\BeSweet>besweet -core( -input "H:\title03.ac3" -output "H:\title03 slowed.ac3" -logfile "H:\title03.log" ) -soundtouch( -r 25000 23976 ) -bsn( -exe aften.exe -b 192 )

I get
BeSweet v1.5b31 by DSPguru.
--------------------------

[00:00:00:000] -- Initializing...

in command prompt and this log file

BeSweet v1.5b31 by DSPguru.
--------------------------
Using azid.dll v1.9 (b922) by Midas (midas@egon.gyaloglo.hu).
Using SoundTouch.dll v1.3.0 by Olli Parviainen (www.iki.fi/oparviai/soundtouch).
Using Shibatch.dll v0.25 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using bsn.dll v0.24 by DPeshev,Richard,E-Male,DSPguru (DSPguru.Doom9.org).

Logging start : 04/13/14 , 16:22:31.

besweet -core( -input H:\title03.ac3 -output H:\title03 slowed.ac3 -logfile H:\title03.log ) -soundtouch( -r 25000 23976 ) -bsn( -exe aften.exe -b 192 )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : H:\title03.ac3
[00:00:00:000] | Output: H:\title03 slowed.ac3
[00:00:00:000] | Floating-Point Process: No
Error 84: error configuring bsn!
Quiting...
[00:00:00:000] Conversion Completed !

Logging ends : 04/13/14 , 16:22:31.

I have aften.exe in the BeSweet folder as I assume you need to. I've also tried the same command with none of the bsn stuff and BeSweet goes transcoding and everything but once it's done it just outputs an ac3 file which, as far as I can tell, is exactly the same as the input. Here's the log

BeSweet v1.5b31 by DSPguru.
--------------------------
Using azid.dll v1.9 (b922) by Midas (midas@egon.gyaloglo.hu).
Using SoundTouch.dll v1.3.0 by Olli Parviainen (www.iki.fi/oparviai/soundtouch).
Using lame_enc.dll v1.32 (8/8/2003), Engine 3.90 <http://www.mp3dev.org/>.

Logging start : 04/13/14 , 16:33:57.

besweet -core( -input H:\title03.ac3 -output H:\title03 slowed.ac3 -logfile H:\title03.log ) -soundtouch( -r 25000 23976 )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : H:\title03.ac3
[00:00:00:000] | Output: H:\title03 slowed.ac3
[00:00:00:000] | Floating-Point Process: Yes
[00:00:00:000] +-------- AZID -------
[00:00:00:000] | Input Channels Mode: 2/0, Bitrate: 192kbps
[00:00:00:000] | Output Stereo mode: Dolby surround compatible
[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] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +----- SoundTouch ----
[00:00:00:000] | Pitch : 0 semitones
[00:00:00:000] | Tempo : -4 percents
[00:00:00:000] | Rate : 0 percents
[00:00:00:000] | AA-Filter : Yes
[00:00:00:000] | Quick Mode : No
[00:00:00:000] +-------- LAME -------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP3 bitrate : 128
[00:00:00:000] | Channels Mode : Joint Stereo
[00:00:00:000] | Error Protection: No
[00:00:00:000] +---------------------
[00:24:31:648] Conversion Completed !
[00:24:31:648] Actual Avg. Bitrate : 128kbps
[00:02:18:000] <-- Transcoding Duration

Logging ends : 04/13/14 , 16:36:15.



I'm new to BeSweet and in fact most of this in general so if anyone could help me out that would be great. Also, I'm fine with using a different piece of software or something as long as it can be precise so it adjusts the tempo to the exact percentage and as long as it's command line (I'm trying to work this into a batch script). Also, I'm fine with a program just changes pitch precisely because eac3to can slow it down and then I could change the pitch back with some other software if that would be easier. I don't believe eac3to has any pitch changing commands though.

Okay, thanks!

manolito
13th April 2014, 10:25
Yes you are using the right BeSweet version, but it could be that your versions of bsn.dll and Aften.exe are not the right ones.

Try these versions:
http://www10.zippyshare.com/v/11132011/file.html

And just a personal note: If you need pitch correction you must use SoundTouch, but pitch correction is generally a tricky business. Standalone software like Time Factory usually give you better results than SoundTouch. I personally try to avoid pitch correction whenever I can, and for BeSweet this means that I prefer OTA over SoundTouch. Just my 2 cents...


Cheers
manolito

Reino
13th April 2014, 19:45
In the past I've also used BeSweet, but nowadays there's no reason for me to use it anymore, because you can do PAL,NTSC-conversions with AviSynth, ffmpeg and sox for instance without much trouble.

PAL->NTSC

Rate-correction (tempo+pitch)

PAL-NTSC.avs (AviSynth-script):
NicAc3Source("D:\PAL.ac3")
SSRC(last,(AudioRate()*1001+480)/960).AssumeSampleRate(AudioRate(last))
ffmpeg.exe -i "D:\PAL-NTSC.avs" -c:a ac3 "D:\NTSC.ac3"
or
ffmpeg.exe -i "D:\PAL.ac3" -af "asetrate=46034" -c:a ac3 -ar 48000 "D:\NTSC.ac3"
// 48000*24000/25025≈46034, asetrate does both tempo and pitch conversion
or
ffmpeg.exe -i "D:\PAL.ac3" -f sox - | sox.exe -t sox - -t sox - speed 0.959040959 | ffmpeg.exe -f sox -i - -c:a ac3 "D:\NTSC.ac3"
// 24000/25025=960/1001≈0.959040959

PAL.ac3 - 2:00.000 (5760000 samples)
NTSC(avs).ac3 - 2:05.152 (6007296 samples)
NTSC(ffmpeg).ac3 - 2:05.152 (6007296 samples)
NTSC(sox).ac3 - 2:05.152 (6007296 samples)

Tempo-correction

PAL-NTSC.avs (AviSynth-script):
NicAc3Source("D:\PAL.ac3")
TimeStretch(tempo=(96000/1001))
ffmpeg.exe -i "D:\PAL-NTSC.avs" -c:a ac3 "D:\NTSC.ac3"
or
ffmpeg.exe -i "D:\PAL.ac3" -af "atempo=0.959040959" -c:a ac3 "D:\NTSC.ac3"
or
ffmpeg.exe -i "D:\PAL.ac3" -f sox - | sox.exe -t sox - -t sox - tempo 0.959040959 | ffmpeg.exe -f sox -i - -c:a ac3 "D:\NTSC.ac3"

PAL.ac3 - 2:00.000 (5760000 samples)
NTSC(avs).ac3 - 2:06.336 (6064128 samples)
NTSC(ffmpeg).ac3 - 2:05.120 (6005760 samples)
NTSC(sox).ac3 - 2:05.152 (6007296 samples)

NTSC->PAL

Rate-correction (tempo+pitch)

NTSC-PAL.avs (AviSynth-script):
NicAc3Source("D:\NTSC.ac3")
AssumeSampleRate(last,(AudioRate()*1001+480)/960).SSRC(AudioRate(last))
ffmpeg.exe -i "D:\NTSC-PAL.avs" -c:a ac3 "D:\PAL.ac3"
or
ffmpeg.exe -i "D:\NTSC.ac3" -af "asetrate=50050" -c:a ac3 -ar 48000 "D:\PAL.ac3"
// 48000*25025/24000≈50050
or
ffmpeg.exe -i "D:\NTSC.ac3" -f sox - | sox.exe -t sox - -t sox - speed 1.042708333 | ffmpeg.exe -f sox -i - -c:a ac3 "D:\PAL.ac3"
// 25025/24000=1001/960≈1.042708333

NTSC.ac3 - 2:00.075 (5763584 samples)
PAL(avs).ac3 - 1:55.168 (5528064 samples)
PAL(ffmpeg).ac3 - 1:55.168 (5528064 samples)
PAL(sox).ac3 - 1:55.168 (5528064 samples)

Tempo-correction

NTSC-PAL.avs (AviSynth-script):
NicAc3Source("D:\PAL.ac3")
TimeStretch(tempo=(5005/48))
ffmpeg.exe -i "D:\NTSC-PAL.avs" -c:a ac3 "D:\PAL.ac3"
or
ffmpeg.exe -i "D:\NTSC.ac3" -af "atempo=1.042708333" -c:a ac3 "D:\PAL.ac3"
or
ffmpeg.exe -i "D:\NTSC.ac3" -f sox - | sox.exe -t sox - -t sox - tempo 1.042708333 | ffmpeg.exe -f sox -i - -c:a ac3 "D:\PAL.ac3"

NTSC.ac3 - 2:00.075 (5763584 samples)
PAL(avs).ac3 - 1:55.488 (5543424 samples)
PAL(ffmpeg).ac3 - 1:55.168 (5528064 samples)
PAL(sox).ac3 - 1:55.168 (5528064 samples)
As far as duration is concerned, sox seems to be the most consistent method.

Ruffa-Duffa
14th April 2014, 11:09
Thanks for the help manolito. The supplied files did work. My command I had set out in my post didn't actually work because the output title03 slowed.ac3 was written without quotes so it was interpreted as title03. So I had a file called just title03 with no extension. I put the ac3 extension on and it worked fine. That was rather trivial but I figured I should include it just in case. So once I had my ac3 I couldn't help but notice significant quality loss straight away on the big sounds such as a blast of fire (this is Avatar: The Last Airbender so the first 10 seconds features the sounds of each element) with the big range of different sounds getting mixed up and distorted. This doesn't seem to be present on my ac3 file I got from eac3to with no pitch correction. So you seem to be correct manolito, pitch correction is risky. TimeWatch II is paid and for Mac (I have Windows) so it's not really what I'm looking for. I'm assuming you mean TimeWatch II. Special emphasis on the "II". I'm going to try some of CoRoNe's suggestions now.

manolito
14th April 2014, 11:51
I was talking about Prosoniq Time Factory II. But whatever software you use - pitch correction for high quality musical content is difficult, and there is a good chance that you will end up with ugly audible glitches.

I would be interested to hear about your results with SoX and ffmpeg...


Cheers
manolito

Ruffa-Duffa
15th April 2014, 12:01
I was talking about Prosoniq Time Factory II. But whatever software you use - pitch correction for high quality musical content is difficult, and there is a good chance that you will end up with ugly audible glitches.

I would be interested to hear about your results with SoX and ffmpeg...


Cheers
manolito

I've experimented with SoX and AviSynth (through ffmpeg) but I haven't bothered with ffmpeg on its own yet. It's 11:10 PM here in Darwin so I'm not going to bother with fiddling around with other stuff yet. What I did find a couple hours ago however was that CoRoNe did not understand my question. I've used their code but it comes out with non-pitch corrected slowdown. There could options for changing pitch but I haven't bothered to look into them yet. Also I meant TimeFactory II not TimeWatch II. Anyway, the details I mentioned still remain true. When I looked it up I found Prosoniq has become part of zynaptiq. I found the software here:
http://www.zynaptiq.com/timefactoryii/
Anyway, I'll keep you posted.

P.S. I meant to send this yesterday night but somehow I just kept the post on my computer and forgot to send it. Oh well.

Reino
15th April 2014, 19:26
What I did find a couple hours ago however was that CoRoNe did not understand my question. I've used their code but it comes out with non-pitch corrected slowdown.Then you must have made a mistake, because all the 3 options I posted do just that; tempo and pitch correction.

tebasuna51
15th April 2014, 22:22
I think Ruffa-Duffa want change Tempo and preserve Pitch.

Something like:

NicAc3Source("D:\PAL.ac3")
TimeStretch(tempo=(96000/1001))

work fine for stereo audio.

Ruffa-Duffa
16th April 2014, 08:33
Thanks for the help tebasuna. The quality is still just not up to snuff for me. It would be fine if I just wanted one bit for editing or something but I'm looking for audio for all of my Avatar episodes.
Just for the record CoRoNe when I say pitch correction, I mean the same pitch as my PAL DvdRip. I want the pitch to be the same as it was before I altered anything. Does that clear things up at all?

setarip_old
16th April 2014, 18:59
Rip your movie to the hard drive with DVD decrypter. Then open your newly ripped files with VOB blanker. Under the title set block (center of program window), you'll see your VOB files. The center column says "video format". My example says NTSC 4:3 720x480. If you right click on the VOB's you want to convert, then select "video attributes", you'll see a new window pop up. In this window, you can change the "standard" from PAL to NTSC and vice versa. You can even change the resolution in this window.

I've successfully converted a PAL DVD to NTSC, by using the "VOBBlanker method" I quoted earlier, coupled with using IFOEdit to change all remaining PAL references to NTSC in all .IFOs and .BUPs (and, of course, changing it to R1). It plays beautifully on my unbelievably "finicky" SONY NS725P.

I had to use DVD SubEdit to raise the vertical position of the subtitles. What a great little tool - it took less than two minutes from initial file loading to completion!

I have but one lingering problem that I hope someone can resolve for me. On the main/initial menu screen, the selection cursor is not visible (It is, however, visible on the "Scene Selection" and "Languages" menu screens). The buttons on the main menu screen DO function properly, it's just that you have to guess which one you've selected with the left and right arrow radiobuttons on the remote control.

For kicks and giggles, you might want to read my postings in the following thread (Despite the warnings posted by others, I attained very acceptable results):

http://forum.doom9.org/showthread.php?t=115963

The only specific I didn't mention in that thread is - In IFOEdit, open "VTS_01_0.IFO" and in "VTS Overview", change "Menu Attributes" to "NTSC". Save BOTH .IFO and .BUP (Although the IFOEdit screen will then look like it is still set to "PAL", it's not. Just load the revised "VIDEO_TS.IFO" into IFOEdit to see that this is true). Repeat this procedure for each Title...

Ruffa-Duffa
17th April 2014, 11:43
Rip your movie to the hard drive with DVD decrypter. Then open your newly ripped files with VOB blanker. Under the title set block (center of program window), you'll see your VOB files. The center column says "video format". My example says NTSC 4:3 720x480. If you right click on the VOB's you want to convert, then select "video attributes", you'll see a new window pop up. In this window, you can change the "standard" from PAL to NTSC and vice versa. You can even change the resolution in this window.

I've successfully converted a PAL DVD to NTSC, by using the "VOBBlanker method" I quoted earlier, coupled with using IFOEdit to change all remaining PAL references to NTSC in all .IFOs and .BUPs (and, of course, changing it to R1). It plays beautifully on my unbelievably "finicky" SONY NS725P.

I had to use DVD SubEdit to raise the vertical position of the subtitles. What a great little tool - it took less than two minutes from initial file loading to completion!

I have but one lingering problem that I hope someone can resolve for me. On the main/initial menu screen, the selection cursor is not visible (It is, however, visible on the "Scene Selection" and "Languages" menu screens). The buttons on the main menu screen DO function properly, it's just that you have to guess which one you've selected with the left and right arrow radiobuttons on the remote control.

For kicks and giggles, you might want to read my postings in the following thread (Despite the warnings posted by others, I attained very acceptable results):

http://forum.doom9.org/showthread.php?t=115963

The only specific I didn't mention in that thread is - In IFOEdit, open "VTS_01_0.IFO" and in "VTS Overview", change "Menu Attributes" to "NTSC". Save BOTH .IFO and .BUP (Although the IFOEdit screen will then look like it is still set to "PAL", it's not. Just load the revised "VIDEO_TS.IFO" into IFOEdit to see that this is true). Repeat this procedure for each Title...
Thanks I'll look into that. I probably won't do all of that because I actually live in Australia, have an Australian PS3 and a region free DVD player and anyway, I'm only want the files on my hard drive, I don't really care about an NTSC DVD collection of the series.
About your one problem with the program maybe it's not something you did wrong but a bug? You've probably already considered this but just in case maybe you should do a google search on it to clarify.

Reino
20th April 2014, 14:51
Just for the record CoRoNe when I say pitch correction, I mean the same pitch as my PAL DvdRip. I want the pitch to be the same as it was before I altered anything. Does that clear things up at all?You obviously don't know the difference between a rate-, tempo- and pitch-correction. If you want the pitch to be the same, you clearly only want a tempo-correction! I updated my previous post.