Capture video stream to disk #193
-
Hi, I am trying to find a way to capture the video stream from my Axis camera to disk. The requirement is that a remote event will call a web service end point, that will then start to capture the video from the IP camera for 1 minute, or we can stop the recording via another web call if needed. As it's a web service there is no requirement to view/show the video, just to record the video to disk for later review. I have found some sample code (c#) that records a BIN file, but thats not much use as I need a video format(MP4, etc) that will work on browsers etc on Macs, PC etc. Does anybody have a link to some sample c# code that would do this ? Thanks in advance... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Actually you don't need axis sdk for that. Just use any library or framework capable of getting rtsp streams and saving the h264 into an mp4. Using python is straightforward, check with your language of choice for available libraries (C#) |
Beta Was this translation helpful? Give feedback.
Also, you could also use vapix web services to launch a one minute recording in the camera (to a local sd or lan disk) using edge storage api https://www.axis.com/vapix-library/subjects/t10175981/section/t10004596/display?section=t10004596-t10004656
and then ask for a mkv file using https://www.axis.com/vapix-library/subjects/t10175981/section/t10004596/display?section=t10004596-t10047558
Of course, you still need an mp4 and for that you can just launch an ffmpeg without transxoding (1min video will be converted in less than a sec)
Then, please check if your current solution (the one generating a binary file) can be also converted into mp4 as I suppose is just the h264 stream from rtsp. Y…