Red5 documentation addon

eZ Systems has included in their last release of eZ Publish a client for the Red5 video streaming server.

The documentation is a bit short and you don't necessary have all the elements to complete a full installation. After two hours of hanging about, I succeeded. :-D

Apache configuration

About the Apache configuration, you must add the following lines :

Listen 100

NameVirtualHost *:100

<VirtualHost localhost:100>

<Directory path\to\Red5\webapps>

Options FollowSymLinks

AllowOverride None

Allow From All

</Directory>

DocumentRoot path\to\Red5\webapps

ServerName localhost

</VirtualHost>

The first two lines are declaring to Apache the use of port 100 and that some virtual host will listen to it.

The second part is the virtual host as well, what I've added is the "Allow From All" directive that forbidd everyone to access the video. We can tune that.

Content configuration

The Red5 flash client is set up with the content published. In the eZ Flow site package, you have a content named "Live Recorder" which will support the recoder and which can be configured by editing its content. We have three attributes:

  • Name : the name of the content : whatever.
  • Stream Server : it is the URL to the Red5 server. The protocole used is RTMP (watch out the spelling) and you must finish it by a slash :
rtmp://localhost:1935/test/
  • File Server : it is the URL of the Apache file server which deserves the saved files. It's not streams/streams like in the screenshot.
http://localhost:100/test/streams/

And then you plug your webcam and you can start to make some funny films... live !

Conclusion

This feature is very powerful and stunning, however, I didn't find how we can put a live stream online and how we can list all the video we have taken.

Red5 Wiki

Comments

1. Works

HI
Red5 had to be red5!

now it all works.

Thanks very much for your help

2. doesn't work

Hi

Seemed to have eliminated one error but it still doesn't work and I get this error:

* Restarting web server apache2
Warning: DocumentRoot [/usr/lib/Red5/webapps] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting Warning: DocumentRoot [/usr/lib/Red5/webapps] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

which I don't understand cause /usr/lib/Red5/webapps/test/streams is where the flv's are recorded in. and when I add test/streams I get this error

willard@ubuntu:/etc/apache2/sites-enabled$
willard@ubuntu:/etc/apache2/sites-enabled$
willard@ubuntu:/etc/apache2/sites-enabled$ sudo nano 000-default
willard@ubuntu:/etc/apache2/sites-enabled$ sudo /etc/init.d/apache2 restart
* Restarting web server apache2 Warning: DocumentRoot [/usr/lib/Red5/webapps/test/streams] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting Warning: DocumentRoot [/usr/lib/Red5/webapps/test/streams] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

3. doesn't work

Try to change the following line in your config :

<Virtualhost localhost:100>

by

<Virtualhost *:100>

4. doesn't work

here my entire 000-default, ther seems to be a duplica vitual host for port 100, but I can't figure out why..

<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/129
</Directory>

</VirtualHost>

<VirtualHost 77.60.231.138>
<Directory /var/www/ezpublish>
Options FollowSymLinks
AllowOverride None
</Directory>

<IfModule mod_php5.c>
php_admin_flag safe_mode Off
php_admin_value register_globals 0
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
php_value allow_call_time_pass_reference 0
</IfModule>

DirectoryIndex index.php

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule content/treemenu/? /index_treemenu.php [L]
Rewriterule ^/var/storage/.* - [L]
Rewriterule ^/var/[^/]+/storage/.* - [L]
RewriteRule ^/var/cache/texttoimage/.* - [L]
RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
Rewriterule ^/share/icons/.* - [L]
Rewriterule ^/extension/[^/]+/design/[^/]+/(flash|stylesheets|images|javascripts?)/.* - [L]
Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
RewriteRule ^/favicon\.ico - [L]
RewriteRule ^/robots\.txt - [L]
# Uncomment the following lines when using popup style debug.
# RewriteRule ^/var/cache/debug\.html.* - [L]
# RewriteRule ^/var/[^/]+/cache/debug\.html.* - [L]
RewriteRule .* /index.php
</IfModule>

DocumentRoot /var/www/ezpublish
ServerName 77.60.231.138
ServerAlias
</VirtualHost>


Listen 100

NameVirtualHost *:100

<VirtualHost localhost:100>

<Directory /usr/lib/Red5/webapps/test/streams>

Options FollowSymLinks

AllowOverride None

Allow From All

</Directory>

DocumentRoot /usr/lib/Red5/webapps/test/streams

ServerName localhost

</Virtu

5. doesn't work

Hi Max,

I did restart and below is the outcome of apache2ctl -S

Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Mon Nov 10 20:51:48 2008] [warn] NameVirtualHost *:100 has no VirtualHosts
VirtualHost configuration:
77.60.231.138:* 77.60.231.138 (/etc/apache2/sites-enabled/000-default:43)
192.168.1.11:100 192.168.1.11 (/etc/apache2/sites-enabled/000-default:90)
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server 127.0.1.1 (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost 127.0.1.1 (/etc/apache2/sites-enabled/000-default:1)
Syntax OK

thanks for you help

willard

6. doesn't work

Some things to check :
- have you restarted Apache ?
- can you access the url http://localhost:100/test/somefile ?
- is your content correctly configured ?
- have you checked in the error file of apache if you get a clue about what's wrong ?
- you can also run a "apachectl -S" to see if your apache config file is ok.

Let me know.

Maxime

7. doesn't work

Hi,
Thanks for the clarification. I was almost as far as you and what you did makes a lot of sense to me. But In my case it still doens't work. Apache doesn't stream the files (the recording part works just fine). I have the files in:
/usr/lib/red5/webapps/test/stream and set this in 000-default in the apache conf/sites-enabled folder instead of httpd.conf (because I thing the virtial hosts are declared here) for the rest I followed you literally.
Any idea what's wrong?

btw I have ubuntu linux

cheers willard
eZ Publish™ copyright © 1999-2009 eZ Systems AS