video 'shifts' during playback

marklyn

Pulling my weight
Jun 13, 2015
470
108
All of my cameras on BI, during playback or even live watching, will momentarily "shift" during live viewing or playback of clips. I've checked and rechecked video settings in BI for each camera to make sure the settings closely match what each camera settings are set to but have not been able to figure it out.
Two oddities I've notice during diagnosing:
1) if I export the camera's clip as an avi, it plays back with no "shift"
2) if I view the camera live with the camera's firmware (direct) there is never any shifting.
3) the video 'shifting' only occurs during viewing of BI console and UI3 viewing.

Would appreciate any suggestions as to what settings I need to check in BI to fix this.
 
All of my cameras on BI, during playback or even live watching, will momentarily "shift" during live viewing or playback of clips. I've checked and rechecked video settings in BI for each camera to make sure the settings closely match what each camera settings are set to but have not been able to figure it out.
Two oddities I've notice during diagnosing:
1) if I export the camera's clip as an avi, it plays back with no "shift"
2) if I view the camera live with the camera's firmware (direct) there is never any shifting.
3) the video 'shifting' only occurs during viewing of BI console and UI3 viewing.

Would appreciate any suggestions as to what settings I need to check in BI to fix this.
You will need to post a sample
 
not sure what you mean by 'shift'... can you post a sample image or video that shows it?
 
That's the thing, I can't post a single snapshot of it. The shifts are so 'momentarily' and it's hard to describe in words what is a very obvious shift. That is why I tried to export the video as an avi but it played perfectly, no shifting, and since there is no shifting on the camera's firmware view pages, I assume it is something in BI that is causing this. I do have a 10 second BVR file I uploaded to onedrive, if someone could download that and look at it, I expect it would show up there (I can't since I'm using UI3 and won't be home for 2 more weeks). Anyway, here is the link to the BVR file (60mb), if that doesn't work I'll try to think of some other way to catch this so you can see. Dahua_West_PTZ 2019-4-13 12.59.55 PM.bvr
 
hm. i don't see anything odd in that rather static video. can you describe what you mean by 'shift'? the image moves? or it skips frames? or moving objects are leaving ghost trails? or the colors change? what?...
 
Are you referring to the shift in colors/brightness and the appearance of discrete shadows?
Just looks like the sun came out from behind a cloud, to me...
 
no, not that at all. This is a regular shift in the entire video, regular recurrence. The screen video capture I just linked up was through my UI3 connection (DSL connection in a vacation condo) so the resolution was dropped. I'm going to find a better video representation with higher resolution and I think what I'm trying to describe would be more obvious.
 
or maybe you mean the apparent change in video on each keyframe? This is normal.
what camera is this? what the cam's frame rate and I-frame interval set to? bitrate?

eg, if you are running 15 fps and have an iframe interval of 30, you'll see the image
appear get 'sharper' every 2 seconds...

This can be minimized by using more frequent iframes, at least one per second, and make sure
the bitrate is high enough for your fps and resolution...
 
Last edited:
setting1.PNG

It is a Dahua 42212TNI camera
 
the video 'shifting' only occurs during viewing of BI console and UI3 viewing.

BI is re-encoding the stream for display thru the web interface. there are settings in options/web server'/advanced/configure, but will affect bandwidth usage...
 
I'm going to table this until I get home and in my own network environment. I just had a bit of time to kill and thought I'd look into this while I had a couple hours downtime but it makes more sense for me to do this at home. Thanks for your input though!
 
BI is re-encoding the stream for display thru the web interface. there are settings in options/web server'/advanced/configure, but will affect bandwidth usage...
I looked at those settings too and played a bit with them but no changes... I'll look at this more closely when I'm at home, but thanks for your help.
 
so you've got a full image refresh every 2 seconds, and that's what you're seeing as 'shift'

you don't need 25 fps, 15 is usually plenty. try 15fps and 15 i-frame interval. or even 5 i-frame interval.

BI's encoding for the web stream is probably just exaggerating the effect...
 
so you've got a full image refresh every 2 seconds, and that's what you're seeing as 'shift'

you don't need 25 fps, 15 is usually plenty. try 15fps and 15 i-frame interval. or even 5 i-frame interval.

BI's encoding for the web stream is probably just exaggerating the effect...
I'll try that for now but will also look at this closely when I get home. I think I have all of my cams set to a high frame rate... was always under the understanding that if you have the local network bandwidth, go higher and the i-frame interval should be set to 1/2 of the frame rate... or so I've read here and there anyway :)
 
higher i-frame intervals do space out the 'shifts' further apart, but I'd argue that they also make them bigger,
thus a smaller i-frame interval (full frames more often) will reduce the jarring effect by having less to 'catch up' with at each i-frame.

yet bp's recommendation is for higher i-frame intervals. not sure i buy that...
 
  • Like
Reactions: marklyn
@pozzello

Whenever I've seen this effect, the quality "returns to normal" very quickly after each i-frame. So quickly that even very low keyframe intervals like 5 or even 2 have a jarring effect. While it may be a lesser effect with a ridiculously low keyframe interval, the quality suffers so much from having it set this low that it doesn't really matter anymore because the visual artifacts are bad unless your bit rate limit is sky-high.

This issue typically happens when an encoder is tuned to strictly adhere to a bit rate limit. The encoder won't be allowed to create huge i-frames, as those would cause big bit rate spikes (which would make it harder to stream smoothly with very low latency).

This is easy to demonstrate using Blue Iris. I can configure a streaming profile with a bit rate limit that is low enough to be restrictive at the chosen quality level, and presto, each i-frame causes a temporary loss of quality. Lower iframe intervals make the pulsing effect happen more often, but do not make it more subtle. This is a big reason why Blue Iris's default i-frame interval for streaming is 300 frames.

Now presumably most cameras aren't tuned to adhere to a bit rate limit as strictly as Blue Iris is. They should be allowed to make large keyframes and just expect the client to buffer ahead to be able to stream smoothly.