Ticket #1657 (new enhancement)

Opened 2 weeks ago

Last modified 1 week ago

mp3 streaming module

Reported by: snailfly Assigned to: jan
Priority: low Milestone: 1.5.0
Component: mod_flv_streaming Version: 1.5.x-svn
Severity: minor Keywords: flv mp3 stream
Cc: Blocking:
Need Feedback: 0

Description

I have modify mod_flv_streaming to support mp3(or another binary data) streaming, this request is come from http://forum.lighttpd.net/topic/70536 .

Use flv-streaming.binary-streaming = "enable" to enable binary streaming.

Attachments

binary_streaming.1.5.0-svn-r2146.mod_flv_streaming.c (8.5 kB) - added by snailfly on 05/04/2008 09:33:53 AM.

Change History

05/04/2008 09:33:53 AM changed by snailfly

  • attachment binary_streaming.1.5.0-svn-r2146.mod_flv_streaming.c added.

05/04/2008 09:37:26 AM changed by snailfly

  • priority changed from normal to low.
  • component changed from core to mod_flv_streaming.
  • severity changed from normal to minor.

05/04/2008 10:05:36 AM changed by Olaf van der Spek

What's the advantage of this solution compared to standard HTTP range requests?

05/04/2008 11:44:44 AM changed by stbuehler

Hm, that is a good question ;-) But you could ask that for the original mod_flv_streaming too - it just prepends a constant flv-header.

05/04/2008 11:47:39 AM changed by Olaf van der Spek

Isn't the FLV module time-based instead of size-based?

05/04/2008 12:19:35 PM changed by stbuehler

That would require "parsing" the flv file, and i don't see that happening in the code; i just see it takes the "start=[0-9]*" parameter from the querystring and uses that as offset where it starts; and if start > 0 it prepends the flv-header.

snailfly is just using the start parameter to insert a range-request header for mod_staticfile.

I think we should just drop mod_flv_streaming - i guess you could do that in mod_magnet with less than 10 lines and much more readable (and of course the flash players should be fixed to just use normal range requests).

(follow-up: ↓ 9 ) 05/04/2008 02:28:40 PM changed by snailfly

As Far As I Know,the resone for using the mod to do a range request is:

1)is that so easy to using flash player send a "raw" http request with range header? I do not know. By this mod, flash player just send a stand http request with query string "start=[seeking_pos]", and every thing done.

2)A mod will be easy to use, for that user who can't write a good lua script.

3)is that C code faster then LUA script?

(follow-up: ↓ 8 ) 05/04/2008 03:00:15 PM changed by stbuehler

Sure: C is faster. But i don't like it to have a c module for every stupid application out there - that is just the wrong way.

And the c module is way harder to maintain, and that is why i will not apply your patch: it just makes no sense to have this functionality hardcoded in a webserver - the next user wants to rename "start" into something else, ...

Of course we need some basic things coded in c, but i think such features should not be in a upstream c module (of course i have no problem if you use it for yourself or provide it for others; i just don't want to maintain it).

(in reply to: ↑ 7 ) 05/04/2008 03:55:17 PM changed by anonymous

Starting with Flash Player 9.0.115 Request-Range headers are blocked.

what is wrong with this module? sounds to me like very usefull. Is there is a better way to seek (semi stream) a flv and mp3 files from within flash from a not "flash media server"?

I know many users and companies use the mod flv streaming module for there flash players. I think it is one of the best (known) lighttpd modules. But maybe there is a better sollution?

It would be nice to seek in mp3 files, just like flv files.The mp3 and flv formats are most used in flash players. and flash players are most used for these formats.

(in reply to: ↑ 6 ; follow-up: ↓ 10 ) 05/04/2008 04:03:35 PM changed by Olaf van der Spek

Replying to snailfly:

As Far As I Know,the resone for using the mod to do a range request is: 1)is that so easy to using flash player send a "raw" http request with range header? I do not know. By this mod, flash player just send a stand http request with query string "start=[seeking_pos]", and every thing done.

I don't know either, but it's the only proper solution. Having 300 lines of code in the web server just because the flash player is too lazy to support standard range requests isn't the proper way to go.

(in reply to: ↑ 9 ; follow-up: ↓ 11 ) 05/04/2008 04:20:02 PM changed by migz

Replying to Olaf van der Spek: I don't know either, but it's the only proper solution. Having 300 lines of code in the web server just because the flash player is too lazy to support standard range requests isn't the proper way to go.

Absolutely true, but are there any other ways? The flashplayer is still the most used app for creating media players , now-a-days (youtube,jw player etc...) so this functionality would be nice to have from a webserver.

Adobe Flash Player blocks certain HTTP headers from being sent through network APIs for security reasons. http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403030&sliceId=2

(in reply to: ↑ 10 ) 05/04/2008 04:25:55 PM changed by Olaf van der Spek

Replying to migz:

Adobe Flash Player blocks certain HTTP headers from being sent through network APIs for security reasons. http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403030&sliceId=2

Ah, that's no good. I don't see any argumentation though. What's the problem with Request Range?

05/06/2008 08:57:27 PM changed by anonymous

Anyone thought of VBR MP3's? That should justify this mod instantly...

Thanx Snailfly!

05/06/2008 09:02:14 PM changed by Olaf van der Spek

That should justify this mod instantly...

Why? Time-based ranges aren't supported by this mod and probably aren't even needed.


Add/Change #1657 (mp3 streaming module)




Change Properties