I was looking for software which is able to cut audio files into smaller pieces, for example I set seconds and miliseconds for beginning and end of cutting, and then I can save cut content as new file.


5 Answers 5


Audacity is capable of doing this.

About Audacity

Audacity is a free, easy-to-use and multilingual audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. You can use Audacity to:

  • Record live audio.
  • Convert tapes and records into digital recordings or CDs.
  • Edit Ogg Vorbis, MP3, WAV or AIFF sound files.
  • Cut, copy, splice or mix sounds together.
  • Change the speed or pitch of a recording.
  • And more! See the complete list of features.

enter image description here

  • 1
    Use sudo apt-get install audacity to install it quickly
    – parsecer
    Commented Nov 4, 2020 at 4:15
  • or sudo dnf install audacity
    – jangorecki
    Commented Feb 22 at 16:18

avconv can do this.


avconv -i infile.m4a  -ss *pos* -t *duration* outfile.mp3

pos is start time in seconds

duration is play time in seconds

Install libav-tools to make it happen.

If you are not sure about the start and end times and want to listen to the segment before making it a new file, you should know that avplay takes many of the same arguments as avconv does.


avplay -ss 5030 -t 970 infile.m4a

If you don't want to do math in your head and also would not like to pull up a calculator, you can use the Hour:Minute:Second format instead. The example given above would then be:

avplay -ss 1:23:50 -t 00:16:10 infile.m4a

Also, keep in mind that if the pieces are not the final output (e.g. you are going to combine them), you might want to keep using the same format as that of the input file.

  • 3
    libav-tools is not available with apt install or snap install. ubuntu 18.04 Commented May 18, 2018 at 23:05
  • 1
    libav-tools now embedded in ffmpeg. After apt-get install ffmpeg you need to resurrect some of the applications with cd /usr/bin && sudo ln ffmpeg avconv && sudo ln ffmpeg avprobe
    – Mattma
    Commented Jan 15, 2021 at 19:55

Somehow for me, the following worked extremely well

sudo apt-get install mpgtx

Once this is done, change the current directory to the directory where input.mp3 is located and then run the following:

mpgsplit input.mp3 [hh:mm:ss-hh:mm:ss] -o output.mp3
  • 2
    Does not work for me: range [00:00:00-01:42:55] results in invalid [-1-98799992] range - what is wrong? File is 3h long. Commented Dec 17, 2018 at 10:57

Another method using mplayer

mplayer -quiet \
sourcefile.mp4 -ao pcm:fast:file=output.wav \
-vc dummy -vo null -channels 2 \
-ss 1:00 -endpos 0:30

note that output file will start from 1:00 for a duration of 30 seconds.

-endpos here means duration.


i've never use this, but it looks great Lmms & manual wiki

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .