How do I write extendscript code to synchronize two audio clips in PPro based on their audio? - extendscript

I am trying to automate my video editing process and I have to synchronize a video with an audio recording. Manually, this is very easy to do because I can just highlight the two clips in the sequence and synchronize them.
Does anyone have any tips on how I can get extendscript to do this?
I asked ChatGPT for help but I don't think it knows either lol

Related

Detect different speakers in an audio recording

I want to make an application that counts the speaking time of each speaker in an audio recording. I don't care about doing full voice recognition and transcribing every word in the recording, I just want the speaking time of each voice.
Is there a piece of software that provides such feature?
If possible, I would like to avoid using a third-party service (such as Google Cloud) to achieve this, and I would like the solution to be light enough to run on a modern smartphone.
Thank you for your help.
I had the same idea. Check this out https://github.com/pyannote/pyannote-audio
Haven't tried it myself yet. Will add an edit after.

Making an audio equalizer video

I need to make a video of an audio equalizer.
So i need a script that analyses audio every frame, and extracts the frequency apectrum so i can draw that somehow and make an equalizer.
The first part of the problem is easily solvable on frontend as there is a myriad of open source equalizer visualisations in canvas.
The thing works nicely in browser but i have a problem to make an mp4 of that.
Ive tried using headless browsers(pupeteer and phantomjs) to capture frames from canvas, but i could not get the framerate above 10fps, resulting in unacceptable video quality and sync issues when connecting the jpg frames and mp3 via ffmpeg. The plan was to speed it up, so you dont have to wait for the full audio length to finish to get an mp4, but i cant even get it to show above 10fps on regular playback speed.
I feel the tech i thought would work is not there yet, and i might be in need of a different approach.
The only condition is that it has to run as a script on a linux server. So any programmimg language or any equalizer design will work.
Any ideas or resources are more than welcome. Thanks

Tone.js: How do I loop a sound seamlessly?

I've got a short, crossfaded ambient sound clip running on a loop using Tone.js. Trouble is, there's an audible gap between the end of one playback and the beginning of the next.
I know it's possible to achieve a seamlessly crossfaded loop in Howler.js using audio sprites, but I'm not sure how to do it in Tone.js (and I'd rather stick with this library if possible).
Does anybody out there know how to resolve this?
To avoid discontinuities in looped audio, you need to crossfade the end of the loop with the beginning of it. If your program is only working with a fixed set of loops, you can pre-render the crossfade into the clip using an audio editor like Audacity or a DAW like Pro Tools or Reaper.
If you have a general-purpose app that needs to work with user-supplied audio, then you'll need to write code to mix the end of the loop fading out with the beginning of the loop fading in.
Looping seamlessly MP3 tracks is difficult, but not impossible. MP3 files contain an additional padding that is decoded as audio data by decoders. I would recommend one of these two options to work around the paddings:
Prepare seamless MP3 loops with a special software. You can read more about that here: https://www.compuphase.com/mp3/mp3loops.htm
Switch to a different format: AAC (best support in all browsers, but there still might be some issues with paddings, can be overcame), OPUS, OGG. Read more here: https://en.wikipedia.org/wiki/Gapless_playback#Prerequisites

Editing Video once Sound Starts

I have a large batch of videos that has this loading screen from the program I used to make them and I was wondering if there was a program that would cut that part out and create a new file when the sound of the video starts playing.
I know I can do it manually but it would take forever as I have over 50 videos that I need to edit.
Take a look at this answer:
FFMPEG used to trim a video
I think it answers your question (unless the question also requires some sort of automated way to detect the start of sound activity).

Can FFMPEG or any other project detect an audio file contains only noises?

I have a batch of audio files which recording people's voice. But some of this audio files record only noises or microphone burst. I want to detect these files and jump over them while processing my program.
I'm not sure whether ffmpeg can do this. If yes, could you guys provide me a link of that method? If not, do you know if there is some other software can do this? Or do you have any solution or suggestion to this problem?
Thank you.
I would approach this by looking at peak values and duration. SOX is a program that allows shell scripting which could batch analyze this. There is a large user base and forum as well.
Here is a link to a forum topic discussing it's use on batch discovering peak values and outputting information to a .csv file.

Resources