Writing a Python Music Streamer

前端 未结 5 1397
遥遥无期
遥遥无期 2020-12-23 10:01

I would like to implement a server in Python that streams music in MP3 format over HTTP. I would like it to broadcast the music such that a client can connect to the stream

5条回答
  •  盖世英雄少女心
    2020-12-23 10:58

    You'll want to have a .m3u or .pls file that points at a static URI (e.g. http://example.com/now_playing.mp3) then give them mp3 data starting wherever you are in the song when they ask for that file. Probably there are a bunch of minor issues I'm glossing over here...However, at least as forest points out, you can just start streaming the mp3 data from any byte.

提交回复
热议问题