Redirect FFMPEG's output to multiple named pipes on Windows

大兔子大兔子 提交于 2020-01-04 02:16:15

问题


I am trying to stream video and audio data into two separate named pipes on Windows.

ffmpeg.exe -f dshow -i video="My camera name":audio="My microphone name" -map 0:1 -ac 1 -f f32le \\.\pipe\audioStream -map 0:0 -f mjpeg \\.\pipe\videoStream

The problem is that FFMPEG does not seem to understand that the outputs \\.\pipe\audioStream and \\.\pipe\videoStream are pipes and treats them like files.

  1. If the pipes are already created when the FFMPEG starts, it wants to overwrite them and fails.
  2. Otherwise, it complains that the path does not exist and fails.

As far as I understand, specifying the pipe: protocol should do the trick, but I can't figure out how to use it properly, even with a single pipe. I have tried:

  1. pipe:pipeName
  2. pipe:pipe\pipeName
  3. pipe:\\.\pipe\pipeName
  4. pipe://pipeName
  5. pipe://pipe\pipeName
  6. pipe://\\.\pipe\pipeName

I always end up with the same result: the output is written to the console and not to the pipe. If the pipe already exists when the FFMPEG starts, nothing connects to the pipe.

Is it possible to use FFMPEG with named pipes on Windows? If yes, what is the proper way to do this?

来源:https://stackoverflow.com/questions/37548606/redirect-ffmpegs-output-to-multiple-named-pipes-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!