Thanks for the quick answer!
I already have a way of generating animations, i.e. I could take the output
of my graphics code and generate 00.png, 01.png ... n.png and later
concatenate that together into a video, but I think that's wasteful if the
objective is to serve RTMP/HTTP on the fly. The pipeline would look like:
rasterizer ---disk (PNG? JPG? BMP?)---> ffmpeg ---HTTP---> browser
I read somewhere that you can use ffmpeg with an image2pipe parameter to
bypass persisting the data to disk.
But I'd like it the whole process to look more like:
rasterizer -----raw buffer---> encoder (MTL? ffmpeg?)---HTTP---> browser
The wasteful thing of running to ffmpeg through a pipe is that I'd need to
encode the frames to, say, PNG, ffmpeg would then unwrap that to raw data
and re-encode, right? So one wrap/unwrap step for no reason. Maybe I could
serve BMP to ffmpeg.... In any case It would be nice if I could link my
code with a library like MTL so I wouldn't have to coordinate two processes
and link them with a pipe.
On Fri, Dec 4, 2015 at 8:41 PM Dan Dennedy <d...@dennedy.org> wrote:
> On Fri, Dec 4, 2015 at 6:59 PM Emmanuel Oga <emmanuel...@gmail.com> wrote:
>
>> Hello,
>>
>> I'm investigating creating video on the fly but I have no experience
>> producing video and I found about MLT by googling.
>>
>> Say I have some means to write to a bitmap surface, for instance using
>> cairo to write text or geometric primitives to it. I'd like to take that
>> surface and stream it on the fly through HTTP so it can be viewed with
>> using a browser's <VIDEO> tag.
>>
>> * Is MLT well suited for doing something like that?
>>
>
> Maybe the only thing that MLT has right now that supports like drawing on
> a canvas is WebVfx:
> http://www.mltframework.org/bin/view/MLT/WebVfx
> Otherwise, you can make a new producer. But, HTML5 css, canvas, svg,
> webgl, and javascript do go a long way.
> Yes, you can encode and stream that real-time, but do not rely upon any
> CSS3 animation and stick to JavaScript.
>
>
>> * If no, any suggestion on how to tackle this task?
>> * If yes, would this be a CPU and/or memory demanding task? (i.e., can I
>> expect to get good performance with such task when creating more than one
>> stream at the same time with a reasonably fast computer).
>>
>>
> Yes, absolutely! Any live encoding is going to be demanding. If the stream
> is personalize per user (they each get their own canvas), then you need to
> plan for a computer per user. The other thing you need to think about is
> how to even do live streaming with the <video> element, which is not very
> common and implemented uniformly. Most momentum is around MPEG-DASH using
> dash.js and Media Streaming Extensions, but you might also need HLS for
> Apple devices including desktop Safari. And you need to think about having
> a Flash fallback and multiple bitrates. If all users see the same stream,
> you might want to send a single live stream via RTMP to a video platform
> provider such a zencoder or YouTube, and let them handle it.
>
>
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel