Trying to stream Flash Video?
Tired of using PHP?
I wrote mod_flvx to do all of the streaming stuff via an apache module.
To configure, add AddHandler flv-stream .flv to your httpd config.
thats all.
EDIT: Wiki page explaining all of the encoding and flash player needs for using mod_flvx.
Looks nice, but have absolutely NO idea how to make a mod from the source you so generously published
Can you put a pre-cooked mod online as well? Pls respond by email
tnx
Patrick
Looks like the second module that moves from lighty into apache world. first mod_sendfile and now this wonderful module. How about a port of mod_secdownload ?
http://www.synd.info/downloads/releases/
from my spec file:
Summary: Token-based authentication similar to mod_secdownload in LIGHTTPD.
description:
This module uses token based authentication to secure downloads and prevent
deep-linking.
Have your PHP script or servlet generate the to authenticate the
download. Apache can then treat the download request like a normal file
transfer without having to pipe the file through a script in order to
add authentication.
Authors:
———
Mikael Johansson (http://www.synd.info)
it doesn’t work.
I’ve compile and add the directive to the httpd.conf.
but when I open the flv url on the browser, it ask to download instead.
Apache/2.2.6
Syntax error on line 277 of /usr/local/etc/apache2/httpd.conf:
Cannot load /usr/local/libexec/apache2/mod_flvx.so into server: /usr/local/libexec/apache2/mod_flvx.so: Undefined symbol “apr_brigade_insert_file”
I’m getting the same error as nesq:
[root@test1 conf]# /opt/apache2/bin/apachectl -t
Syntax error on line 227 of /opt/apache2/conf/httpd.conf:
Cannot load /opt/apache2/modules/mod_flvx.so into server: /opt/apache2/modules/mod_flvx.so: undefined symbol: apr_brigade_insert_file
Running Apache/2.0.54
Anyone got any ideas how to fix this?
If you use httpd 2.2, this isn’t a problem.
Using httpd 2.0.54, you would have to patch your apr-util to get the new apr_brigade_insert_file.
Paul,
I think it’s so cool that you’re using apache server to do seeking instead of putting the load on php instances.
But I can’t follow how to seek to a spot in the flash media file.
In php streaming using xmoov.php to scrub to a different spot the way to get stuff done is call the php document, then use GET parameters to tack on the filename, position, and other builtin functions.
ns.play (_phpURL + “?file=” + _vidName + “&position=” + positions[i] + “&bw=” + bandwidth);
Here in your method you call the file using the following parameters visible in html:
http://HOST/FLVScrubber2/FLVScrubber2.swf?file=http://HOST/FILE.flv&bufferTime=3&startAt=0&autoStart=false
So if I wanted to have to seek using the apache server mod, should I have my fla document use the GET method to the server and say something like:
ns.play(“http://FLVScrubber2.swf?file=”+myFile.flv+ “&startAt=” positionOfDesiredSeek[i]);
So is the startAt function finding the nearest file position to seek using your apache mod? Or do we need to write something more in our actionscript to tell apache the closest filepostion we would like to seek? Because the issue for a while with php seeking was that unless you had an exact file position, flash took some time before it got to your spot. So someone built in some slick functions in php to do their file seeking.
I’m trying to understand what your mod is doing so that I can build some cool functionality on the scrubber bar, on the draggable triangle, and create some movieclips which act as markers during longer play of media.
Thanks
there is a drupal module for that?
I tried mod_flvx.so on Apache 2.2.9 and FLV-Scrubber 3.10. I added a LoadModule line to my httpd.conf to load the given mod_flvx.so (did not compile locally, but downloaded directly from site). I also added the AddHandler directive as indicated in the wiki instructions. But my Apache web server fails to start. Any ideas?
If I remove the LoadModule line, the web server starts successfully. Video plays fine. But I still cannot seek to a point in the video.
Thanks in advance for the help.
Hi Paul,
Thanks for the article & module.
Is there a way to test whether mod_flvx.so is working properly? It is loaded according to phpinfo, but I can’t tell whether the .flv files I’m accessing on my server are being dowloaded or streamed.
Running into this same error:
Syntax error on line 277 of /usr/local/etc/apache2/httpd.conf:
Cannot load /usr/local/libexec/apache2/mod_flvx.so into server: /usr/local/libexec/apache2/mod_flvx.so: Undefined symbol “apr_brigade_insert_file”
I would love to try this alternative:
Using httpd 2.0.54, you would have to patch your apr-util to get the new apr_brigade_insert_file.
But does anyone have step-by-step instructions on how to do this?
Or better yet is there a mod_flvx alternative for Apache 2.0.*?
I get the mod_flvx.c end type:
apxs -I /usr/local/include/apr-1/ -c -i ./mod_flvx.c (apr stay in /usr/local/include/apr-1/)
System write me:
cc -DLOGIN_CAP -funsigned-char -O2 -fno-strict-aliasing -pipe -DDOCUMENT_LOCATION=”/usr/local/www/data” -DDEFAULT_PATH=”/bin:/usr/bin:/usr/local/bin” -DHARD_SERVER_LIMIT=512 -fpic -DSHARED_MODULE -I/usr/local/include/apache -I/usr/local/include/apr-1/ -c ./mod_flvx.c
./mod_flvx.c: In function ‘drive_flvx’:
./mod_flvx.c:81: warning: passing argument 4 of ‘apr_stat’ from incompatible pointer type
./mod_flvx.c:90: warning: passing argument 5 of ‘apr_file_open’ from incompatible pointer type
./mod_flvx.c:94: warning: passing argument 4 of ‘ap_log_rerror’ makes pointer from integer without a cast
./mod_flvx.c:94: warning: passing argument 5 of ‘ap_log_rerror’ from incompatible pointer type
./mod_flvx.c:110: error: ‘conn_rec’ has no member named ‘bucket_alloc’
./mod_flvx.c:110: warning: passing argument 1 of ‘apr_brigade_create’ from incompatible pointer type
./mod_flvx.c:116: warning: passing argument 4 of ‘ap_log_rerror’ makes pointer from integer without a cast
./mod_flvx.c:116: warning: passing argument 5 of ‘ap_log_rerror’ from incompatible pointer type
./mod_flvx.c:121: warning: passing argument 5 of ‘apr_brigade_insert_file’ from incompatible pointer type
./mod_flvx.c:129: error: ‘struct stat’ has no member named ‘mtime’
./mod_flvx.c:132: error: ‘request_rec’ has no member named ‘output_filters’
./mod_flvx.c: In function ‘flvx_handler’:
./mod_flvx.c:142: error: ‘AP_METHOD_BIT’ undeclared (first use in this function)
./mod_flvx.c:142: error: (Each undeclared identifier is reported only once
./mod_flvx.c:142: error: for each function it appears in.)
./mod_flvx.c: In function ‘register_hooks’:
./mod_flvx.c:157: error: ‘APR_HOOK_MIDDLE’ undeclared (first use in this function)
./mod_flvx.c: At top level:
./mod_flvx.c:160: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘flvx_module’
apxs:Break: Command failed with rc=1
OS freeBSD 7.0, Apache 1.3.41
For Example, in header files *.h i can not find define AP_METHOD_BIT
Can you help me?
Glad I stumbled upon this.
Here’s what worked for a mac pro server
apxs -L /usr/include/apr-1/ -c -Wc,’-arch x86_64′ -Wl,’-arch x86_64′ -i -a mod_flvx.c
Pingback: Вещание видео из apache : Шкурыгин Павел
Try apache22 with APR. In apache 1.3 APR is not installed. I mean devel/apr.
How can this module combined with mod_xsendfile? I need to serve streamed FLV to logged in users only.
I tried to use both modules but only one of them seems working.
I have done as directed : downloaded the code, compiled and installed on my FreeBSD server with Apache 2.2.14, added the Load and AddHandler directives to the httpd.conf, restarted Apache. I have an .flv, processed with flvtool2 on the server and accessible via apache. But all to no avail.
I see nothing at the browser. I see ‘Handler for flv-stream returned invalid result code 53′ in the error log.
From an ubuntu (Linux ws3 2.6.31-21-generic #59-Ubuntu SMP Wed Mar 24 07:28:27 UTC 2010 x86_64, Apache/2.2.12 ) machine here I don’t see the error code… but I don’t see the .flv either.
Any help from any quarter greatly appreciated.
Pingback: Video Streaming | 3medya
Pingback: VIDEO STREAMING « 3onoikom'sharing ilmu