[FFmpeg-user] feeding frames to ffmpeg manually?

Stefano Sabatini stefasab at gmail.com
Fri Jan 27 23:45:23 CET 2012


On date Friday 2012-01-27 22:13:19 +0100, Csillag Kristof encoded:
> 2012-01-27 21:58 keltezéssel, Carl Eugen Hoyos írta:
> >Csillag Kristof<csillag.kristof<at>  gmail.com>  writes:
> >
> >>I am interested in using ffmpeg in a very non-standard way.
> >>
> >>There is an application that is currently displaying images to an X11
> >>display.
> >You do know that x11 is a possible input format for ffmpeg?
> If you mean the x11grab backend, then yes.
> 
> I could probably use (I am not sure whether I could properly
> synchronize that, though),
> but this process (application -> x11 -> ffmpeg) would involve an
> unnecessary stage;
> the (virtual) X display. I would like to omit that, to reach better
> throughput, lower latencies and more easy synchronization of the
> frames.

You may use the cache protocol (libavformat/cache.c) and use a fd for
pushing data from your application to ffmpeg/libav*.

Otherwise you could write a custom input device for acquiring directly
from the application using some IPC mechanism.
-- 
ffmpeg-user random tip #12
One minute of video noise with ffmpeg:
ffmpeg -t 60 -s qcif -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/urandom \
    -y noise.mpeg


More information about the ffmpeg-user mailing list