Support red5 video recording

shunting - February 2, 2009 - 20:03
Project:AMFPHP
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

This is a checklist for my amfphp/video node recorder/red5 set up, which
so far I haven't been able to get running. I'm putting it here to see
if anybody else can tell me what I've missed, and in hopes that
consolidating all this material in one place will help others. It looks
to me like there are problems with both amfphp (see (A), below) and
with videonoderecorder (see (B)). It's probably a tiny configuration
issue, but it won't "just go away." And needless to say, I'd like to get
both these exciting modules running.

Red5 installation
------------------------------------------------------------------------

(1) red5's ports are open

lsof -i -P

java 9425 XXXX 16u IPv6 0x5265e4c 0t0 TCP *:1935 (LISTEN)
java 9425 XXXX 31u IPv6 0x2b93b2c 0t0 TCP *:5080 (LISTEN)

(2) red5 is on and the test programs work. The port tester demo shows
the "default" and port 1935 as "SUCCESS" (though the others fail).

amfphp installation
------------------------------------------------------------------------

(3) The "second beta" amfphp library is being used:

amfphp-1.9.beta.20070513.zip

(4) amfphp library is in the right subfolder:

/Library/WebServer/Documents/drupal/sites/all/modules/amfphp/amfphp

apache configuration
------------------------------------------------------------------------

(5) httpd.conf is no longer restrictive. It reads:

Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

(6) apachectl configtest shows this is the correct httpd.conf file.

(7) root .htaccess is the stock drupal file.

(8) root files .htaccess looks like drupal generated it

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

file system configuration for video node recorder
------------------------------------------------------------------------

(9) root files is world read/write:

drwxrwxrwx 4 XXXX admin 136 Jan 29 22:10 files

(10) root files has the symbolic link asked for in the README

lrwxr-xr-x 1 XXXX admin 68 Jan 29 22:10
flv -> /Library/WebServer/Documents/red5/webapps/test1212/
streams/localhost

(11) the target directory of the symbolic link exists

ls -al /Library/WebServer/Documents/red5/webapps/test1212/streams
drwxr-xr-x 2 XXXX admin 68 Jan 29 22:05 localhost

drupal administration
------------------------------------------------------------------------

(12) services, amfphp, swftools, upload, and videonoderecorder are
installed and enabled in Drupal, including:

(a) FLV node service
(b) node service
(c) system service

(13) services, amfphp, swftools, and videonoderecorder have permissions
in Drupal, including for anonymous users:

(a) load raw node data
(b) access services
(c) system_service module (all but send mail from remote)
(d) upload files [just a test!]
(e) record webcam video

For video node recorder:

(14) SWF filter is the top (first) filter enabled for Filtered HTML,
and the only filter enabled for Full HTML.

(15) Web cam video settings are configured:

(a) IP address 127.0.0.1 ; red5 serves at that address

(b) webapps path is /Library/WebServer/Documents/red5/webapps ;
that's where oflaDemo, for example, is served from.

services administration
------------------------------------------------------------------------

(16) At admin/build/services, the system.connect service successfully
returns a user and a session ID. node.load successfully returns
node 1.

(17) At services/xmlrpc, this message looks like success:

XML-RPC server accepts POST requests only.

(18) At services/amfphp, this message looks like success:

amfphp and this gateway are installed correctly. You may now
connect to this gateway from Flash.

For video node recorder:

(19) In services settings:

(a) Use Keys is off

(b) Use sessid is off

The problems
------------------------------------------------------------------------

And now the problems:

amfphp
------

