[FFmpeg-user] named pipes ffmpeg

Roger Pack rogerdpack2 at gmail.com
Wed May 4 15:08:07 CEST 2016


https://trac.ffmpeg.org/ticket/986 appears to be the "canonical" named
pipe page, besides that I've never tried it, sorry.

On 5/3/16, Robin Stevens <robin at seascape.nl> wrote:
> I tried pipes in different formats/syntaxis.
>
> Previously I used the multipurpose-encoder from Datastead to setup a
> rtsp-stream. After some tests it became clear that this software is piping
> video into ffmpeg. So I looked at the console log of ffmpeg from the
> multipurpose-encoder and there was listed that ffmpeg gets his stream from
> "\\.\pipe\7EB76D4B9CD3464C93908CCB9E3CE1CF".
>
> So I closed the ffmpeg executable that was executed from the
> multipurpose-encoder and tried to connect with the same build/executable to
> that pipe. The only thing I get was the error message "Invalid argument".
> Then I tried to instantiate my own named pipe in windows with the same
> syntax as Datastead is doing that. Like "\\.\pipe\tmp_pipe1".
>
> When I tried to open the pipe with ffplay I get the following message:
> "pipe:\\.\pipe\tmp_pipe1: Cannot allocate memory"
>
> When I tried to open the pipe with ffmpeg I get the following message:
> "[IMGUTILS @ 005af780] Picture size 0x0 is invalid
> pipe:\\.\pipe\tmp_pipe1: Invalid argument"
>
> When I try to write to the pipe with ffmpeg, it prints the console with a
> bunch of data and after a few seconds it isn't responding anymore.
>
> I know the "pipe" protocol is compiled with this version of ffmpeg and while
> the software of Datastead is executing ffmpeg with a named pipe as input
> parameter it seems that is has to work.
>
> Do I need a different kind of pipe here? Or do have to add protocol
> parameters to write to this pipe? Does anyone experience with named pipes?
>
> Kind regards,
>
> Robin
>
> -----Oorspronkelijk bericht-----
> Van: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] Namens Roger Pack
> Verzonden: dinsdag 3 mei 2016 3:43
> Aan: FFmpeg user questions <ffmpeg-user at ffmpeg.org>
> Onderwerp: Re: [FFmpeg-user] named pipes ffmpeg
>
> On 4/29/16, Robin Stevens <robin at seascape.nl> wrote:
>> I am having trouble to get ffmpeg write to a named pipe in windows. I
>> know it's possible to write to a anonymous pipe with the command:
>>
>> ffmpeg.exe -vsync passthrough -f dshow -i video="AVerMedia SD 1
>> Capture":audio="AVerMedia SD Audio Cap 1 (AVerM" -vcodec rawvideo -f
>> matroska -
>>
>> And I can read the pipe with ffplay.exe -i -
>>
>> But is it possible to write to a named pipe?
>>
>> I tried to by creating a named pipe with the following c# code:
>>
>> NamedPipeServerStream p_from_ffmpeg = new
>> NamedPipeServerStream("tmp_pipe1",
>>                 PipeDirection.In,
>>                 1,
>>                 PipeTransmissionMode.Byte,
>>                 PipeOptions.WriteThrough,
>>                 1000, 1000);
>>
>> I checked if the pipe really exist with the pipelist.exe from
>> https://technet.microsoft.com/en-us/sysinternals/dd581625.aspx.
>>
>> Then I tried to write the output data from ffmpeg to the pipe by using
>> the following command:
>>
>> ffmpeg.exe -vsync passthrough -f dshow -i video="AVerMedia SD 1
>> Capture":audio="AVerMedia SD Audio Cap 1 (AVerM" -vcodec rawvideo -f
>> matroska tmp_pipe1
>>
>> and the following:
>>
>> ffmpeg.exe -vsync passthrough -f dshow -i video="AVerMedia SD 1
>> Capture":audio="AVerMedia SD Audio Cap 1 (AVerM" -vcodec rawvideo -f
>> matroska pipe:1 > tmp_pipe1
>>
>> Both commands are adding a file named "tmp_pipe1" to the directory of
>> the ffmpeg executable while the anonymous pipe isn't adding a file and
>> is working perfectly for me. The only problem is that I would like to
>> deinterlace, record with a codec and render/view more than one
>> channel. So I thought to run one instance of ffmpeg and pipe the
>> outputs to multiple instances of ffplay. I don't know whether it's
>> possible to write the output of ffmpeg to a named pipe in windows. Does
>> someone has an answer?
>
> I think you have to name it something like \\pipe_name or some odd...
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email ffmpeg-user-request at ffmpeg.org
> with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list