问题
I simply want to segment an mp3 for HTTP Live Streaming in any linux distro (preferably CentOS) for the purpose of audio streaming to an iOS app.
Out of the linux segmenters, I can get the following to compile in CentOS.
http://wiki.andy-chu.com/doku.php?id=http_live_streaming (not sure last time this was updated)
m3u8-segmenter on github (updated months ago)
https://github.com/carsonmcdonald/HTTP-Live-Video-Stream-Segmenter-and-Distributor [ruby wrappers + c] (last updated 2 years ago, and a v2 branch 9 months old)
In order to prep the file for segmenting, here is the ffmpeg conversion string to generate a valid ts file:
$ ffmpeg -er 4 -i input.mp3 -f mpegts -acodec libmp3lame -ar 22050 -ab 32k -vn output.ts
Each of the segmenters require various input switches, all quite simple, and all crash out with a seg fault. #2 actually does some segmenting, but faults after 56 segments every time. I've tried various mp3s with the same results. The issue queues for 2 & 3 are full, with no responses in months of the same issues.
Others must be doing this in a live production environment that isn't running OSX.. what are your methods?
回答1:
You should try httpsegmenter @ http://code.google.com/p/httpsegmenter/ It is based on the segmenter.c
I've compiled and created segmented mp3, aac, mp4. It can be tricky to match all the compilation requirements, but after that is just "follow the instructions".
For this segmenter you don't need to create a mpeg-ts with the mp3 content. Just give the mp3 as input.
回答2:
This might not be applicable but http://tldp.org/HOWTO/MP3-HOWTO-11.html mentions several services to use, including an Apache module if Icecast, for example, does not match your needs.
来源:https://stackoverflow.com/questions/10247789/http-live-streaming-segmenting-mp3-on-linux