runOnDemand - Pipe command outputs #2944
Replies: 2 comments
-
|
Hello, you can use bash commands and pipes in paths:
mypath:
runOnDemand: bash -c 'python main.py | ffmpeg -i pipe:0' |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This discussion is being locked automatically because the last update was more than 2 years ago. Do not use the content of this discussion as reference since it's probably outdated! The official documentation is the only place in which you can find up-to-date answers. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Server version:
I have a scenario where I need to pre-process a stream of bytes before they are passed to ffmpeg. Ordinarily I'd do the following to take the output of a pre-processor and feed it to ffmpeg:
python main.py | ffmpeg -i pipe:0In this case the main.py pre-processor is writing to stdout and when run in a normal shell this works perfectly. Running a similar command directly or wrapped in a bash script as part of the mediamtx
runOnDemandconfig items results in mediamtx capturing the stdout frommain.pyand logging it rather than sending onward to ffmpeg.Does anyone know of a way to use stdin/stdout in a
runOnDemandconfig entry?Beta Was this translation helpful? Give feedback.
All reactions