Log in

View Full Version : eac3to - is there a pitch correction option?


chronis
20th March 2021, 19:29
I can't seem to find any documentation/discussion on whether eac3to has a pitch correction option when converting or slowing down FPS. (I think not, but not 100% sure).

I am referring to the same option that is found in MeGUI, called "slow down.. with pitch correction", as opposed to "slowdown..." (without correction).

I have done many conversions with both eac3to and MeGUI and I can confirm that changetoFPS option does not do any correction. In other words, the pitch changes (drops a tone or more) when converting, let's say, 25FPS to 24FPS. With MeGUI, on the other hand, the pitch correction ensures that the pitch does NOT change. This is obviously important because if the film was transferred properly to DVD, the audio has the correct cinematic pitch (the one you'd hear in the cinema).

Lastly, if eac3to does not have this option, is MeGUI a good alternative for this task? I'm not too familiar with any of its potential weaknesses.

tebasuna51
20th March 2021, 21:48
eac3to doesn't have a option to preserve the audio pitch, slowdown/speedup change the audio pitch.

AviSynth, used with MeGUI or BeHappy, have the option with the TimeStretch function.

But the easy way to change the audio duration preserving the pitch is use the 'atempo' function of ffmpeg:

ffmpeg INPUT -af "atempo=0.959041" -acodec X -PARAMETERS OUTPUT

with:
fps's video TimeStretch ffmpeg
---------------- -------------------
23.976 -> 25.000 1.042708 speedup
23.976 -> 24.000 1.001
24.000 -> 25.000 1.041667
24.000 -> 23.976 0.999001
25.000 -> 24.000 0.96
25.000 -> 23.976 0.959041 slowdown

Richard1485
20th March 2021, 22:50
This is obviously important because if the film was transferred properly to DVD, the audio has the correct cinematic pitch (the one you'd hear in the cinema).

For the vast majority of PAL DVDs, pitch correction is not applied when the source is sped up to 25fps; consequently, the original pitch is restored upon slow-down, which is why eac3to (and most other programs) behave as they do. There's nothing improper about allowing the pitch to be about a semitone too high; it's accepted as part of the conversion from film and has been for decades. Most people in PAL countries are so used to it that they don't think anything of it. You might have a rare example of a disc with pitch-correction, but I'd make doubly sure that the pitch is wrong after slow down before using another method.

tebasuna51
21st March 2021, 11:14
... the original pitch is restored upon slow-down...

That is the reason than madshi say to don't make a option to preserve the pitch, obviously not always is correct. The user must choice.

Richard1485
21st March 2021, 12:16
That is the reason than madshi say to don't make a option to preserve the pitch, obviously not always is correct.

Yes, of course, my friend. That sentence began: "For the vast majority..." It would be useful to be able to override the default behavior with a switch that preserved the pitch, but madshi probably thought that it might create problems, with people applying it unnecessarily, which is a valid concern.

tebasuna51
21st March 2021, 22:05
Just to clarify to users when we need restore the pitch.

If we have a PAL DVD (played at 25 fps) created from a NTSC DVD (played at 23.976 fps) most the time the video frames are the same then the video duration is a 4% less, and the english track is stretched changing the pitch. If you want that track to join with the video at 23.976 you can use 'slowdown' to obtain the same duration and pitch than original NTSC DVD.

But what happen with spanish, french or german audio tracks of that PAL DVD?
Have the correct pitch? The audio is dubbed over a video played at 23.976 or 25 fps?

An initial audio conversion between NTSC and PAL is always make changing the original pitch?

Richard1485
21st March 2021, 22:39
If we have a PAL DVD (played at 25 fps) created from a NTSC DVD (played at 23.976 fps) most the time the video frames are the same then the video duration is a 4% less, and the english track is stretched changing the pitch. If you want that track to join with the video at 23.976 you can use 'slowdown' to obtain the same duration and pitch than original NTSC DVD.

Yes. A good PAL movie DVD should be sourced from a PAL master taken from film elements, not from an NTSC DVD, but the point is still the same: slowing down the audio restores the original pitch.


But what happen with spanish, french or german audio tracks of that PAL DVD?
Have the correct pitch? The audio is dubbed over a video played at 23.976 or 25 fps?

That's the question. I suppose that it depends on the competence of the studio. The dub should be layered over audio running at the original speed, so that when the audio is sped up there won't be a differential between the pitch of the dubbed voices and the pitch of the rest of the audio, but who can say whether that's always the case? If a mistake is made and the dubbed voices are at a different pitch from the rest of the soundtrack, then it doesn't matter which way the user makes the conversion, because something will be wrong whatever you do.

I remember your saying years ago that the pitch on Spanish DVDs was correct in your experience, which surprised me a bit because that's not the norm with other PAL DVDs that I've come across (DE, UK, NL, etc), but I accepted that that must be the case because you know far more about audio than I do. Do you listen to dub tracks on Spanish DVDs or the original language version?

tebasuna51
21st March 2021, 23:46
Of course I talk about the pitch of spanish tracks, dubbed or originals, in PAL DVD's, not about other languages.

For me don't make sense listen a know spanish actor talk with diffent pitch in a DVD than in the cinema.

Richard1485
22nd March 2021, 00:20
Of course I talk about the pitch of spanish tracks, dubbed or originals, in PAL DVD's, not about other languages.

I didn't know whether you watch Hollywood movies dubbed or subbed or in English, so I wondered whether your observations about pitch applied to the Spanish dub or original language (or both). That's all. :)


