Streaming flv files

Hi,

I am using the following flash player and Nginx 0.6.3:

with his example video in the banner. Everything works fine when I
don’t use flv_module, but as soom as I activate it, the video doesn’t
play anymore.

Where could that come from?

I also tested this flash player:
http://bluebird.univ-reunion.fr/fms/proto/flv-stream-player/, and it
doesn’t work any better.

Here is my Nginx configuration file:

#user thomas;
worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

server {
listen 80;
set $limit_rate 10k;

error_log /Users/thomas/flv_stream/flv_stream.log notice;

location / {
root /Users/thomas/flv_stream;
index index.html;
} # End of location

location ~ .flv$ {
flv;
} # End of location

} # End of server
}

try moving the location ~ .flv$ inside the location /.

On Fri, Jun 20, 2008 at 03:00:22AM +0200, Thomas wrote:

worker_connections 1024;
error_log /Users/thomas/flv_stream/flv_stream.log notice;
} # End of server
}

Look in an error_log. Probably you need to add “root”:

location ~ .flv$ {
root /Users/thomas/flv_stream;
flv;
}

Thank you Almir and Igor for your prompt answers. Now that I have
added the root inside the flv location, the videos play and there are
no more error messages in my log file.

However I still cannot “scrub” where I want in my movie, it is still
in progressive download mode and not streaming. I used Adobe Flash
converter 8 that is said to properly add the metadata for streaming.

I have just noticed that Jeroen Wijering’s flash player example with
the cute blond girl doesn’t allow me for scrubbing either, should I
use another flash player? What do you guys use for “streaming”?

Best regards,

I can see access to the html, js and swf files, but nothing concerning
the flv file.

What are the differences between debug / notice / info? I cound’t find
anything clear on the wiki. By the way if I specify main as I often
see in examples, I get the following error message:

unknown log format “main”

On Fri, Jun 20, 2008 at 04:16:22PM +0200, Thomas wrote:

I can see access to the html, js and swf files, but nothing concerning
the flv file.

I mean accesses for flv in access_log.

What are the differences between debug / notice / info? I cound’t find
anything clear on the wiki. By the way if I specify main as I often
see in examples, I get the following error message:

unknown log format “main”

You need to set log_format main …, then you can use it in access_log:

http://wiki.codemongers.com/NginxHttpLogModule

I mean accesses for flv in access_log.
I don’t understand what you mean. I see no entries about requesting
the flv file.

I have moved the access_log declaration to different locations, but
still I don’t any access to the flv file being logged somewhere…

On Fri, Jun 20, 2008 at 07:33:41PM +0200, Thomas wrote:

I mean accesses for flv in access_log.
I don’t understand what you mean. I see no entries about requesting
the flv file.

I have moved the access_log declaration to different locations, but
still I don’t any access to the flv file being logged somewhere…

Do you have

access_log off

somewhere in configuration file ?

Actually now I have an entry that appeared in flv_access.log:

127.0.0.1 - - [20/Jun/2008:19:26:38 +0200] “GET /streamable.flv
HTTP/1.1” 200 4137190 “-” “Mozilla/5.0 (Macintosh; U; PPC Mac OS X
10.4; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0”

But it’s strange because I only have one entry although I keep hitting
the reload key in my browser and I empty the cache.

Here is my configuration file:

worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log debug;
server {
listen 80;
server_name railsbuntu.ath.cx;

set $limit_rate 30k;

access_log /Users/thomas/flv_stream/access.log;
error_log /Users/thomas/flv_stream/error.log notice;

location / {
root /Users/thomas/flv_stream;
index index.html;

} # End of location

location ~ .flv$ {
access_log /Users/thomas/flv_stream/flv_access.log;
error_log /Users/thomas/flv_stream/flv_error.log notice;
root /Users/thomas/flv_stream;
flv;
} # End of location

} # End of server

On Fri, Jun 20, 2008 at 02:34:50PM +0200, Thomas wrote:

use another flash player? What do you guys use for “streaming”?
Could you show requests in access_log when you scrubbed movie ?

I have been able to inject metadata to a sample flv file but still it
won’t allow me to scrub passed the already downloaded bytes.

Should I add that I mot not yet using x-accel-redirect and that no
http headers are added by any script?

I simply have the following static files:

  1. index.html that links the flash player and customizes its look
  2. a js file to embed the flash player in the webpage
  3. my flv file

And of course nginx that handles the requests.

Nobody is using the flv streaming capability of Nginx here?

Little update. An flv entry gets added to the log file when the file
gets fully downloaded, this means I am still in “origressive mode”,
could that come from my flv file which doesn’t have the correct
meta-data?

Could someone provide me with a good flv-streamable file to test with?

We are almost there.

Best regards,

When I add the following to customize the flash player:

so.addVariable(“streamscript”,"/")

From what I understood this is what activates the streaming mode
inside the player? The problem is that a loading wheel appears and the
video never starts.