runOnDemand - Pipe command outputs #2944
Unanswered
davidtaddei
asked this question in
Questions
Replies: 1 comment
-
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:0
In 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
runOnDemand
config items results in mediamtx capturing the stdout frommain.py
and logging it rather than sending onward to ffmpeg.Does anyone know of a way to use stdin/stdout in a
runOnDemand
config entry?Beta Was this translation helpful? Give feedback.
All reactions