ffmpegflac

Slice FLAC file into 5 second segments


I have a FLAC audio file that I want to slice into 5 second segments. I don't need to resample or change the data in any way.

What tools/libraries are there for this? Should I be looking at ffmpeg? I actually want to create a HLS stream so a tool that would do that would be a bonus but if I can simply chunk the audio data I can create the playlist myself.


Solution

  • Use the segment muxer:

    ffmpeg -i input.flac -f segment -segment_time 5 output_%03d.flac