-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MS-RDPECAM] Camera doesn't work in Microsoft Teams and Windows Camera #10274
Comments
Hello @oleg0421. The problem still exists, so as we agreed, I created this issue. |
I kinda have the same symptoms with |
@progxaker , @hardening : I am looking into this and will get back with more details. Meanwhile, could you please post here the results of these commands for your cameras:
Thank you! |
List formats
List formats (ext)
|
@progxaker : thank you for the v4l2 output. It looks like your camera supports 30fps only up to 480p (640x480) resolution. Anything higher has lower fps. When you go to https://webcamtests.com, it requests 480p:
so the camera works. However, when you go to Teams, it requests 720p:
and the driver/camera refuses to provide even a single sample. Windows camera app in settings allows to select the resolution. My guess is that if you select 640x480 or lower, it should work, but anything higher won't. Please try this test and confirm that's the case. Also, as this is resource heavy feature, it's better to compile with all debug-related options turned OFF to make sure video performance is not impacted. I will investigate more about how to detect/control supported fps based on resolution and avoid hard coding it to 30. |
Looks like I need to rework the logic in
Please assign the bug to me. |
According to a response on Microsoft Community:
Most articles state that I can change the resolution in the Camera app, but there is no such option... I can't seem to change it before the app initializes with the camera (i.e. without errors).
I'll test this on Monday. I tested #10276 a bit, but unfortunately it didn't solve the problem. |
@progxaker @oleg0421 I´ve reverted the default |
@akallabeth : agree, but please see my comment here: |
Hello @oleg0421. I built FreeRDP from the master branch (0633623) and now it looks better, I was able to get an image in the Camera application but still not in Teams. I ran webcamtests, Teams and then Camera. |
Hello @akallabeth. I deleted the cache again, reverted the mentioned pull request ( @oleg0421 |
@progxaker well, that error is expected (turn off |
Ah... The parameter names were changed, got it. Thanks) |
these are the |
@akallabeth it worked for me, thanks a lot. Maybe we need to have it written somewhere, how to specifically enable RDPECAM_CLIENT feature in the build, if people like me are getting confused :) |
@oleg0421 true. |
@progxaker: sorry you still have problem with Teams. I went through the logs you shared. Your camera reports these resolutions supported:
It is consistent with Windows Camera app displays only resolutions that support 30 fps and higher. That is why you see 640x480, 176x144 and 320x240 only, including 144p resolution you've mentioned. Before my last fix, we've had 30 fps hard coded for every resolution, so Camera app was showing more resolutions, but it was incorrect. MS Teams consistently requests 1280x720, even though your camera supports it at 8 fps:
After we tell camera to start streaming at this resolution, we don't get back even a single frame from the camera. In my testing, Teams together with my camera and 1280x720 resolution work ok. I suspect your camera or camera driver doesn't support 1280x720 resolution at 8 fps. If you know any other native Linux X11 application, that works with cameras and allows to select various resolutions, please try it to see if it can display video in 1280x720. Alternatively, you can try another computer / camera to see if it makes a difference with Teams. You can also try to hack the code in |
Hello @oleg0421. Thank you for the explanation and workaround.
You don't have to 🙂 Open-source is about desire, not obligation.
I can try it if you want, but it's a built-in camera so I highly doubt it supports 720p, haha)
I thought about testing with another camera. It's also low resolution, but connected via USB, and I was wondering how FreeRDP would handle it. But I wanted to solve the current problems before moving on to other topics.
Thanks for the tip (and the additional update :) ). I added the following patch to the file and Teams was able to broadcast my image!
Detailsdiff --git a/channels/rdpecam/client/v4l/camera_v4l.c b/channels/rdpecam/client/v4l/camera_v4l.c
index ccb60d65b..aa18848c2 100644
--- a/channels/rdpecam/client/v4l/camera_v4l.c
+++ b/channels/rdpecam/client/v4l/camera_v4l.c
@@ -214,6 +214,9 @@ static INT16 cam_v4l_get_media_type_descriptions(ICamHal* hal, const char* devic
{
struct v4l2_frmivalenum frmival = { 0 };
+ if (frmsize.discrete.width >= 1280)
+ break;
+
if (frmsize.type != V4L2_FRMSIZE_TYPE_DISCRETE)
break; /* don't support size types other than discrete */
P.S. If you want the TRACE logs of this run, I can post them. Based on the above statements, I wonder if you want to add a parameter to set the resolution manually? Or dynamic selection based on the resulting list, or max fps? I'm wondering if any application would want to use It can also be useful when a user is worried about Internet bandwidth (it's not my case) and setting a network connection type (if it's not legacy).
|
@progxaker better take your hands off |
@progxaker : thanks for the confirmation. It is basically a bug in camera driver (should not enumerate resolutions that camera doesn't actually support). On our side we can filter out formats/resolutions based on the following parameters: maxWidth Any of them may be specified as command line parameters for The change would have to process newly added CLI parameters and do the filter logic in If you feel like this is a useful improvement, please help to add this change. |
@akallabeth: please let me know, how to edit the Compilation page. I just want to mention the feature and how to build and run with it, such as:
|
Hello @oleg0421. Your suggestion sounds better than mine :)
What do you mean by "please help to add this change"? Prepare a pull request? Beta testing? |
Hello @progxaker. I meant that you actually implement this resolutions filter, since it was your idea :) If you have time and feel comfortable doing it. |
@oleg0421 okay, no problem) It will take some time to research how it can be implemented and I won't be able to start until July 8, but it will be interesting to delve into C again. Thanks again for your contribution! 🙂 |
Describe the bug
A camera doesn't work with MS-RDPECAM protocol in Microsoft Teams and Windows Camera applications. Its led lights up for 2-4 seconds, nothing happens in the applications, and the camera LED goes out.
Relates to #4971 #10258 #10273.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Teams and the Camera applications broadcast the camera image.
Screenshots
Application details
FreeRDP version (
xfreerdp /version
)This is FreeRDP version 3.5.2-dev0 (bcd663b7d)
Command line used
./sdl-freerdp ./SessionDesktop.rdpw /gateway:type:arm /size:1366x768 /f /u:<username> /p:'<password>' /mic:sys:pulse,format:1 /network:auto /auto-reconnect /dvc:rdpecam -decorations /log-level:TRACE
Output of
xfreerdp /buildconfig
Build config
OS version connecting to (server side) - Windows 11
If available the log output from a run with
/log-level:trace 2>&1 | tee log.txt
freerdp-with_out-sanitizer.tar.gz
Environment (please complete the following information):
Additional context
Before running FreeRDP, I rebooted a PC to reset any running threads, if there were any.
The text was updated successfully, but these errors were encountered: