Project

General

Profile

Actions

Feature #1657

closed

mp3 streaming module

Added by snailfly almost 16 years ago. Updated 2 months ago.

Status:
Missing Feedback
Priority:
Low
Category:
mod_flv_streaming
Target version:
-
ASK QUESTIONS IN Forums:
No

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.


Files

binary_streaming.1.5.0-svn-r2146.mod_flv_streaming.c (8.54 KB) binary_streaming.1.5.0-svn-r2146.mod_flv_streaming.c snailfly, 2008-05-04 09:33
200.binary_streaming.patch (31.5 KB) 200.binary_streaming.patch binary streaming for 1.4.x -- E.Yunak <[myname] Anonymous, 2008-09-08 14:10
200.binary_streaming.2.patch (31.5 KB) 200.binary_streaming.2.patch binary streaming for 1.4.x -- E.Yunak <[myname] Anonymous, 2008-09-08 14:13
200.binary_streaming.3.patch (7.11 KB) 200.binary_streaming.3.patch binary streaming for 1.4.x (sorry, previous once contain .swp file, please delete them...) -- E.Yunak <[myname] Anonymous, 2008-09-09 06:34
Actions #1

Updated by admin almost 16 years ago

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

Actions #2

Updated by stbuehler almost 16 years ago

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.

Actions #3

Updated by admin almost 16 years ago

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

Actions #4

Updated by stbuehler almost 16 years ago

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).

Actions #5

Updated by snailfly almost 16 years ago

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?

Actions #6

Updated by stbuehler almost 16 years ago

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).

Actions #7

Updated by Anonymous almost 16 years ago

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.

Actions #8

Updated by admin almost 16 years ago

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.

Actions #9

Updated by Anonymous almost 16 years ago

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

-- migz

Actions #10

Updated by admin almost 16 years ago

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?

Actions #11

Updated by Anonymous almost 16 years ago

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

Thanx Snailfly!

Actions #12

Updated by admin almost 16 years ago

That should justify this mod instantly...

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

Actions #13

Updated by Anonymous over 15 years ago

Replying to snailfly:

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.

what about install? thanks very much.

-- afan

Actions #14

Updated by Anonymous over 15 years ago

Replying to snailfly:

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.

help me!
install error:
mod_flv_streaming.c:304: error: 'sendlen'undeclared(first use in this function)
mod_flv_streaming.c:304: error: (Each undeclared identifier is reported only once
mod_flv_streaming.c:304: error: for each function it appears in.)
...

thanks

Actions #15

Updated by Anonymous over 15 years ago

Replying to anonymous:

help me!
install error:
mod_flv_streaming.c:304: error: 'sendlen'undeclared(first use in this function)
mod_flv_streaming.c:304: error: (Each undeclared identifier is reported only once
mod_flv_streaming.c:304: error: for each function it appears in.)
...

thanks

in file src/mod_flv_streaming on line 304 replace
'sendlen = sce->st.st_size - start;'
with
'long sendlen = sce->st.st_size - start;'

-- E.Yunak <[myname]

Actions #16

Updated by Anonymous over 15 years ago

Replying to E.Yunak <[myname@…>]:

Replying to anonymous:

help me!
install error:
mod_flv_streaming.c:304: error: 'sendlen'undeclared(first use in this function)
mod_flv_streaming.c:304: error: (Each undeclared identifier is reported only once
mod_flv_streaming.c:304: error: for each function it appears in.)
...

thanks

in file src/mod_flv_streaming on line 304 replace
'sendlen = sce->st.st_size - start;'
with
'long sendlen = sce->st.st_size - start;'

thanks very much!

-- afan

Actions #17

Updated by Anonymous over 15 years ago

This patch should work on 1.4.x, i tested on 1.4.9
In case someone needs it...

-- E.Yunak <[myname]

Actions #18

Updated by gstrauss almost 8 years ago

  • Assignee deleted (jan)
Actions #19

Updated by gstrauss almost 8 years ago

  • Target version deleted (1.5.0)
Actions #20

Updated by gstrauss about 7 years ago

  • Description updated (diff)
  • Status changed from New to Missing Feedback

If there is someone out there who would actually use this feature, please comment here and I'll implement the new directive requested (flv-streaming.binary-streaming = "enable"), but Flash and flv are being obsoleted by HTML5, so this feature request is likely obsolete, too.

Actions #21

Updated by gstrauss 2 months ago

  • ASK QUESTIONS IN Forums set to No

This can be easily implemented with mod_magnet by extending lua mod_flv_streaming. It is likely to work with both modern and ancient versions of lighttpd; no need to recompile lighttpd if your lighttpd has mod_magnet available.

Actions

Also available in: Atom