LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-04-2014, 09:34 AM   #1
gustywind
LQ Newbie
 
Registered: Aug 2013
Posts: 7

Rep: Reputation: Disabled
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?
 
Old 04-04-2014, 09:57 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,295

Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
mencoder has -ss and -endpos options:
http://www.misterhowto.com/?category..._with_mencoder
 
Old 04-04-2014, 06:53 PM   #3
gustywind
LQ Newbie
 
Registered: Aug 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
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.
 
Old 04-14-2014, 06:41 PM   #4
gustywind
LQ Newbie
 
Registered: Aug 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
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.
 
Old 04-14-2014, 06:45 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,295

Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
seems like the indexing on the original input avi is set to 10 seconds. i think there is a way to increase it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
14.0 and 14.1: KDE garbles portions of its displays Noony Slackware 0 12-05-2013 08:45 AM
Moving portions of /etc/passwd and /etc/shadow skreaminskull Linux - Security 3 05-19-2006 11:35 AM
extract text portions from html files linuxfond Programming 3 04-28-2004 12:00 PM
What's the difference between the upper and lower portions of /proc/meminfo? undercrawler Linux - Hardware 0 03-26-2004 10:57 AM
How to Trim mpeg video's ? qwijibow Linux - Software 1 01-06-2004 09:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration