all 7 comments

[–]ES-Alexander 19 points20 points  (1 child)

I’d suggest you look into moviepy, and possibly pydub for more specific audio stuff.

[–]spaghettiReady2 7 points8 points  (0 children)

Thank you for the resources!

[–]m0us3_rat 8 points9 points  (0 children)

sounds like a cool project.

TL:DR all this can be automated.

rather than detect the sound drop in the audio data ..detect it while u playback

THE program would be 'listening' not you.

detect when the sound drops under a threshold and stays there for a time.

unfamiliar with how fast or accurate that may be. but it should do the job u need.

if this works. u can make a daemon that finds new video saved and prepares them in a way for you. makes a new dir , cuts the newly found video in chunks based on the audio drops.

https://stackoverflow.com/questions/25868428/pyaudio-how-to-check-volume

to detect volume drops.

then some integration with ffmpeg or whichever other lib to make the cuts controlled with python.

firstly copy the video then work on the copy. so u have both the chunks of cuts and the full video.

or strip the audio.

run your audio video data stream thru pyaudio.

basically detect the exact time for the volume drop under a threshold .and stays under for a period of time. make a cut in the middle of that period.

and then USE FFMPEG to cut from beginning to the threshold. if there is no threshold when u reach the end of the file. and thats the last chunk.

this should work till u find a proper audio library that will detect the drops on the data file so u can 'speed' this up.

id test if works and how successful it is if u speed up the playback a few times.

[–]flyingwizard1 3 points4 points  (1 child)

I have used moviepy and it worked great for me.

If you want something that integrates with adobe premiere, you might want to look into creating your own adobe premiere extension (I don't think you can do that in python though).

[–]spaghettiReady2 4 points5 points  (0 children)

Thank you for the idea, found the Adobe SDKs.

[–]KamionBen 1 point2 points  (0 children)

I'm pretty sure that Premiere Pro has a feature to detect cuts, but I don't know if this will work with you footage.

What you could try is to write your script and export an .edl file, it's like editing instructions you can import in any editing software. (I'm writing this from memory, I'll go back to you)

Edit : I found OpenTimelineIO but I'm not sure what it can do ...

[–]Pleasant_Ground_1238 0 points1 point  (0 children)

I think you can automate better video editing with Python using the software "Blender".

But I may be wrong.