Skip to content

MP3: Support mp3 for RTMP/HLS/HTTP-FLV/HTTP-TS/HLS etc. #296

@winlinvip

Description

@winlinvip

SRS 3/4 supports MP3 over RTMP/HTTP-FLV/HTTP-TS, however there is some bugs need to be fixed.

Usage

Start SRS server:

# For RTMP/HTTP-FLV/HLS
./objs/srs -c conf/mp3.conf

# For HTTP-TS
./objs/srs -c conf/mp3.ts.conf

# For HTTP-MP3
./objs/srs -c conf/mp3.http.conf

# For RTMP(MP3) to WebRTC
./objs/srs -c conf/mp3.rtc.conf

Publish RTMP stream with mp3 audio:

ffmpeg -stream_loop -1  -re -i doc/source.flv -vcodec copy -acodec libmp3lame \
    -f flv rtmp://localhost/live/livestream

Play live stream:

  • RTMP by VLC or ffplay: rtmp://localhost/live/livestream
  • HTTP-FLV by VLC, ffplay or H5(srs-player): http://localhost:8080/live/livestream.flv
  • HTTP-MP3 by VLC, ffplay or H5(srs-player): http://localhost:8080/live/livestream.mp3
  • HTTP-TS by VLC, ffplay or H5(srs-player): http://localhost:8080/live/livestream.ts
  • HLS by VLC, ffplay or H5(srs-player): http://localhost:8080/live/livestream.m3u8
  • Covert RTMP(MP3) to WebRTC, play by H5(srs-player): webrtc://localhost/live/livestream

Status

I tested the ability for MP3 over serval protocols, found that some is ok but others fail, and listed the test result bellow.

Note: There is a bug for playing HTTP-TS with mp3 audio by H5, see mpegts.js #83

Metadata

Metadata

Assignees

Labels

EnhancementImprovement or enhancement.FeatureIt's a new feature.TransByAITranslated by AI/GPT.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions