How is recording of stream achieved?

Surveillance Station, Surveillance Station Pro, & IP cameras
User avatar
dynek
Experience counts
Posts: 1470
Joined: Wed Sep 22, 2010 4:58 pm
Location: Peney/Vuiteboeuf, Switzerland

How is recording of stream achieved?

Postby dynek » Sat Jul 15, 2017 1:53 am

Hello,

Thought I would be posting that question as it's a customer forum, not a selling platform :-)
Anybody knows how recording of stream is achieved with Surveillance Station / nvrd?

I am graphing lots of things using Telegraf and even when Surveillance Station is recording stream from a 2M Foscam camera and streaming to QVR Client, CPU remains quite unused.
Then I stopped using Surveillance Station for many different reasons and was trying to record a stream using ffmpeg but it's like eating one full CPU per camera stream.
Is there a hardware acceleration available through CPU / GPU on a TVS-463 for instance?

I do see /dev/dri/renderD128 and i highly suspect VAAPI is being used by Surveillance Station to achieve such a good performance.
Thing is there's no way to make it available in Virtualization Station / qemu apparently :-(

Any help / hint will be much appreciated :-)

Cheers

AlastairStevenson
Experience counts
Posts: 1748
Joined: Wed Jan 08, 2014 10:34 pm

Re: How is recording of stream achieved?

Postby AlastairStevenson » Sat Jul 15, 2017 5:36 pm

Anybody knows how recording of stream is achieved with Surveillance Station / nvrd?

It's doing little more than taking in the video frames over RTSP, tweaking the header slightly, and feeding it straight to disc.
So no complex video manipulation, just network/HDD I/O activity.

trying to record a stream using ffmpeg but it's like eating one full CPU per camera stream.

Were you attempting (even inadvertently) any video transcoding in what you asked ffmpeg to do?
TS-431+ as primary storage and media server and a bunch of IP cams under Surveillance Station.

User avatar
dynek
Experience counts
Posts: 1470
Joined: Wed Sep 22, 2010 4:58 pm
Location: Peney/Vuiteboeuf, Switzerland

Re: How is recording of stream achieved?

Postby dynek » Sat Jul 15, 2017 6:25 pm

Hello,

I'm trying to achieve the same performance as Surveillance Station (close to 0 cpu usage when reading stream).
I tried reading an RTSP stream from a Foscam (removed the outputing part) with:

ffmpeg -rtsp_transport tcp -i rtsp://user:pass@ip:88/videoMain -update 1 -r 1 /dev/shm/streams/2Df5hBE/o02hBtiiTO/s.jpg -y

I tried it from within Linux Station and CPU consumption is identical "naked" or with an additional -hwaccel vaapi -vaapi_device /dev/dri/renderD128 - it doesn't change cpu consumption :roll:

It's using 60% of a CPU - I should maybe reinstall Surveillance Station to give it another try and see how much CPU it uses but I guess it was even less than that :'

Thank you for your answer

User avatar
dynek
Experience counts
Posts: 1470
Joined: Wed Sep 22, 2010 4:58 pm
Location: Peney/Vuiteboeuf, Switzerland

Re: How is recording of stream achieved?

Postby dynek » Mon Jul 17, 2017 3:24 pm

Tried Surveillance Station / nvr(d) once again and CPU consumption for the very same stream is around 3%.

Really wondering what's the magic behind it.

[edit]
OK well not too complicated in the end for the decoding part - use "vcodec copy" and a container that matches stream's format.


Return to “Surveillance Station”

Who is online

Users browsing this forum: No registered users and 5 guests