(A) For amfphp, despite the message that all is installed correctly
(see (17) above, the "Load the service browser" link that appears
on the services/amfphp, when clicked:

services/browser

yields a "Page not found" error.

But if the service is working, why is this? Further, the link:

"<p>"&lta href='browser'>Load the service browser"&lt/a>"&lt/p>";

is hard coded into gateway.php, so it's certainly expected to work.
But how does a hardcoded link in a library hook up with Drupal's
RESTful approach?

When I go directly to the page:

http://localhost/drupal/sites/all/modules/amfphp/amfphp/browser/
index.html

videonoderecorder
-----------------

(B) For videonoderecorder[1], the camera works -- the MacBook's green
light is on, I can press the record button, the audio level bar
changes, but when I press stop, then send, this happens:

1. Error in Safari: localhost/services/amfphp not found

2. Error in Red5:

[INFO] 2009-02-02 10:07:06,361 main:( org.mortbay.log.invoke0 ) Started SelectChannelConnector@0.0.0.0:5080
[INFO] 2009-02-02 10:07:06,362 main:( org.red5.server.Standalone.main ) Startup done in: 5521 ms
[INFO] 2009-02-02 10:17:53,157 pool-3-thread-5:( org.red5.server.stream.VideoCodecFactory.getVideoCodec ) Trying codec org.red5.server.stream.codec.ScreenVideo@e87ba1
[WARN] 2009-02-02 10:29:36,660 pool-3-thread-14:( org.red5.server.service.ServiceInvoker.invoke ) Service not found: streamManager
[WARN] 2009-02-02 10:29:51,268 pool-3-thread-4:( org.red5.server.service.ServiceInvoker.invoke ) Service not found: streamManager
[WARN] 2009-02-02 10:30:03,358 pool-3-thread-10:( org.red5.server.service.ServiceInvoker.invoke ) Service not found: streamManager

3. Error in apache error_log

[Mon Feb 02 10:30:03 2009] [error] [client ::1] File does not exist:
/Library/WebServer/Documents/services,
referer: http://localhost/drupal/sites/all/modules/red5flashserver
/videonoderecorder/recorder/VideoNodeRecorder.swf

4. And apache access_log

::1 - - [02/Feb/2009:10:30:03 -0500] "POST /services/amfphp HTTP/1.1" 404 213

I tried changing the $base_url to http://localhost/drupal in settings.php
but the problems persist, and the error message at (B)(1) above does
not change.

So, I'm either missing an item on the checklist, or I've set an item
on the checklist to the wrong value. But what?

NOTES
------------------------------------------------------------------------
[1] I needed to change the parameters in swf so that the ID that ends
up on the object tag ('swfwebcamVideoRec') is in otherVars, not
flashVars, like this:

$form['title']['#suffix'] = swf(
$base_url . '/' . drupal_get_path('module', 'videonoderecorder') .
'/recorder/VideoNodeRecorder.swf',
array('id' => 'webcamVideoRec', 'width'=>'352', 'height'=>'344',
'bgcolor'=>'FFFFFF'),
$flashvars,
array('id' => 'swfwebcamVideoRec'),
SWFDEFAULT
);

Otherwise, videonoderecorder.js keeps telling me to enter a title,
even when I have.

VERSIONS
------------------------------------------------------------------------

Drupal 5.15, 2009-01-14

amfphp-5.x-1.x-dev.tar.gz

amfphp-1.9.beta.20070513 ("the second beta)

red5flashserver-5.x-1.0.tar.gz (with Video Node Recorder: 5.x-1.0)

services-5.x-0.92.tar.gz

OS X 10.5.6

Safari 3.1.2

Apache/2.2.9

MySQL 5.1.30

PHP 5.2.6

Red5 0.6.3

#1

snelson - February 14, 2009 - 21:50
Title:amfphp service browser does not load; red5 video recorder does not Save» Support red5 video recording
Category:bug report» feature request
Status:active» postponed (maintainer needs more info)

The AMFPHP service browser does not currently work with either version of AMFPHP.module. So clicking the link on the gateway services/amfphp page does not go anywhere. Instead, use the Drupal services browser at admin/build/services/browse. The amfphp browser may be available at some point, just has to be coded to work.

As for red5 video, you're the first I've heard of venturing into this territory. It sounds very cool and hope you keep documenting your experience. Please post patches if anything needs to change in amfphp.module.

- Scott

#2

shunting - February 20, 2009 - 20:54

UPDATE:

Still getting the same error:

1. Error in Safari: localhost/services/amfphp not found

However, my Drupal path is localhost/drupal, so the path above (which is the one that appears in the admin interface to services, where it works) is localhost/drupal/services/amfphp

Looking for what would create this path, my best guess is that in this file:

sites/all/modules/amfphp/amfphp/globals.php

changing this line from:

$servicesPath = "services/";

to:

$servicesPath = "drupal/services/";

since eg in gateway.php this line

$gateway->setClassPath($servicesPath);

grabs that global.

However, the change has no effect. In fact, I can't even echo it to the screen (nor anhy other setClassPath).

So, back to it. Could the issue be something hard-coded in VideoNodeRecorder.swf itself???

 
 

Drupal is a registered trademark of Dries Buytaert.