Yes it will work. The only question is, if there is an encoder out yet that
can save h264 video in flv. I know the ffmpeg guys were working on it.
Is it coming from the metadata that is positionned at the end of the
video file instead of at the beginning?
Did anyone manage to create a streamable flv video with h264 format?
I’ve placed two examples on Megaupload encoded with Flash Media
Encoder 3.0. H264 Video with MP3 Audio in a f4v container (this is the
new container format used by Adobe). These are not multibitrate
streams.
Yes it will work. The only question is, if there is an encoder out yet that
can save h264 video in flv. I know the ffmpeg guys were working on it.
On that topic, I tried making a .flv video that uses h264 format. The
video was encoded using mencoder and x264. The video plays fine with
VLC, but when I want to inject metadata in the video using flvtool2, I
get the following error message:
ERROR: IO is not a FLV stream. Wrong signature.
Is it coming from the metadata that is positionned at the end of the
video file instead of at the beginning?
Did anyone manage to create a streamable flv video with h264 format?
Yes it will work. The only question is, if there is an encoder out yet that
can save h264 video in flv. I know the ffmpeg guys were working on it.
On that topic, I tried making a .flv video that uses h264 format. The
video was encoded using mencoder and x264. The video plays fine with
VLC, but when I want to inject metadata in the video using flvtool2, I
get the following error message:
ERROR: IO is not a FLV stream. Wrong signature.
Is it coming from the metadata that is positionned at the end of the
video file instead of at the beginning?
Did anyone manage to create a streamable flv video with h264 format?
Yes it will work. The only question is, if there is an encoder out yet that
can save h264 video in flv. I know the ffmpeg guys were working on it.
On that topic, I tried making a .flv video that uses h264 format. The
video was encoded using mencoder and x264. The video plays fine with
VLC, but when I want to inject metadata in the video using flvtool2, I
get the following error message:
ERROR: IO is not a FLV stream. Wrong signature.
Is it coming from the metadata that is positionned at the end of the
video file instead of at the beginning?
Did anyone manage to create a streamable flv video with h264 format?
I have implemented an H.264 pseudo streaming module. And now I want to
add cache feature to this module.
My situation is that we have some data centers across country, and each
data center has some servers to provide video clips to our users.
Because we want to simplify the management of the storage and video
files synchronization problem, we maintain only one central storage. The
servers on edge data centers should cache the most visited video clips
based on LRU algorithm.
I read the ngx_httpd_proxy_module.c file, and I think it is a good
starting point. I know a simplified module capable of this cache feature
should work like this:
Step 1.if the requested file has been found on local disk, return the
file
Step 2.if the requested file has not been found on local disk, proxy
this request to original server and send the response to user and save
the file to local disk.
I know I can implement Step 1 on ngx_http_proxy_handler function. For
Step 2 I know I should create the proxy request on
ngx_http_proxy_create_request function, but I do NOT know on which
function I can save the response file to local disk and how. Should I
implement this feature on ngx_http_proxy_finalize_request function? And
which data structure contains the returned file data, is it
u->buffering?
I have implemented an H.264 pseudo streaming module. And now I want to
add cache feature to this module.
My situation is that we have some data centers across country, and each
data center has some servers to provide video clips to our users.
Because we want to simplify the management of the storage and video
files synchronization problem, we maintain only one central storage. The
servers on edge data centers should cache the most visited video clips
based on LRU algorithm.
I read the ngx_httpd_proxy_module.c file, and I think it is a good
starting point. I know a simplified module capable of this cache feature
should work like this:
Step 1.if the requested file has been found on local disk, return the
file
Step 2.if the requested file has not been found on local disk, proxy
this request to original server and send the response to user and save
the file to local disk.
I know I can implement Step 1 on ngx_http_proxy_handler function. For
Step 2 I know I should create the proxy request on
ngx_http_proxy_create_request function, but I do NOT know on which
function I can save the response file to local disk and how. Should I
implement this feature on ngx_http_proxy_finalize_request function? And
which data structure contains the returned file data, is it
u->buffering?
I think it will work on nginx 0.6.32.
I tested the H.264 pseudo streaming module only on my 64bit machine. I
do not know weather it will compile or work on a 32bit machine. If it
works, please let me know.
Best Regard,
Peng Wu
2008-10-08
Tech. VP http://www.openv.com
26th Floor, Block 16, jianwai SOHO,
No.39 Middle East Third Ring Rd
Chaoyang District Beijing 100022
China
Tel: (010)5878 7828
Fax: (010)5878 7900
Email : [email protected]
@Kon W.: thank you very much for providing the f4v file,
unfortunately the video didn’t play. I run flvtool2 to inspect the
video file, and as expected, I got the same error that I had when
encoding with mencoder: IO is not a FLV stream. Wrong signature. So
either Nginx flv module and/or the JW FLV player I am using don’t know
how to use the file.
@Peng Wu: xie xie ni, I will have a look at your module. Is it
compatible with the stable latest release of Nginx 0.6.32? The video
quality is truely amazing, good ole’ VP6 is completely left behind,
and my poor ole’ iBook is struggling to play the video
@Kon W.: thank you very much for providing the f4v file,
unfortunately the video didn’t play. I run flvtool2 to inspect the
video file, and as expected, I got the same error that I had when
encoding with mencoder: IO is not a FLV stream. Wrong signature. So
either Nginx flv module and/or the JW FLV player I am using don’t know
how to use the file.
@Peng Wu: xie xie ni, I will have a look at your module. Is it
compatible with the stable latest release of Nginx 0.6.32? The video
quality is truely amazing, good ole’ VP6 is completely left behind,
and my poor ole’ iBook is struggling to play the video
@Kon W.: thank you very much for providing the f4v file,
unfortunately the video didn’t play. I run flvtool2 to inspect the
video file, and as expected, I got the same error that I had when
encoding with mencoder: IO is not a FLV stream. Wrong signature. So
either Nginx flv module and/or the JW FLV player I am using don’t know
how to use the file.
Then your tools are broken. As I said before this is created by the
latest version of FME’s output. It is playable on new versions of FMS
which are as of yet unreleased. IF you want to support VOD delivery
for the new flash format then you will have to decode this format in
the future.
Hi Peng Wu, I tried compiling your module on my PowerPC dev machine,
and it crashed with the following error message:
src/http/modules/mp4/ngx_http_mp4_module.c: In function
‘ngx_http_mp4_handler’:
src/http/modules/mp4/ngx_http_mp4_module.c:463: error:
‘ngx_open_file_info_t’ has no member named ‘directio’
src/http/modules/mp4/ngx_http_mp4_module.c:463: error: ‘struct
ngx_http_core_loc_conf_s’ has no member named ‘directio’
src/http/modules/mp4/ngx_http_mp4_module.c:516: error: ‘struct
ngx_http_request_s’ has no member named ‘root_tested’
cc1: warnings being treated as errors
src/http/modules/mp4/ngx_http_mp4_module.c:551: warning: comparison
between signed and unsigned
src/http/modules/mp4/ngx_http_mp4_module.c:581: warning: passing
argument 4 of ‘moov_seek’ from incompatible pointer type
src/http/modules/mp4/ngx_http_mp4_module.c: In function
‘atom_read_header’:
src/http/modules/mp4/ngx_http_mp4_module.c:777: warning: cast from
pointer to integer of different size
make[1]: *** [objs/addon/mp4/ngx_http_mp4_module.o] Error 1
make: *** [build] Error 2
I checked the changelog for Nginx, and indeed the directio function
was introduced in 0.7.7. So I tried compiling with 0.7.17, and now I
get the following error message:
src/http/modules/mp4//ngx_http_mp4_module.c: In function
‘ngx_http_mp4_handler’:
src/http/modules/mp4//ngx_http_mp4_module.c:551: warning: comparison
between signed and unsigned
src/http/modules/mp4//ngx_http_mp4_module.c:581: warning: passing
argument 4 of ‘moov_seek’ from incompatible pointer type
src/http/modules/mp4//ngx_http_mp4_module.c: In function
‘atom_read_header’:
src/http/modules/mp4//ngx_http_mp4_module.c:777: warning: cast from
pointer to integer of different size
make[1]: *** [objs/addon/mp4/ngx_http_mp4_module.o] Error 1
make: *** [build] Error 2
I recall a former post on this topic:
I’m not sure manipulating mp4 files is a good idea in a single process
server. Also Adobe released a new FLV specification a few days ago
that supports h264, so there is no real need for supporting mp4 files,
because the flv streaming module already works.
Sergej
Has anyone experienced any problem about that? If I understand
correctly, the mp4 file format was not designed to be streamed online.
I updated the source code today and removed some junk code.
I recommand you download a new version http://218.244.191.134:8081/mp4.tar.bz2 and compile again, and then tell
me the compiler output.
Please tell me you machine 32bit or 64bit, what CPU type, your os and
version, and your compile version.
I guess you use a 32bit machine, so I added some code to deal with this
issue, maybe I have already solved the compile error and warnings.
Because I do not a 32bit test box, you could download the new version
code and tell me your result.
I checked the changelog for Nginx, and indeed the directio function
was introduced in 0.7.7. So I tried compiling with 0.7.17, and now I
get the following error message:
src/http/modules/mp4//ngx_http_mp4_module.c: In function
‘ngx_http_mp4_handler’:
src/http/modules/mp4//ngx_http_mp4_module.c:551: warning: comparison
between signed and unsigned
src/http/modules/mp4//ngx_http_mp4_module.c:581: warning: passing
argument 4 of ‘moov_seek’ from incompatible pointer type
src/http/modules/mp4//ngx_http_mp4_module.c: In function
‘atom_read_header’:
src/http/modules/mp4//ngx_http_mp4_module.c:777: warning: cast from
pointer to integer of different size
make[1]: *** [objs/addon/mp4/ngx_http_mp4_module.o] Error 1
make: *** [build] Error 2
I recall a former post on this topic:
I’m not sure manipulating mp4 files is a good idea in a single process
server. Also Adobe released a new FLV specification a few days ago
that supports h264, so there is no real need for supporting mp4 files,
because the flv streaming module already works.
Sergej
Has anyone experienced any problem about that? If I understand
correctly, the mp4 file format was not designed to be streamed online.
I think you can give nginx 0.7.17 a chance.
I guess these errors are caused by the extented data structure of nginx
0.7 out of nginx 0.6.
nginx 0.7.17 is rather stable on my box, so maybe you want to play with
it.
I am so sorry I did not test this module on nginx 0.6.32.
I tried compiling on my PowerPC G4 32bits cpu running Tiger with
Xcode, gcc version is 4.0.1, and it still fails with the following
error message:
cc1: warnings being treated as errors
src/http/modules/mp4//ngx_http_mp4_module.c: In function
‘ngx_http_mp4_handler’:
src/http/modules/mp4//ngx_http_mp4_module.c:443: warning: comparison
between signed and unsigned
src/http/modules/mp4//ngx_http_mp4_module.c:473: warning: passing
argument 4 of ‘moov_seek’ from incompatible pointer type
make[1]: *** [objs/addon/mp4/ngx_http_mp4_module.o] Error 1
make: *** [build] Error 2
On a Debian Etch 32bits I get the same error message.
On a Debian Etch 64bits it compiles fine and I am now able to stream
mp4 files and jump around in the timeline. However I find that
scrubbing takes a lot of time for the video to start playing from its
new position, do you know where the problem could come from? I saw on
your new video which is the trailer of Pan Labyrinth, the scrubbing is
faster, did you tweak anything in the video? Is it because of the size
of the video? Does Nginx have to go through the whole video to find
the new seekpoint? The latter could be a big problem.
Anyway I am very happy with the module right now, let us know if we
can do anything to help you improve it. Making it compile on a 32bits
could be a nice advantage for developpers who are still on these
systems.
I will find a 32bit machine and try to fix the compile problem.
However I find that
scrubbing takes a lot of time for the video to start playing from its
new position, do you know where the problem could come from? I saw on
your new video which is the trailer of Pan Labyrinth, the scrubbing is
faster, did you tweak anything in the video? Is it because of the size
of the video? Does Nginx have to go through the whole video to find
the new seekpoint? The latter could be a big problem.
I did not tweak anything in the video.
Maybe you can use the test file on
On a Debian Etch 64bits it compiles fine and I am now able to stream
mp4 files and jump around in the timeline. However I find that
scrubbing takes a lot of time for the video to start playing from its
new position, do you know where the problem could come from? I saw on
your new video which is the trailer of Pan Labyrinth, the scrubbing is
faster, did you tweak anything in the video? Is it because of the size
of the video? Does Nginx have to go through the whole video to find
the new seekpoint? The latter could be a big problem.
I have implemented an H.264 pseudo streaming module. And now I want to add cache feature to this module.
Forget it!
I made a silly mistake, after reading docs over and over and now I
realize this is unnecessary.
Using proxy module’s proxy_store directive and some scripts, I can do
everything I want.
No new code should be written.
Nginx is a great product, it has almost every feature I want. I love it.
Thank you Igor.
My situation is that we have some data centers across country, and each data center has some servers to provide video clips to our users. >Because we want to simplify the management of the storage and video files synchronization problem, we maintain only one central storage. >The servers on edge data centers should cache the most visited video clips based on LRU algorithm.
I read the ngx_httpd_proxy_module.c file, and I think it is a good starting point. I know a simplified module capable of this cache >feature should work like this:
Step 1.if the requested file has been found on local disk, return the file
Step 2.if the requested file has not been found on local disk, proxy this request to original server and send the response to user and >save the file to local disk.
I know I can implement Step 1 on ngx_http_proxy_handler function. For Step 2 I know I should create the proxy request on >ngx_http_proxy_create_request function, but I do NOT know on which function I can save the response file to local disk and how. Should I >implement this feature on ngx_http_proxy_finalize_request function? And which data structure contains the returned file data, is it >u->buffering?