Reputation: 11
We have a cron job running on a Raspberry Pi set to record an h264 stream from an Axis M3026 camera. The job runs at various intervals and will record a 15 second video about 4 times an hour throughout the day.
avconv -rtsp_transport tcp -i rtsp://root:[email protected]/axis-media/media.amp -t 15 -an -f mp4 -vcodec copy -y /home/pi/Vid-0159.mp4
On startup, the job works fine. It records the first 7-10 clips, but then the Axis becomes unresponsive and it skips a job. Typically when the next request is made, the Axis is back online and streaming continues for another few jobs.
Looking through the camera logs, it appears that after the 15 recording duration is completed, the Axis camera isn't tearing down the RTSP stream.
We've opened a case with Axis support, who have been less than helpful. Their suggestion was to set the recording parameters on the camera (set the duration and time interval on the camera itself). We don't want to have to pre-configure every camera and adjust to every new Axis software release.
If we swap out the Axis with a Samsung camera, the above command works perfectly continuously without issue.
Any suggestions on how we can get the avconv to properly teardown the stream?
-- Chuck
Upvotes: 1
Views: 2274