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 > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th October 2024, 22:00   #1  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 136
PAL Pitchers

I don't live in a PAL region, but I was wondering if there was I can create PAL pitched videos from NTSC videos. Well, is there?

For example, I want this video to sound like this video.

Last edited by jay123210599; 29th October 2024 at 22:32.
jay123210599 is offline   Reply With Quote
Old 30th October 2024, 00:20   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,087
What you're referring to is the classic PAL Speedup.
Essentially, when you have a 23,976fps content and you have to go to PAL you need to perform a 4% speed up so that it reaches 25fps. When you do that, you're making the overall length of the content slightly shorter and you're also changing the sampling (from 48000Hz you get around 50000Hz).

This is the 4% PAL speed up with resampling but without pitch adjustment:

Quote:
ResampleAudio(48000)
AssumeFPS(25, 1, true)
SSRC(48000)
This is with pitch adjustment

Quote:
ResampleAudio(48000)
AssumeFPS(25, 1, false)
TimeStretch(tempo=100.0*25.0/(24000.0/1001.0))
SSRC(48000)
In the pitch adjustment example above AssumeFPS() is leaving the audio alone at the original length as it only speeds up the video. The audio speed up + pitch adjustment is performed by TimeStretch(), however you could also technically use AssumeFPS() to also speed up the audio without pitch correcting it and then only correct it with TimeStretch in the same filterchain so that you don't have two different functions speeding up the video and the audio independently:

Quote:
ResampleAudio(48000)
ConvertAudioToFloat()
AssumeFPS(25, 1, true)
TimeStretch(pitch=96)
ResampleAudio(48000)
ConvertAudioTo24bit()

If you have performed the speed up in a different software instead of Avisynth (like in a NLE) and you only want to apply the pitch adjustment in Avisynth, then:

Quote:
ResampleAudio(48000)
ConvertAudioToFloat()
TimeStretch(pitch=96)
ResampleAudio(48000)
ConvertAudioTo24bit()

I regularly perform pal speedups pretty much every day and of course I also pitch adjust with TimeStretch which leverages on the SoundTouch library.
FranceBB is offline   Reply With Quote
Old 30th October 2024, 03:27   #3  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 136
All right, are these for AviSynth scripts? Where do I input my video?
jay123210599 is offline   Reply With Quote
Old 30th October 2024, 07:56   #4  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,087
Yes, those are Avisynth scripts.
Avisynth is a frameserver which means that you need to index a video with an indexer which creates an uncompressed A/V stream living in RAM that you can work on.
There are many indexers, but the most used general purpose one is libav:

Quote:
video=LWLibavVideoSource("source.mxf")
audio=LWLibavAudioSource("source.mxf")
AudioDub(video, audio)
You can find the documentation here in the wiki http://avisynth.nl/index.php/LSMASHS...bavVideoSource

The builds are here: https://github.com/HomeOfAviSynthPlu...orks/releases/

You need to put the plugins in the relative plugins64+ folder in C:/Program Files (x86)/Avisynth
As for the scripts, you can use AVSPmod mod to create them and preview them https://forum.doom9.org/showthread.php?t=175823 the builds are here https://github.com/gispos/AvsPmod/releases
Once you create the AVS Script.avs then you can use it to encode with any program that supports Avisynth as an input like x262, x264, ffmpeg, VirtualDub etc.

If you need a ready to use BAT + exe let me know and I'll upload it.

Oh, I almost forgot, make sure you get the latest stable Avisynth version from here https://github.com/AviSynth/AviSynthPlus/releases and install the latest Microsoft C++ Redistributable (I suggest the AIO package from here https://github.com/abbodi1406/vcredist/releases/
FranceBB is offline   Reply With Quote
Old 30th October 2024, 17:07   #5  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 136
I tried out all the scripts you gave me and none of them got the pitch right in VirtualDub2.

Video here:
https://www.mediafire.com/file/v0wyo...mple.webm/file
jay123210599 is offline   Reply With Quote
Old 30th October 2024, 21:02   #6  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,087
Quote:
Originally Posted by jay123210599 View Post
I tried out all the scripts you gave me and none of them got the pitch right in VirtualDub2.

Video here:
https://www.mediafire.com/file/v0wyo...mple.webm/file
I've got the source and I know why now.
The source you have is a 25fps source which has been converted to PAL without the speed up and it lasts 30 seconds, basically as long as the original 23,976fps master. The other video you pointed to lasts 28 seconds and went through the 4% PAL speedup (in fact it's shorter) but without pitch adjustment, which is why the sound is high-pitched.

What you're trying to do here is to take the 30 seconds 25fps clip and raise (screw up) the pitch as if it went through the speed up without pitch adjustment to make it match the 28 seconds one, which is... fine, I guess. Here:

Quote:
FFMpegSource2("D:\sample.webm", atrack=-1)

ConvertAudioToFloat()
TimeStretch(pitch=104)
It will still not sound exactly the same 'cause one video is faster than the other, but that will get you pretty close.


Pitch modified video here: https://we.tl/t-4tPlGXOX6H
(link valid for 3 days)
FranceBB is offline   Reply With Quote
Reply

Tags
ntsc, pal

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:24.


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