Skip to content

Audio removed when changing video speed #2

Open

Description

@niklaspollonen

The audio is removed when changing video speed on both Android and IOS. Any way to fix this for android?

For IOS, I recommend changing to this fork of SDAVAssetExportSession. It allows removing/changing of the pitch correction algorithm. The Audio speed can be easily activated by adding the same scaleTimeRange lines for the audioTrack and removing the !scaleTime from the if statement.

Activity

  1. selsamman commented on Feb 10, 2020

    @selsamman
    Owner

    Yes this could more easily be done on IOS where AVFoundation already supports time scaling. On Android we use the android-transcode library fork. Adding audio scaling to the android-transcode library is not on the horizon as it is quite complex to do properly. Having the same behavior on both platforms is a primary goal of this project.

  2. niklaspollonen commented on Feb 10, 2020

    @niklaspollonen
    Author

    Have you checked on this library as an alternative: Natario Transcoder? Seems like it has audio stretching.

  3. selsamman commented on Feb 10, 2020

    @selsamman
    Owner

    Thanks for that. It has audio scaling but not transitions like crossfades which we support. Like the fork we are using it has deviated substantially from the original ypresto version so would not be something easily pulled. Curious as to your use case for time scaled audio.

  4. niklaspollonen commented on Feb 10, 2020

    @niklaspollonen
    Author

    yeah, I need to read through the code in both libraries and learn from them.
    I'm working on an audio app(that has video as an extra) so pitch changing is important to make interesting audio. I'm also doing native code to make the video editing faster, but its going a bit slowly on the android side. Therefore a demo is on the works with the tools available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions