WyattBlue / auto-editor

Auto-Editor: Efficient media analysis and rendering
https://auto-editor.com
The Unlicense
2.71k stars 402 forks source link

trim the silent sections from the beginning and end of an audio file #462

Closed Liuzhj closed 3 months ago

Liuzhj commented 3 months ago

I need to trim the silent sections from the beginning and end of an audio file, without cutting the silent parts in the middle of the audio. Is there a command that can accomplish this?

WyattBlue commented 3 months ago

You can do something like --add-in 60sec,-60sec

escape0707 commented 2 weeks ago

Can you reopen this issue? I searched and saw this issue when I want to use some simple software to trim the zoom lecture videos I recorded, but since I don't know the exact time when the lecture start and end with that video, I can't simply assume the silence at the start or the end of the video. I record them when I don't have the time to watch, and I start the recording about 20 mins before and although the lectures usually go on for 1h30m to 1h50m, I don't know the exact time and my obs is set to always end 2h30m after the recording.

Can you still provide some special options to deal with silences at the start or the end of the videos?

WyattBlue commented 2 weeks ago

No, this doesn't need to be a special feature, you can create this feature with a bit of scripting. You can either using Palet or change the timeline v1 json files with an external language.

Writing it in Palet would be hard for a beginner, even if you have prior programming experience if you never did a lisp-like before do I recommend editing the json files programmatically with a language you're familar with then feeding that json file to auto-editor for exporting

escape0707 commented 2 weeks ago

Oh, I didn't notice that there is a timeline json file for me to write scripts on. I was going to just use ffmpeg's silencedetect filter. Or something like silero vad.

Thanks for the reply. I'll look into it.

Edit: Actually, as the original goal of the software before the forking (jumpcut) is to speed up watching of lecture records, I still think trimming silenct at the beginning and the end could be a convienient feature to consider adding.