You are not logged in.

#1 2018-03-01 21:07

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

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: 561

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: 292

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,244
Website

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: 292

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: 561

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: 292

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: 292

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

Board footer

Powered by FluxBB