You are not logged in.

#1 2018-03-01 21:07

JimW
Member
Registered: 2015-12-08
Posts: 400

Cut mp3 file to smaller files

I like to listen to audio books. Unfortunately, they can be very long (3-9 hours or more!). Using ffmpeg it is possible to break the file into smaller segments:

ffmpeg -i infile.mp3 -map 0 -f segment -segment_time seconds -c copy outfile%03d.mp3

where seconds is the length of each segment you want. the %03d adds 3 digit sequential numbers after the outfile name.

There may be easier or more controllable methods but this does work. The main difficulty is that the last word of the out put file may be cut and continued to the next file.

Offline

#2 2018-03-02 07:12

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,352

Re: Cut mp3 file to smaller files

Depends if it is a question of breaking down to smaller chunks to avoid hitting system resources or just to make it easier to stop part way through.

If the latter then smplayer does a great job as it saves your place with any file it plays.

Offline

#3 2018-03-02 19:56

JimW
Member
Registered: 2015-12-08
Posts: 400

Re: Cut mp3 file to smaller files

Well, actually these are audio books that I download from youtube, then strip off the audo. They are on my shared directory and I often listen from my Android tablet. So far I haven't found anything on Android that will remember my place in an audio file. This is rather an intermediate solution until I do.

Offline

#4 2018-03-02 22:01

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Cut mp3 file to smaller files

Does the file have pauses between "chapters"? if so you could use ffmpegs -af silencedetect to find them and split the file accordingly, there is a stack overflow question here that might help.

Offline

#5 2018-03-02 23:55

JimW
Member
Registered: 2015-12-08
Posts: 400

Re: Cut mp3 file to smaller files

There is a short pause (usually), but there are times within some chapters where a pause occurs, often even longer than the intra-chapter pauses. What I have started doing is to break the audio in 15 minute segments. Then if I have to stop in the middle of one it is easier to find my place than it is in a 5 hour file! smile

Offline

#6 2018-03-03 07:29

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,352

Re: Cut mp3 file to smaller files

JimW wrote:

Well, actually these are audio books that I download from youtube, then strip off the audo. They are on my shared directory and I often listen from my Android tablet. So far I haven't found anything on Android that will remember my place in an audio file. This is rather an intermediate solution until I do.

Android Audiobook app does that. Interface is a little awkward on a tablet as it is designed for a phone screen - I have it installed for my wife to listen to Agatha Christie books. You have to drag up from the bottom of the screen to get to the play item - just need to fiddle a bit but it works. Not sure if it will work from a network location as blurb says local device only.

https://play.google.com/store/apps/deta … k&hl=en_GB

Offline

#7 2018-03-03 16:15

JimW
Member
Registered: 2015-12-08
Posts: 400

Re: Cut mp3 file to smaller files

I gave it a try. Like you said it does not seem to have network capabilities. But it does look good.
Thanks for trying! smile

Offline

#8 2018-05-11 11:50

avalon81
Member
From: Utica, NY
Registered: 2018-05-11
Posts: 2

Re: Cut mp3 file to smaller files

I just don't understand what's the deal with several-hours-long audiobooks. Doesn't your playback soft save the timings?

Offline

#9 2018-05-11 12:19

JimW
Member
Registered: 2015-12-08
Posts: 400

Re: Cut mp3 file to smaller files

That depends on the player or device. Some do and some don't. Plus on some devices you have limited space and cannot put several 8 or 9 hour audio files on them. When reading books I may have 3 or 4 going at a time, same with audio books. I may listen to a portion of one book one day and a portion of another on the next day.
Can you think of another reason why the developers of ffmpeg would include the ability to automatically segment an audio file?

Offline

#10 2020-07-30 09:18

Kumaliosa
Member
Registered: 2020-07-30
Posts: 1

Re: Cut mp3 file to smaller files

Frankly, I have ever used FFmpeg, which cuts videos and audios based on the command line. However, for new beginners like me, it's really hard to finish it. I have to refer to many articles and cuts with the codec I guess it's right. Anyway, I prefer to use Joyoshare Media Cutter to do the same thing. It's simple, lossless, and fast to cut my MP3 files and other large videos. BTW, FFmpeg may be better for professionals.

Offline

#11 2020-07-31 11:28

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Cut mp3 file to smaller files

There is also handbrake which is basically a frontend GUI for ffmpeg, and is available in the main Debian repository and although primarily aimed at video cutting I used it for audio too. Although I am not sure if it will cut up an audio CD as I haven't needed to use it in a long time as I find the command line quicker and easier with ffmpeg, but admittedly there is a learning curve.

Offline

#12 2020-07-31 15:43

JimW
Member
Registered: 2015-12-08
Posts: 400

Re: Cut mp3 file to smaller files

Dia_trying wrote:

I find the command line quicker and easier with ffmpeg, but admittedly there is a learning curve.

There is also a "forgetting curve" that I suffer from! If I don't use a command for a few months I forget the exact syntax. So, I now have a text file I call "tips" that I put such things into.

Offline

#13 2020-07-31 21:07

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Cut mp3 file to smaller files

I suffer that too and have a handy notepad (real paper!) that I use often, the problem then is finding it as everything is in date order as it happens and I have to remember when i did something to be able to find it lol

Offline

#14 2020-08-02 16:04

Midas
Member
Registered: 2017-12-15
Posts: 197

Re: Cut mp3 file to smaller files

As I tend to do the same, with files named somewhat haphazardly like 'q4os-install.txt', I resort to Markdown to keep it all sane...

Like thus:

---

<https://www.some.url/>; 2020-07-30

Yadda-yadda-yadda

---

I also try to do the same -- minus the Markdown -- in file comments whenever I change system files.

Offline

#15 2024-05-28 13:59

samanthasen
Member
From: Netherlands
Registered: 2024-05-28
Posts: 1

Re: Cut mp3 file to smaller files

Kumaliosa wrote:

Frankly, I have ever used FFmpeg, which cuts videos and audios based on the command line. However, for new beginners like me, it's really hard to finish it. I have to refer to many articles and cuts with the codec I guess it's right. Anyway, I prefer to use Joyoshare Media Cutter to do the same thing. It's simple, lossless, and fast to cut my MP3 files and other large videos. BTW, FFmpeg may be better for professionals.

What are the advantages and disadvantages of using Joyoshare Media Cutter compared to FFmpeg for video and audio editing, especially for beginners?

Offline

#16 2024-05-29 13:29

Midas
Member
Registered: 2017-12-15
Posts: 197

Re: Cut mp3 file to smaller files

Isn't the first a commercial product? That sums it...

BTW, I find the OP command example somewhat over-complicated -- I reckon the following will be more than enough for most folks.

ffmpeg -ss 00:00:00 -to 00:00 -i infile.mp3 -c copy outfile.mp3

Offline

#17 2024-07-25 21:17

ababuja
Member
Registered: 2024-07-25
Posts: 1

Re: Cut mp3 file to smaller files

Hi, you could use Audacity...

Offline

#18 2024-07-30 23:35

Christopher633
Member
Registered: 2024-07-16
Posts: 15

Re: Cut mp3 file to smaller files

Hey! FFMPEG is a great tool, but yeah, cutting words can be a pain. Try using the -af "apad" option – it adds some silence at the end of each segment, which might help. You can also try Audacity for more precise cutting, like the person just above me said.

Of course, Audacity has a bit of a learning curve, but it's worth getting to know. I work on it a lot and it's fun! Good luck!

Offline

Board footer

Powered by FluxBB