For me don't make sense listen a know spanish actor talk with diffent pitch in a DVD than in the cinema.

It's no different from an English speaker listening to a known actor with a slightly higher pitch than in the theater. That's what viewers listening to English tracks on PAL have been used to for years because of the speed-up.

chronis
23rd March 2021, 04:52
For the vast majority of PAL DVDs, pitch correction is not applied when the source is sped up to 25fps; consequently, the original pitch is restored upon slow-down, which is why eac3to (and most other programs) behave as they do.

I've heard other people express this opinion but not so far as to say "the vast majority of...", only "many PAL DVDs...". So I have to ask, where did you learn this? Is it documented anywhere?

To me it doesn't make sense, as a professional practice, to not correct the pitch during the transfer to PAL DVD, since it's so easy and quick to do. So why don't they do it?

And, I'm curious if this also applies to more recent movies (e.g., from the last 10 years) that didn't have a DVD release, and which can only be downloaded from the web (e.g. Vimeo VOD). That is, a digital copy that is in 25FPS, but the cinematic FPS is 24. Would you assume that in this case too the pitch was not corrected?

thanks

Richard1485
23rd March 2021, 07:51
So I have to ask, where did you learn this?

Dealing with PAL movie DVDs for years. Remember that we are talking about movie DVDs, those that had sources that needed speeding up. This doesn't apply to PAL television material that needed no speed-up. I don't know if it's documented, but it doesn't matter: the practice is well known, which is why eac3to's -slowdown switch behaves as it does.


To me it doesn't make sense, as a professional practice, to not correct the pitch during the transfer to PAL DVD, since it's so easy and quick to do. So why don't they do it?


It's quick and easy to do successfully now. It wasn't when the practice was established. Early DVDs that had pitch correction applied, such as the extended edition of The Fellowship of the Ring, were notorious for the artifacts that it caused.


And, I'm curious if this also applies to more recent movies (e.g., from the last 10 years) that didn't have a DVD release, and which can only be downloaded from the web (e.g. Vimeo VOD). That is, a digital copy that is in 25FPS, but the cinematic FPS is 24. Would you assume that in this case too the pitch was not corrected?

I don't see why web copies of recent movies would be sped up, rather than left at the correct speed (like most Blu-rays in PAL regions), but I'll make no comment about those.

manolito
23rd March 2021, 13:01
It's quick and easy to do successfully now. It wasn't when the practice was established. Early DVDs that had pitch correction applied, such as the extended edition of The Fellowship of the Ring, were notorious for the artifacts that it caused.

I haven't done pitch correction for PAL speedup in a while, but the last times I did it certainly was not quick and easy... :(

