Closed tin2tin closed 1 year ago
@tin2tin thanks for this, I'll try to recreate it. What service do you use to download the clip? youtube-dl isn't working for some reason.
Jdownloader. There are also a new thing in Blender where frames in the vse do not accept floats. I think I had to correct it two places in your add-on(add int).
I tried to figure out how to make it cut silence, but gave up. This stuff is too advanced ofr me. :-) https://twitter.com/Sarcastic_Hanna/status/1628816339572776963
ah, I see the problem - the audio in that clip is at 44100Hz, but I never found a way to find the sample rate of the strip via python - instead I just use the sample rate of the scene, which defaults to 48000. I'll see if I can find a workaround.
Recently the samplerate was exposed in the VSE > Time sidebar:
interesting. I have it working here by calculating the strip samplerate manually, which is good enough, but if I can get to that samplerate property in the addon that would be better.
Since the samplerate property is new, I have committed the version that calculates it itself. Give it a go and see how you get on?
Yes, it runs without any errors and works as advertised here on a clip like this: https://www.youtube.com/shorts/qUqj-KxXHWQ
Trying to make it preserve everyting above the thresholdt(remove pauses) in a clip like this: https://www.youtube.com/watch?v=7l1Tom9q8Ic I'm a bit puzzled about what the "Auto holdoff" does, and why keeps chopping up the video when it keeps staying above the threshold?
The addon as currently designed, is meant to make identical-length pieces every time the level rises. The "auto holdoff" is meant to prevent re-triggering for long segments where the audio level remains above threshold.
Example: 4 loud hammer blows, 1 second apart == 4 short clips 1 loud foghorn blast, continuous, lasts 4 seconds = 1 short clip
I will look into adding a "remove silence" mode. It would be straightforward to modify the addon to only remove silence, and thus have 2 addons that each do 1 job, but I think it shouldn't be a huge job to have a second mode that re-uses most of the code as it stands.
Okay, v0.7 adds new remove silence mode and it seems to work. Not sure I'm a huge fan of having it as a drop-down box choice, but that was the simplest way.
Have a go and see what you think.
Thank you. It seems to be working. Trying to cut someone talking, it still gets cut up quite a bit, maybe it needs an exposed minimum silence duration value, which should determine when the silence is cut and when it is kept?
If I add a higher value pre-roll the resulting clips seems to spread out on more channels.
Ah, I guess I haven't quite got the time position right just yet. I'll do some more experimentation.
It'll always be a challenge getting it to automatically make the cuts exactly where they feel right, but maybe some tweaks to the way it handles pre/post roll and overlap will make it work better...
Btw. I did a little tweet on your add-on: https://twitter.com/tintwotin/status/1630490799791132672 I hope some more people will use it. :-)
For cutting silence, If I up the TRIGGER_DEBOUNCE_COUNT_FALLING = 40000
and set the threshold to -25 the chunks becomes bigger and more speech friendly.
Okay, one more go. I have made it so that you can use the pre- and post-roll values to set the smallest amount of silence to remove. e.g. if you never want to remove bits of silence shorter than 2 seconds, make sure pre and post roll add up to more than 48 (assuming 24fps).
https://twitter.com/tintwotin/status/1631584770885820418
It is working well. Thank you. I guess, it is okay to close this issue now?
I tried using this clip: https://www.youtube.com/watch?v=HgGKtGQbC0c
But I get this error:![image](https://user-images.githubusercontent.com/1322593/221322787-91c9de02-f381-4812-a790-5371bc19ce9a.png)