Seeking help with substream settings for Foscam FI9831W camera

General discussion about Blue Iris
User avatar
TimG
Posts: 2098
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Seeking help with substream settings for Foscam FI9831W camera

Post by TimG »

1. For the sub-stream in the Foscam camera menu, change "HD Mode" to something else in case it inflates the resolution.
2. Port :88 was for a specific IP address. You can have many cameras with port :88 on different IP addresses.
3. Match the frame rates for both streams.

Pogo: I think this is mainly an intellectual exercise now to prove it can do dual streams, but I do use 640x480 here as my sub-streams for CPAI. Early on it used to shrink images, and it was thought that it was to 640x480. All sending a larger image did was incur a delay as CPAI resized it. That may now be a load of bunkum :lol:
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
User avatar
Pogo
Posts: 396
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Seeking help with substream settings for Foscam FI9831W camera

Post by Pogo »

We know it does dual streams.

And..., more pixels = better image with greater detail to do things with..., like fine tuning a difficult to dial in trigger or determining the difference between a cat and a dog, or an elephant and a bus.

Mileage obviously various by the user skillset and level of understanding of how a given system actually does work, not how one would intellectually surmise it should. ;)
User avatar
Sardon
Posts: 114
Joined: Sun Nov 19, 2023 10:50 am

Re: Seeking help with substream settings for Foscam FI9831W camera

Post by Sardon »

Before I proceed with any changes, I must mention that I'm unsure if this is related to my recent adjustment of the bitrate from 2M to 4M, but I'm experiencing screen tearing (a clear need for vsync). Additionally, when my Amazon package was just delivered, the balcony skipped quite a few frames. Following a recommendation I read here earlier, I switched the encoder from Intel + VPP to just Intel. It's becoming quite frustrating; I never encountered screen tears before. It might also be due to the main camera overloading the network, as the substream and main stream are currently identical. I'm going to temporarily revert to the original settings.

Something definitely isn't right. I'm going to reset all settings to their original state and observe the outcome.

Do I need to have the port set to 88 you think for the sub-stream to work?

At the moment the screen tearing is a major concern :(
User avatar
Sardon
Posts: 114
Joined: Sun Nov 19, 2023 10:50 am

Re: Seeking help with substream settings for Foscam FI9831W camera

Post by Sardon »

This is the glitch I'm dealing with here, and it only started after I increased the bitrate from 2M to 4M for my balcony camera. At the same time, I switched the encoder in BI from Intel + VPP to just Intel and managed to get this tricky sub stream working, which is now just mirroring the main stream.

Given the current struggles with playback at 960p and a 4M bitrate, I'm doubtful it could handle something more demanding, like a 4K camera, right?

Also my other footage shows screen tearing now in my hallway I also upped this to 4M..

URL: https://drive.google.com/file/d/105zfZ5 ... sp=sharing

Would love to hear your thoughts on this.

I'm beginning to think that this troublesome sub stream might be causing some sort of bottleneck.
User avatar
TimG
Posts: 2098
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Seeking help with substream settings for Foscam FI9831W camera

Post by TimG »

Sardon,

Try turning Intel gpu acceleration OFF. When I did that with my first sub-streams, cpu loading actually decreased. It was required before sub-streams as the motion detection was done on the main stream, but may not be now. YMMV. It was always difficult with finding the version of the driver that worked etc. The first stage in fault finding was always to turn it off and see if things improved - and then to look at the cpu loading. It may be causing your tearing issue.

As for bitrates, 2MP is OK for a 1080 feed, so you shouldn't need more than that since your feed is smaller. Increasing it to 4 shouldn't affect anything if you are using VBR - BI5 will show you the actual bitrate.
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
User avatar
TimG
Posts: 2098
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Seeking help with substream settings for Foscam FI9831W camera

Post by TimG »

Given the current struggles with playback at 960p and a 4M bitrate, I'm doubtful it could handle something more demanding, like a 4K camera, right?
It could well be that the camera itself cannot cope with outputting two HD feeds. What size does VLC show the sub-stream to be ?
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
User avatar
Sardon
Posts: 114
Joined: Sun Nov 19, 2023 10:50 am

Re: Seeking help with substream settings for Foscam FI9831W camera

Post by Sardon »

Updating you on the situation, I've contacted Foscam, who initially thought the issue was related to Blue Iris. However, I believed the camera was at fault. After a discussion, their support team asked for codec details from VLC for the specific sub-stream, which I've supplied.

Here's the codec snippet:
VLC SUB.jpg
VLC SUB.jpg (17.85 KiB) Viewed 606 times
No matter the settings in the camera's sub-stream profile, it defaults to 1280x960 resolution, explaining why BI is mirroring the main stream, thus causing issues.

The issue has been forwarded to Foscam's technical team for deeper analysis. I'll be interested to see what they say and will share it with you guys anyway. In the meantime, I've secured a 10% discount on the Foscam R4M (I'm sure Pogo will be proud ;) ). Despite reservations about its wide field of view from a review I watched on YouTube, they've assured me of a 14-day trial period.

