Open xloem opened 6 years ago
You might want to try adding a queue to the pipeline and seeing if anything changes. I've noticed that pipelines without a queue can be iffy, adding a queue will decouple the input and the output.
I tried just throwing 'queue' in different spots with no options, but it didn't help. I tried running under gdb and the error occurs much more rapidly; it seems to do with latency. I ended up fixing it by changing the codec to x-raw and adding omxh264enc, but the cpu usage was too high for me, so I've switched back to plain raspicamvid for now.
It could have something to do with whatever is consuming the data from the fdsink. Where is the data going from there? You may want to try setting sync=off on the fdsink.
Alternatively, if you think the problem is with rpicamsrc you could try piping raspivid into gstreamer, but the CPU usage is slightly higher than normal.
Something like this (going from memory):
/usr/bin/raspivid -w 1296 -h 972 -i record -fps 42 -t 0 -o - | /usr/bin/gst-launch-1.0 fdsrc ! queue ! h264parse ! matroskamux ! fdsink
Take a look at commit 4e5729 and perhaps try expanding that timeout further from 500ms
I had the exact same issue. I fixed it by setting the timeout as 1000ms and now it works swimmingly.
Every time I run my pipeline, it goes for a while, and then eventually crashes with, "streaming stopped, reason error (-5)". I've seen this error mentioned in closed issues, but the general consensus seems to be that this is a startup timeout issue, which it is not for me. Streaming runs for many minutes before eventually crashing.
I ran this pipeline:
gst-launch-1.0 --quiet rpicamsrc preview=false annotation-mode=$((0x40c)) annotation-text-size=16 ! video/x-h264,width=1296,height=972,framerate=42/1 ! h264parse ! matroskamux ! fdsink
It ran fine for 6.5 minutes, then suddenly gave this: