views:

1234

answers:

2

Hi guys,

I have a C# program that creates a video and saves it to the disk in real-time. Instead of doing that, I want it to write it directly in a pipe connected with ffmpeg...

The function that keeps saving the video in the disk, which I can not control, receives an IntPtr with a reference to the file.

So, I need to create a pipe or something like that with ffmpeg, get a pointer to that, and use that pointer in the function, so that it streams the file to ffmpeg and not the disk...

Regards, John Oliver

A: 

3.5 added support for named and anonymous pipes but I'm not sure how you'd synchronize access if you can't control the file that saves to disk...

Arnshea
A: 

It might be worth your while to look into the API for the library that ffmpeg is built on.

Can you specify what file is written to? It might be possible to sneak in an in-memory file, which you could then steal and do what you like with it.

teeks99