My main wish is to monitor the balcony without the kitchen walls intruding, just as it is now, but I'll have to wait for the camera's arrival. They still offer the version with a 5v power supply, which suits me as some require a USB C source, necessitating an adaptor search. Hopefully, I can just swap the cam, use the same bracket, and my PoE will fit straight in.

I'm hopeful about this replacement, given that my current setup, enhanced by CPAI, is performing well, distinguishing humans from non-relevant movements, including condensation and other disturbances. I'm sure it'll deal with the dreaded light changes in due course as well...

While I'm here, a question I should've asked earlier: how does one disable Intel GPU acceleration, and where is this option located?

I've reverted everything to the way it was previously, and it seems a little better, in all fairness.

The plan then is to assess the new camera's performance regarding the sub-stream issue, and I hope the FOV doesn't cause me an issue.

A positive outcome without the previous issues would indeed be great. However, if for whatever reason the FOV proves not to work where my current camera resides and Foscam can't resolve the issue with the sub-stream, it's still OK for the time being, far better than what it was prior to using the CPU to process AI requests. So, either way, I'll just have to wait and see. Hopefully, on Saturday, I should be able to share some good news.

Cheers
User avatar
TimG
Posts: 2098
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Seeking help with substream settings for Foscam FI9831W camera

Post by TimG »

No matter the settings in the camera's sub-stream profile, it defaults to 1280x960 resolution, explaining why BI is mirroring the main stream, thus causing issues.
I wonder if they thought nobody would use a sub-stream at that resolution so it never got finished in the firmware. Sub-streams became a thing with the advent of 1080x1920 cameras and I remember people asking why BI5 needed a much more powerful cpu than other nvr solutions. The answer was that the other solutions were already doing the motion detection on sub-streams. The difference when we got it was massive. At that time we had to guess the sub-stream parameters, so it was pretty wild :o

Once again, it is getting purely academic, but I would check if there was a later firmware for this camera, and read the release notes. To reduce the load on the camera though, I would drop the frame rate to maybe 12 on both streams.

Good luck with the new camera. More cameras :!:
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
User avatar
Sardon
Posts: 114
Joined: Sun Nov 19, 2023 10:50 am

Re: Seeking help with substream settings for Foscam FI9831W camera

Post by Sardon »

I updated the firmware on the FI9832W quite some time ago and have since verified on the Foscam support website that it remains the latest version, with no updates since 2019.

However, upon receiving the R4M early this morning, I replaced the old camera. The swap was quick, with PoE and bracket all compatible. As anticipated, it offers a slightly wider angle, capturing more of the balcony (and window frame), thereby presumably enhancing the capability for CPAI to detect humans. Frankly, the 31W was performing rather well before I made the switch, aside from taking a tad longer for image analysis. Nonetheless, it was only after the replacement that I realised just how faded the previous image quality was in comparison. The new camera's image quality is markedly sharper and clearer, and not just by means of resolution; I suspect the lens of the 31W may be coated in kitchen grease! A bit of 99.9% alcohol and a cotton swab should clean it up.

Here are the images side by side:
side-by-side.jpg
side-by-side.jpg (137.35 KiB) Viewed 519 times
Additionally, the sub-stream is functioning as expected, with the resolution in the .dat now set to 720x480 (sub-stream default), effectively halving the processing time previously averaging around 80+ms.
inference.jpg
inference.jpg (71.94 KiB) Viewed 519 times
I do, however, have a query. As a test, when exporting footage, the video file displayed only a black screen, an issue I didn't encounter with the old Foscam. I assume I might need to re-encode upon export for the footage to display correctly?

