LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-16-2013, 03:01 PM   #1
greasyfingers
LQ Newbie
 
Registered: Nov 2006
Posts: 22

Rep: Reputation: 0
Trimming an audio file to specific points


Every week, Cron starts Streamripper to record a programme streamed by my local community radio station. The stream is a continuous mp3.

The station has a fairly liberal idea of when a show begins and ends, so Streamripper starts a couple of minutes before the scheduled start time, and ends a couple of minutes after the end time. I can then use mp3splt to manually remove the excess, so that the resulting file starts and ends exactly at the start and end of the programme. But I have to find these start and end times by playing the file in a media player (or, if I can faff about with it, by using mp3splt-gtk, which is more accurate, but I find fairly clumsy to use).

I was wondering if anyone could think of a way to automate this. I have tried using mp3splt to detect any silence before and after the programme, but it is unreliable, as there isn't always a silence. The programme starts and ends with a theme tune, so maybe something could somehow 'recognise' this specific part of the file, and return the correct time values that mp3splt needs? Or could an inaudible flag be embedded in the theme music that something could detect (I could probably get the programme producer to co-operate with that)?

Is it even possible?
 
Old 08-17-2013, 04:56 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Quote:
Is it even possible?
Anything is possible, we humans are the living proof of that...for better...or worse...

Automating an edit? Not likely...yet, so, manually then...

Audacity, Sweep, MHwaveedit to name a few...though there may well be better stuff around...
I personally did'nt use Sweep yet, but my experiences with Audacity and MHwaveedit are satisfactory...

Hope it helps

Thor
 
Old 08-17-2013, 06:28 AM   #3
greasyfingers
LQ Newbie
 
Registered: Nov 2006
Posts: 22

Original Poster
Rep: Reputation: 0
Thanks, Thor. I hadn't come across Sweep and MHwaveedit before - I shall enjoy having a play with them.

mp3split does the job I need extremely well; it's not really a question of how to edit an audio file, rather than how to find the times of specific sections in the audio for the edit points.

Audacity is an excellent tool, but not really suited to this job - it imports mp3s, de-coding them into its native format, before it can deal with them, and then has to re-code them back to mp3 when it exports them, which means a loss of quality at each re-code (I would guess the same may be true of Sweep and MHwaveedit). It's probably not too significant in this case, but the real problem is that to load a big mp3 into Audacity can take a long time, and exporting it out again even longer. mp3splt doesn't need to decode, and so it's much faster, and doesn't affect quality. The command in this case is very simple
Code:
mp3splt filename.mp3 startminutes.seconds endminutes.seconds
- it's automating the finding of the start and end times that I was wondering about.

I suspect you may be right about it, but some clever person may have figured out a way.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wget, download specific links into specific file names Si14 Linux - Software 1 04-30-2013 01:42 AM
Trimming a file james_cwy Linux - Newbie 4 01-13-2004 10:08 PM
Mounting specific hardware devices to specfic mount points tallguy999 Linux - Newbie 3 11-27-2003 02:07 PM
How do I change where OSS points for it's audio driver? Slinger Linux - General 0 02-07-2003 09:26 PM
Help with a Script for Trimming last 2 letters of file names eagletech Linux - Newbie 3 11-13-2002 06:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:28 PM.

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