I don't understand why would you do that while there is simpler solutions?
(i.e. nginx)

What you are trying to do seems a bit too hackish.

FYI, APE as an internal "tick" implementation which automatically
bufferize each message in order to send them every 50ms in a single JSON
payload (this value is tunable in tick.h though).
Therefore, and because of this, it would result in a framerate limitation
and some unnecessary data copy (and thus performances degradation).

Moreover APE (on the client-side) is doing a POST request eachtime there
is data available (long polling) which is not really efficient in your
case. BTW if you plan to support only HTML 5 client, you can use Websocket
(which is enable on FF4 beta1 to beta7 and some not updated Chrome/Safari
versions).

Nevertheless, if you *really* want to continue in that direction :

- Change this :
https://github.com/APE-Project/APE_Server/blob/master/src/ticks.h#L27 <=
24FPS = ~40ms
- Make sure you are posting on a channel to stream to multiple user (this
will result in memory-copy reduction)
- https://github.com/APE-Project/APE_Server/blob/master/src/main.h#L45 <=
Decrease this value as small as possible to avoid data to stay in memory.

Have fun ;)


On Mon, 28 Feb 2011 07:14:17 -0800 (PST), Marcel Tella
<[email protected]> wrote:
> Hei Johnathan!
> 
> Thank you for the help.
> 
> Well, I'm going to inform you about my whole project.
> 
> I've got some video processed in real time. My goal is to encapsulate
> little chunks of this video in the server with ffmpeg VP8 coder and
> FFmpeg webM muxer. Then, once this little chunks are encoded, the idea
> is to transmit them (i've noticed that i have to codify as base64? to
> stream them with ape).
> 
> Well, not just transmit, I should controll the timestamp of each chunk
> in order to achieve a smooth stream.
> 
> I don't know if it will be possible, but this is the line I'd like to
> follow.
> 
> Then, it will be combining APE, FFmpeg and the video algorythm which
> generate the image.
> 
> But there is no point at encoding and decoding, FFmpeg does, the
> problem is if APE will be able to base64 decode to be reproduced in
> the <video> tag.
> 
> I know that it's not the best explanation. Please if you don't
> understand something, please tell me.
> 
> Thank you very much!
> 
> 
> 
> 
> 
> 
> On 27 feb, 22:57, Johnathan Leppert <[email protected]>
> wrote:
>> It could be possible. Take a look at this (streaming ASCII art video
>> using
>> node.js + HTML5 + canvas):
>>
>> http://www.nonblocking.io/2011/01/streaming-ascii-art-demo-on.html
>>
>> But it probably won't be very efficient. You could try to implement a
>> simple
>> MPEG decoder in javascript, but it probably won't be very fast. For a
>> research project, it might be interesting (but not very practical).
>>
>> For a practical solution, you probably want something more like the
HTML5
>> video tag, and stream an encoded video. This takes advantage of the
>> browser's video codec engine, which is probably implemented in C, and
may
>> even use hardware acceleration to decode and overlay video. To manage
>> seeking on the server, you could write a simple APE module that seeks
>> within
>> a file.
>>
>> See:http://kovyrin.net/2006/10/14/flash-video-flv-streaming-nginx/for a
>> solution using an nginx module.
>>
>> Thanks,
>>
>> Johnathan
>>
>> On Sun, Feb 27, 2011 at 4:13 PM, Marcel Tella <[email protected]>
>> wrote:
>> > Hi! I'm a student of telecommunication from Barcelona.
>>
>> > I'm doing my final thesis and therefore I need to video stream from a
>> > video source (such as a webcam or video given by another program) to
a
>> > webpage.
>>
>> > I was wondering if it's possible with APE, and then, show the video
on
>> > the HTML 5 <video> tag.
>>
>> > I've seen the demo in the web, MMORG I think, and it uses a canvas,
>> > but I don't know if I can do this with html5.
>>
>> > The first try will be to display a video stored in the server to the
>> > web page through APE. and catch it with the <video> tag.
>>
>> > For what I've read, is not difficult with APE I guess, buy I don't
>> > know if it's possible.
>>
>> > You you think it is possible?
>>
>> > Then, the whole streaming purpose is to split the video into small
>> > chunks and display them in a controlled way one by one by a
>> > communication between server and client. This will achieve a smooth
>> > video streaming.
>>
>> > Thank you for your help! I really appreciate it!
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "APE Project" group.
>> > To post to this group, send email to [email protected]
>> > To unsubscribe from this group, send email to
>> > [email protected]
>> > For more options, visit this group at
>> >http://groups.google.com/group/ape-project?hl=en
>> > ---
>> > APE Project (Ajax Push Engine)
>> > Official website :http://www.ape-project.org/
>> > Git Hub :http://github.com/APE-Project/

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to