"Smart Codec" Yes or No?

mark_whocares

Getting comfortable
Joined
Apr 20, 2017
Messages
124
Reaction score
45
If you didn't "tweak" anything on the SS side how did you get it to record the sub streams onto the synology..etc ?

none of the substreams are enabled when i add cameras to SS.
 

Dramus

Pulling my weight
Joined
May 7, 2019
Messages
323
Reaction score
229
Location
New Jersey
I have no idea what you're looking for, but I'm hardly going to wade through God-knows-how-many pages of SS configuration to find and report every last setting change I might have made. Yes, by default, IIRC, SS has everything set to "balanced" and "balanced" is set to the main stream. I made some settings changes regarding which streams are used for High Quality, Balanced, and Low Bandwidth, and then adjusted which of them Live View and Recording were using.

Essentially I set it up so local Live View was at maximum resolution on the main stream and recording/mobile Live View were on maximum resolution for Sub Stream 1. I believe I already noted this. Maybe twice?

I do not understand the point of this line of questioning. This started out as me asking about Dahua's Smart Codec feature. You stated you'd experienced nothing but grief with Syno Live Streams. I replied I had not. I do not now, nor did I before I messed with the camera settings or stream profiles.
 

mark_whocares

Getting comfortable
Joined
Apr 20, 2017
Messages
124
Reaction score
45
You started out by asking about what the downsides of using the smart codec might be.

Dramus said:
are there any downsides to using Smart Codec? The firmware automatically adjusting iframe rate to "intelligently" optimize performance seems like a good idea.
then you said you sub stream wasn't recording, but then that post got modified.


Dramus said:
When I brought up Live View on the Synology SS the two cameras set for Smart Codec would take 2-3 seconds before video would appear. Without Smart Codec enabled they're instantaneous. Bandwidth-savings-wise, Smart Codec wasn't really doing anything for me, anyway.

-regarding the delay before video would appear: yes with the smart codec on, you can have "long" periods without a keyframe, without this frame the stream won't start on a mobile device. (see syno quote below)

of course if you have the camera set to smart codec and the Syno SS set with smart codec off, things can get wonky. but you don't seem to feel the need to confirm such things.


of course if the smart codec setting on the main stream is applying a smart codec on any sub streams i'm not confident on.


Syno's verbiage on the matter of smart codec, you might note the parts that I have added emphasis to.

Surveillance Station - Knowledge Base | Synology Inc.

synology said:
Most video formats use keyframe compression to significantly reduce bandwidth and storage requirements. This compression method is based on the number of seconds or frames required to send out one complete image, also known as a keyframe or I-frame. This keyframe compression technology can be used to restore video streams from different points of time. If a keyframe is missing, then the video stream from that specific time cannot be restored. Video stream recording will not start until Surveillance Station receives the first keyframe.

Smart video codecs (H.264+/H.265+) or video format optimization requires longer intervals when sending keyframes in order to reduce the amount of data that needs to be transmitted, improve the stream compression ratio, and minimize bandwidth and storage consumption. However, longer keyframe intervals implies that Surveillance Station may need a longer wait time before the recording starts, thereby resulting in unable to pre-record triggered videos at the specified time or longer intervals between two continuous recording files.
so YES , there are potential downsides/issues to be aware of when using smart codec - again - I don't know if you are setting smart codec only on the camera side or if you have also set it on the Syno SS side at the same time. you asked about smart codec yes vs no. maybe this is all the information you need to make that decision for yourself.


so now
Dramus said:
This started out as me asking about Dahua's Smart Codec feature.
yes, it did , but there are a number of factors at play here.

I was trying to tell you to go into the "God-knows-how-many pages of SS configuration" go to the camera config on the SS, and verify that everything matches what you have set on the camera before you decide that what you were seeing with the pixelation and delay was solely due to smart codec and maybe not a mis matched config.
 

Dramus

Pulling my weight
Joined
May 7, 2019
Messages
323
Reaction score
229
Location
New Jersey
You started out by asking about what the downsides of using the smart codec might be.

then you said you sub stream wasn't recording, but then that post got modified.
Yeah, the original text contained a typo I corrected as soon as I noticed it.

of course if you have the camera set to smart codec and the Syno SS set with smart codec off, things can get wonky. but you don't seem to feel the need to confirm such things.
Nowhere in any of the Syno SS configuration have I found a "Smart Codec" setting. In fact the settings that are there don't even mention H.264+.

I was trying to tell you to go into the "God-knows-how-many pages of SS configuration" go to the camera config on the SS, and verify that everything matches what you have set on the camera ...
Ah, ok. Now I understand what you're looking for.

