I have had some raw h264 video finally playing at the correct frame rate,
etc. However, in using ffmpeg to pipe it to myTestOnDemandRTSPServer I
find that ffmpeg runs out of buffer space before long and so I can only get
15 seconds of video at a time. If I run ffmpeg on its own creating a file
on the disk, then it can run without buffer overrun errors. Equally, if I
run myTestOnDemandRTSPServer from a file then it can play it without
issue. It seems to be the combination of the two that causes the problem.
So is there something that can be optimised with using pipes? Or would it
be better to change the input of myTestOnDemandRTSPServer to use a UDP
source for the stream?
On 9/10/2020 1:28 AM, Simon Brown wrote:
> Equally, if I
> run myTestOnDemandRTSPServer from a file then it can play it without
> issue. It seems to be the combination of the two that causes the problem.
Are you sure that the server is actually reading from the pipe? That is-
cat myfile | ./myTestOnDemandRTSPServer
is myTestOnDemandRTSPServer a script or an executable?
does it read from stdin?
is myTestOnDemandRTSPServer silently crashing when it connects to the pipe?
is it expecting the same format as the other device produces?
(it's not clear how you've tried things or which OS you're using.... the
command output is always wanted here, as is using the most recent build)
*nix pipes should should have very little latency, so if you manage to stuff
15 seconds of video into one it's probably not being emptied
You can exercise the pipe mechanism itself with
ffmpeg -i udp://:61120 -c:v copy -an -f h264 pipe:1 | cat - >/dev/null
That should run basically forever.