[Quirk] Can't use Pitch Effect on Sped up Video [Update: Pop]

Palacono Website User, HitFilm Beta Tester Posts: 3,422 Enthusiast
edited June 2017 in HitFilm

Take a video, put it in a Composite shot, Right Click> Speed/Duration and set to 200%. It plays fine, twice as fast and with higher pitched audio.

Add the Pitch Effect and play it again - don't even change the pitch.

Audio stutters.

Remove the Pitch Effect and embed the video further; make a Proxy of that Embedded Composite to 'bake in' the speed change.

Add the Pitch Effect to the original composite - now pointing at the proxied embedded composite - don't even change the pitch.

Audio stutters.

Various method of preprocessing the video both before and after adding the Pitch Effect made no difference - Proxy, RAM Preview, both - but I couldn't get it to play smooth audio.

I wanted to lower the pitch to make the audio sound normal, but this doesn't seem to be the way to do that.


  • NormanPCN
    NormanPCN Website User Posts: 4,043 Enthusiast

    I tried a quickie test and I cannot reproduce this. Here is what I get. Am I doing the test properly?


  • Palacono
    Palacono Website User, HitFilm Beta Tester Posts: 3,422 Enthusiast

    @NormanPCN is that sped up 200% or do you cycle fast? :)

    Hmmm...maybe I should try more video file formats.

    I used a .MTS file and here's the MediaInfo data:

    Format                                   : BDAV
    Format/Info                              : Blu-ray Video
    File size                                : 9.01 GiB (this is wrong, it's 40.7Mb)
    Duration                                 : 15 s 15 ms
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 5 156 Mb/s
    Maximum Overall bit rate                 : 28.0 Mb/s

    ID                                       : 4113 (0x1011)
    Menu ID                                  : 1 (0x1)
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : [email protected]
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 2 frames
    Format settings, GOP                     : M=1, N=15
    Codec ID                                 : 27
    Duration                                 : 14 s 514 ms
    Bit rate mode                            : Variable
    Bit rate                                 : 4 951 Mb/s
    Maximum bit rate                         : 26.0 Mb/s
    Width                                    : 1 920 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 59.940 (60000/1001) FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 39.836
    Stream size                              : 8.37 GiB (93%)

    ID                                       : 4352 (0x1100)
    Menu ID                                  : 1 (0x1)
    Format                                   : AC-3
    Format/Info                              : Audio Coding 3
    Format settings, Endianness              : Big
    Codec ID                                 : 129
    Duration                                 : 14 s 528 ms
    Bit rate mode                            : Constant
    Bit rate                                 : 256 kb/s
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 31.250 FPS (1536 spf)
    Bit depth                                : 16 bits
    Compression mode                         : Lossy
    Stream size                              : 454 KiB (0%)
    Service kind                             : Complete Main

    ID                                       : 4608 (0x1200)
    Menu ID                                  : 1 (0x1)
    Format                                   : PGS
    Codec ID                                 : 144
    Duration                                 : 13 s 949 ms

  • Palacono
    Palacono Website User, HitFilm Beta Tester Posts: 3,422 Enthusiast
    edited June 2017

    Well, I just tried it with a GoPro file and got the same stuttering result.

    Edit: And another .MP4 file exported from Hitfilm.

    Edit:Edit: But the Exported file plays the audio smoothly and I can also adjust the pitch correctly and it does lower it.

    So it's just while editing/viewing for me then; even when Proxied.

  • NormanPCN
    NormanPCN Website User Posts: 4,043 Enthusiast

    @Palacono My media was MP4 with AVC/AAC. It was encoded with my fast decode AVC settings. It was 29.97 and 48Khz. The project/comp was 29.97 and 48Khz.

    I wonder if the source media matters at all. The media effects should be after an encapsulation layer. After decode the video is just/always RGBA frames and the audio is just PCM.

    As for stutter. My CPU is pretty stout at 4Ghz. Maybe the pitch effect is compute intensive.

    "is that sped up 200% or do you cycle fast?"

    That example was 200% sped up using rate/speed.

    Funny you mention the speed. That media clip is from a video I titled, Through the Wormhole. The entire video footage sped up a lot.

    Given how the brush and trees surround much of that trail I thought was kinda tunnel looking and might look interesting if sped up a lot. Then the Wormhole title came to mind and a space theme and other silliness in a narrative. The last narrative was, How can I ride that fast normally.

  • Palacono
    Palacono Website User, HitFilm Beta Tester Posts: 3,422 Enthusiast

     @NormanPCN: Oh well, I was just testing it out as a result of a reply someone gave to a question about changing audio speed and I wondered how the pitch was handled, but didn't get far enough to find out.

    It's a shame if the Pitch Effect is particularly CPU intensive (on my machine, anyway) when doing nothing. Well, I guess it does do something even when maintaining the same pitch value, but I'd have hoped even running on a single thread on a fairly old quad core i7 @3.07Ghz should be fast enough. It's fine (as is another much lower spec old XP 32 bit machine) with Sony Movie Studio using the elastique method to pitch shift back to normal and play smoothly.

  • NormanPCN
    NormanPCN Website User Posts: 4,043 Enthusiast
    edited June 2017

    @Palacono I just did a quickie test. Pitch does have a bit of CPU load.

    In my example, 1080p29.97 with a 200% rate/speed setting.

    ~23% CPU without pitch enabled.

    ~50% CPU with pitch -4.0 enabled.

    My machine i7 4770k flat 4Ghz quad core.

    Trying to compensate with Pitch for the rate/speed stretch audio result is poor at best. A proper rate algorithm needs to be used.

    "It's fine (as is another much lower spec old XP 32 bit machine) with Sony Movie Studio using the elastique method to pitch shift back to normal and play smoothly."

    This is the same old story. Hitfilm is generally not particularly competitive performance wise relative to the market. Basic timeline video playback most often comes up short but other aspects would not surprise me.

    This is not to say you cannot do good work and do it efficiently. The probability of running into performance slowdowns is just higher in Hitfilm.

    The Elastique audio stretch is licensed code from a third party so Sony/MAGIX cannot really claim credit. However, Vegas code in general is largely competitive enough. Performance on Nvidia GPUs is crapola on Vegas.

  • Palacono
    Palacono Website User, HitFilm Beta Tester Posts: 3,422 Enthusiast

    @NormanPCN I suspect the speed change is making it harder for the Pitch Effect and was hoping the Proxy would help, but I guess the audio isn't proxied, so it's having to process it at double speed and pitch shift at the same time.

  • DannyDev
    DannyDev Staff Administrator, HitFilm Beta Tester Posts: 337 Staff


    Audio is proxied but is presently only used for waveform displays. Audio samples are still mixed during playback. 

    As with all things, we have to make tradeoffs when implementing features due to our limited resources.


    We are aware of the performance issues. Keep in mind that we are a small team with very limited resources. Our competitors have teams and budgets to dwarf ours and most of their products have been refined over decades.

  • Palacono
    Palacono Website User, HitFilm Beta Tester Posts: 3,422 Enthusiast
    edited June 2017

    @Danny77uk OK, but is this expected behaviour due to hardware limitations or an issue; as @NormanPCN isn't getting this same result?

    Also, I'd previously reported I was getting a 'Pop' at the start of audio in the Editor. I checked and found it happened on all versions of Hitfilm back to HF2E, so didn't know if it was a hardware problem on my PC - or it would presumably have been spotted long before - or there was something weird about that specific clip, or it was playing the audio 'header' or.... [insert guess].

    This video shows that Hitfilm (Update #6) is (now?) apparently modifying data in the first frame of the audio and it changes on subsequent plays. I'm not hearing the pop on this occasion though.

  • CedricBonnier
    CedricBonnier Staff Administrator, HitFilm Beta Tester Posts: 1,195 Staff

    @Palacono could you send us that clip please? I can't reproduce your issues here.

  • Palacono
    Palacono Website User, HitFilm Beta Tester Posts: 3,422 Enthusiast

     @CedricBonnier sent you a PM - which you'll obviously have spotted - I just forgot to mention that you need to enlarge the audio display to max and zoom in the timeline to the max to see that first frame wiggle/pop.

    I'll try and find the other clip (this wasn't it) that had an audible pop before too.

This discussion has been closed.