Near as I've been able to ascertain, many of the configuration options don't actually change anything on the Syno SS side, but cause it to effect changes on the cameras. This certainly appears to be true of everything under the Video and Advanced tabs under Edit Camera -> Device Settings.

And, in fact, whatever Synology's doing doesn't even result in a 1-to-1 correspondence on the camera. E.g.: If I set the Image Quality to 5 (Highest) in Syno SS, it gets set to 6 on the camera. I've got the Video Format set to H.264 in Syno SS, but it's set to H.264+ on the cameras, and everything seems fat, dumb and happy.

And, as I noted, there is no Smart Codec setting anywhere in the Syno SS config I've found. (Though this would not be the first time I've missed something that's right in front of my eyes.)
 

mark_whocares

Getting comfortable
Joined
Apr 20, 2017
Messages
124
Reaction score
45
Are you seeing a option for Smart Stream?
or "customize codec optimization ON|OFF"



If I set the Image Quality to 5 (Highest) in Syno SS, it gets set to 6 on the camera

thats pretty interesting to me. I've never had SS reconfigure my cameras to any setting. they usually just either stream garbage images or they fail to "active" after you change something on the SynoSS side, the camera always stays to what I left it at.
 
Last edited:

Dramus

Pulling my weight
Joined
May 7, 2019
Messages
323
Reaction score
229
Location
New Jersey
Are you seeing a option for Smart Stream?
or "customize codec optimization ON|OFF"
Nope and nope. Under Edit Camera -> Device Settings -> Advanced there is Codec Optimization -> Customize keyframe interval (frame), but that's it.

thats pretty interesting to me. I've never had SS reconfigure my cameras to any setting. they usually just either stream garbage images or they fail to "active" after you change something on the SynoSS side, the camera always stays to what I left it at.
Not here. SS reconfigures both my Dahua cameras and the one Reolink. In fact, IIRC: If I'm logged directly into one of my Dahua cams and change something that causes SS to reconfigure it, I'll be logged off the camera.

Interesting we're having such wildly different experiences with Syno SS.
 

mark_whocares

Getting comfortable
Joined
Apr 20, 2017
Messages
124
Reaction score
45
I am really confused now that we are seeing such different things.

are you DSM 6.2.2-24922, SS 8.2.4-5847, device pack 5.7.3-2740 ?
 

Dramus

Pulling my weight
Joined
May 7, 2019
Messages
323
Reaction score
229
Location
New Jersey
DSM 6.2.2-24922, SS 8.2.4-5847, DP 5.7.4-2774

I had an SS update a couple days ago. I don't know what SS and DP versions I had before that. I've noticed no changes in device configuration since that update, though.
 

KCO

Young grasshopper
Joined
Dec 28, 2019
Messages
30
Reaction score
10
Location
Santiago
And if we add the variant of ROI to the entire screen to everything discussed. :nervous:
 

Dingy

n3wb
Joined
Jun 16, 2020
Messages
2
Reaction score
2
Location
Amsterdam
Only if I turn it back on and do a screen video capture. The recorded video from motion events is from sub-stream ##1. I'll give it a go.

ETA: Hmmm... Seems disinclined to repeat the performance... I'll keep checking.

ETA2: Gave up and disabled Smart Codec on the two cameras upon which I was testing it. Besides the possibility of a repetition of the pixelation: When I brought up Live View on the Synology SS the two cameras set for Smart Codec would take 2-3 seconds before video would appear. Without Smart Codec enabled they're instantaneous. Bandwidth-savings-wise, Smart Codec wasn't really doing anything for me, anyway. I've got the network bandwidth, processing and disk to handle the five camera streams I have, with plenty left over. And, since, due to a limitation in Surveillance Station, I'm using sub-stream 1 for recording: No help for mobile device performance, either.
First excuse for replying to an older post.
Second, thank you for bringing this up.
After finally saying SS goodbye with buggy motion detection in trade of Frigate with a Coral USB excellent object recognition, I could not find why these 2 Dahua cams would give errors or black screen for the Main recording stream, while the sub stream is used for detection was working fine.
Setting smart codec to off immediately solved the problem. it is very easy to check the difference. Alternating copy the 2 streams(main and sub) in a VLC - Open network stream.
Substream: rtsp:/user:password@ip:554/cam/realmonitor?channel=1&subtype=1
mainstream: rtsp:/user:password@ip:554/cam/realmonitor?channel=1&subtype=0
It takes some seconds for the video to show up with Smart codec on, while without smart codes it is just milliseconds.
So smart codec might save you bandwidth, but not suitable when you want to quickly switch/connect to a stream.
 
Top