LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 03-06-2013, 12:36 AM   #1
baddah
Member
 
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 188

Rep: Reputation: 30
Use Sox to Split file in half


Hi,

I'm looking at using using Sox to split an audio file exactly in half. So if the file is 5 minutes long i want to split it into two files of 2.30 minutes each. I know sox as the trim option but the paramater takes time as an option, and i'd prefer not to need to get the amount of minutes beforehand and pass this on. I just want to split the file into half.

Any option in sox that will give me this?
 
Old 03-06-2013, 02:37 AM   #2
baddah
Member
 
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 188

Original Poster
Rep: Reputation: 30
OK. i'll just get the size with soxi, and then use trim with start and end values to split the file into two equal parts. This works, but i was hoping sox has some method to just split it in half without needing to the these calculations.

Anyway the above does work so i'll just use that.
 
Old 03-06-2013, 02:42 AM   #3
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
What is size of the file? You can consider using split command (see manual here)
 
Old 03-06-2013, 04:07 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,704

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
split will cut an audio file into parts but they will not be playable. There are other tools depending on audio file type but I like SoX.
 
Old 03-06-2013, 04:30 AM   #5
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Quote:
Originally Posted by michaelk View Post
split will cut an audio file into parts but they will not be playable. There are other tools depending on audio file type but I like SoX.
Sorry, I was not sure that 'split' can be used on text files only.

@baddah:
You should better use some audio editor.
 
Old 03-07-2013, 07:43 AM   #6
baddah
Member
 
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 188

Original Poster
Rep: Reputation: 30
tnx. i used SOX as describe above, and it worked fine. All files split and remixed correctly now
 
Old 03-07-2013, 08:04 AM   #7
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Happy to hear that

Please Mark the thread as solved (option is under Thread Tools on top menu), if you think it has so.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
sox package, Slackware 13.1, fails on sox 1.wav -e stat burbabro Slackware 1 05-04-2011 02:26 AM
console split in half on Kubuntu 6.10 sikofitt Linux - Software 2 03-27-2007 02:04 AM
SoX File Conversion Issues pikk67 Linux - General 0 10-03-2006 07:38 AM
How to split file , .. awk or split ERBRMN Linux - General 9 08-15-2006 12:02 AM
nvtv messes up my screen settings, screen split in half lagu2653 Linux - Software 0 12-13-2005 02:29 PM

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

All times are GMT -5. The time now is 07:49 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