The only drawback which is a bit of a negative for me is that the main interface displays the sub-stream of the main camera, which is rather disappointing as it detracts from the visual appeal of the display. Nevertheless, it seems I'll have to adapt as I don't think I have a choice in the matter...

So had the sub-stream worked on the FI9831W , it would have been so poor I wouldn't have used it anyway, the sub-stream on the R4M main display is just about tolerable.. If I could have it displayed in it's full glory I would prefer but I have a feeling that this isn't an option, one would need to disable the sub.

Moreover, since the crew over at Blue Iris introduced the edit layout feature, aligning cameras perfectly as before has become a nightmare for me. Despite experimenting with all the various settings for each camera and trying to fluke them into place, I'm yet to achieve satisfactory results. Is there a way to neatly arrange the cameras in a symmetrical and aesthetically pleasing manner within the main interface using the edit layout, or is it hit and miss ?

As depicted below, there are gaps, etc., which are all misaligned.
interface.jpg
interface.jpg (82.52 KiB) Viewed 519 times
In any case, my task now is to make minor adjustments to the settings and profiles to accommodate the new camera position and its wider field of view over the next few days.

I'm still getting ever so slight tearing on played back footage. Maybe it was always there but I didn't notice it before.

Nevertheless I'm very satisfied with the progress thus far and thanks again to all 🙏
User avatar
Sardon
Posts: 114
Joined: Sun Nov 19, 2023 10:50 am

Re: Seeking help with substream settings for Foscam FI9831W camera

Post by Sardon »

I'm seeking guidance on fine-tuning the R4M camera's settings for optimal use. The camera is currently set at a 2K resolution with a bitrate of 1.5 Mbps, and I'm considering increasing the bitrate to 4 Mbps, as it supports up to a 6 Mbps maximum. Given that storage capacity is not a concern for me, I'm interested in understanding the optimal settings for this specific camera to ensure the best possible video quality.

foscam_settings.jpg
foscam_settings.jpg (20.64 KiB) Viewed 489 times
Moreover, I'm trying to understand the relationship between keyframe intervals and frames per second. Although my camera can record up to 25 FPS on it's main stream, when I set it to this rate, Blue Iris reports that the stream's FPS hovers around 19/20. The camera allows for adjusting the keyframe interval from 10 to 100, currently set to 40 but I'm not clear on how these settings affect video clarity, especially in scenarios with significant motion. Would a lower keyframe interval be more beneficial for this camera ?

Upon consulting the blue iris manual, I noted that it specifies an FPS value, which represents the average frames received per second from the camera, and a keyframe rate. Keyframes, or I-frames, are crucial for various software functionalities. The manual recommends a key frame rate of approximately 0.50 to 1.00 for optimal performance, particularly to enhance direct-to-disk recording and motion detection efficiency. However, my current setup has a key frame rate of 0.50, which is at the lower end of the recommended range. The manual highlights that a key frame rate closer to 1.00 is preferable, as rates significantly lower than this may impair the motion detector's effectiveness, potentially leading to missed events.

stats.jpg
stats.jpg (38.41 KiB) Viewed 489 times
This brings me to a critical point of concern: my camera's key frame rate is currently set at 0.50, which is not aligned with the manual's guidance for achieving the best performance, particularly in ensuring effective motion detection and recording efficiency. Could you advise on how to adjust my camera or Blue Iris settings to increase the key frame rate to 1.00, as recommended? Adjusting this setting seems vital for optimising my camera's functionality, and I'm keen to understand the steps needed to align with the manual's guidelines.

Furthermore, I'm curious about achieving the ideal balance between keyframe interval and FPS for a 2K resolution camera, aiming to ensure both high video quality and efficient storage management. Additionally, it puzzles me why Blue Iris only displays around 20 FPS when the camera is set to 25 FPS, though this is a secondary concern compared to the key frame rate issue.

I appreciate any insights or experiences you can share regarding the optimal settings for this specific camera, especially in relation to increasing the key frame rate to meet the user manual's recommendations. Thank you.
Post Reply