Powershell: Piping ffmpeg | ffplay (/s --% and ^)

preview_player
Показать описание
Trick to pipe a command from a Powershell script (or from a PS command prompt) when it doesn't work as expected (these are rare cases probably). In this case, I need to pipe ffmpeg to ffplay.

1. Send the whole command with pipe (|) to CMD.exe using "CMD /S /C --%"
2. Wrap whole thing in double quotes (the /S will strip them when piping)
3. Use a caret (^) in front of any double-quotes within the ffmpeg arguments, around -filter_complex, for example.

EXAMPLE: WILL WORK IN CMD BUT NOT PS:v

This WILL work in PS:

Рекомендации по теме