About Me

header ads

Linux: Cut Audio files directly from a terminal

We have a song that we like and we want to insert it as a ringer on our phone, just that we want to start it only by the chorus and not the beginning of the song, how can we do?

Simply "Cutting" part of the song making it starts right from the chorus.

For cut an audio file We can use some applications or simply use a dedicated internet service (there are plenty on the net) just in case, you must first install the application and must be loaded in the second network or online service in our passage.

But we can cut any audio file simply by using our terminal with ease.

To do this we will use FFmpeg The famous and SSIM widely used software suite of applications to manage our audio and video files.
FFmpeg we use it very often (without even knowing it) by many applications, if not present in our distribution we can install with a simple:

For Ubuntu and Debian
sudo apt-get install ffmpeg
For Fedora
yum install ffmpeg
Arch Linux
pacman -S ffmpeg
now we can cut our audio file to do this just type
ffmpeg -ss [cut startup time] -t [time of the end of the cut]-i fileaudio.mp3 -acodec copy song_name_cut.mp3
an example we want to cut the audio files LinuxTechCrunch.mp3 from the initial 40 seconds to 1 minute and 15 next to do this just start the terminal where the audio file and type:
ffmpeg -ss 00:00:40 -t 00:01:15 -i LinuxTechCrunch.mp3 -acodec copy LinuxTechCrunch_cut.mp3
at the end we will have 2 files the original and rename the new file as the command's very fast and with the same audio quality as the original file.

Post a Comment

0 Comments