[FFmpeg-user] Encoding a stream of base64 image strings into video

Yotam Laufer y at utab.com
Tue Jul 14 13:53:10 CEST 2015


Hi Carl,

The host I’m using is called nw.js (node-webkit). I use it to render a video from a browser based renderer. I didn’t write the host, but from reading the source code it’s a node js wrapper that communicates with a C++ executable. From what I can see the interprocess messaging system works with strings, hence the base64 encoding. Which is actually doubly slow, capture a screen, encode to base64, send to host, decode back to binary and send to ffmpeg. 

The example I included for rasterizing a base64 datauri is taken from the documentation and uses GIF, running it on the command line will generate an image, so I’m guessing some support is there. I use PNGs if it matters.

Following your answer, these questions arise:

Is base64-over-pipe not supported at all?
What are my options apart from decoding base64 to binary in the host, which is very slow?
Is there a way to have ffmpeg read directly from the host and have a verbose signal to control frame changes?

Best regards,
Yotam Laufer



On Jul 14, 2015, at 14:37, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

Yotam Laufer <y <at> utab.com> writes:

> The host that captures the images returns them as a 
> base64 string,

Why?

I mean: I suspect this is not the internal representation 
of the image inside the host and it is likely that FFmpeg 
can read the internal representation.

There is no gif parser (ticket #1347), so pipe-lining gifs 
will not work atm, even if we supported base64-over-pipe.

Carl Eugen

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list