How can I trim silent portions of a video automatically?
I am trying to find a way to automatically remove silent portions of a video.
My current (manual) solution is to extract the audio track to a separate mp3 file using mencoder, detect the silent portions of the mp3 file with mp3splt, then use the information that I get from the mp3splt output as a guide as I manually edit the video file with avidemux. This takes a while. I have tried to write a script to use the avidemux command line interface to do the video editing; but (for reasons that I have not been able to solve) this invariably causes audio sync problems that I don't see when I use the gui interface to avidemux. I don't really care if the solution is a command line script or a gui program that has some sort of silence detection filter. Does anyone have a linux solution for this problem? |
mencoder has -ss and -endpos options:
http://www.misterhowto.com/?category..._with_mencoder |
Thanks for your reply. I knew about those mencoder options; but somehow misinterpreted them as useful only for excising leading or trailing periods of silence.
I have modified my script to use mencoder with these options to see how it works. It will take a while to test the resulting output; but I will post my result once I finish testing. |
I have worked with the mencoder options and I have a solution that works, although not as well as I would like.
It seems that the -ss and -endpos options are not particularly time accurate as to where the cut occurs. I am seeing as much as a 10 second discrepancy between the requested cut point and the actual cut point. Other than that, this is a solution that works for me and I can live with this amount of inaccuracy; but if anyone has a solution for this problem I would like to hear about it. |
seems like the indexing on the original input avi is set to 10 seconds. i think there is a way to increase it.
|
All times are GMT -5. The time now is 03:14 PM. |