Especially when dealing with high quality music you could easily end up with very audible artifacts. SoX and SoundTouch quality was "acceptable", but not great. TimeFactory II and Izotope Radius were quite good, but they were also quite expensive. I did not try the ffmpeg atempo filter, though...

Richard1485
23rd March 2021, 13:09
I haven't done pitch correction for PAL speedup in a while, but the last times I did it certainly was not quick and easy... :(

Especially when dealing with high quality music you could easily end up with very audible artifacts. SoX and SoundTouch quality was "acceptable", but not great. TimeFactory II and Izotope Radius were quite good, but they were also quite expensive. I did not try the ffmpeg atempo filter, though...

Ffmpeg's atempo filter (or maybe TimeStretch in AviSynth) is what I had in mind, but none of your perceptions of quality says anything about speed or ease of use. EDIT: And we're not really talking about music.

manolito
23rd March 2021, 14:15
Ffmpeg's atempo filter (or maybe TimeStretch in AviSynth) is what I had in mind, but none of your perceptions of quality says anything about speed or ease of use. EDIT: And we're not really talking about music.

The AviSynth TimeStretch filter uses the SoundTouch library, so they should act identically. Pitch correction is generally very slow, so I never cared about speed all that much. And ease of use is a matter of personal preference. Some folks want scriptable CLI tools, others insist on a GUI.

And I do talk about music. For a regular movie with only talking I do not need pitch correction. But with concert videos a higher pitch can be very annoying. For NTSC to PAL conversions of such concerts I mostly do not use PAL speedup any more, I use 23.976 to 25 pulldown instead which does not touch the audio. And sometimes I even use an older method where Gavino was involved in developing it. No speedup, no pulldown judder, just some blended frames here and there which at least for me do not compromise quality:

# Alternative method avoiding slowdown, speedup or pulldown.
# No audio speed correction required.
# Insert after the resizer.
# The encoder must be set to "Progressive".

# -------------------------------------------------------------


# NTSC 23.976 Progressive to PAL 25 Progressive:
# .............................................................

f1=ChangeFPS(24)
f2=Trim(0,-1).AssumeFPS(24) + Trim(1,0).ChangeFPS(24)
Film=Merge(f1,f2)
p1=ChangeFPS(Film,25)
p2=Trim(Film,0,-1).AssumeFPS(25) + Trim(Film,1,0).ChangeFPS(25)
Pal=Merge(p1,p2)
Last = PAL.AssumeFPS(25)

# -------------------------------------------------------------

Richard1485
23rd March 2021, 14:43
Pitch correction is generally very slow, so I never cared about speed all that much. And ease of use is a matter of personal preference. Some folks want scriptable CLI tools, others insist on a GUI.

Both CLI and GUI are available for ffmpeg (plenty of GUIs) and AviSynth (BeHappy). There's no ease-of-use problem. Pitch correction might be slower than other processes, but it takes at most a few minutes with ffmpeg or AviSynth, which is quick enough given the question raised in the thread, which is why the established practice is not to pitch-correct audio during PAL speed-up. That was the context in which my comment was made: "quick" and "easy" weren't originally my terms anyway: I was just addressing the OP's question on the OP's terms.

And I do talk about music. For a regular movie with only talking I do not need pitch correction. But with concert videos a higher pitch can be very annoying. For NTSC to PAL conversions of such concerts I mostly do not use PAL speedup any more, I use 23.976 to 25 pulldown instead which does not touch the audio.

If you want to go off on a tangent about music, that's fine. I would use pulldown for music videos as well, in which case speed-up/pitch-correction isn't even an issue and is therefore not relevant to the topic.

jpsdr
23rd March 2021, 19:10
I can talk for French movies, the PAL telecine speed-up video and audio, so pitch is altered.
Maybe now there is proper pitch correction algorithms/method, i don't think they even existed in the 70s or 80s.
This is why, there was, as far as i know, never been a pitch correction for telecine PAL since the origin of it.

Blue_MiSfit
25th March 2021, 22:58
SoX does a nice job of this, btw :)

Kisa_AG
29th March 2021, 17:41
SoX does a nice job of this, btw :)

Yes, it works much better than FFmpeg's atempo filter.