Closed nodminger closed 1 month ago
This use case (broadcast 2 screens in same time) was not targeted. Don't hesitate to create a PR :)
I attempted to share my second screen alone, and that's when I encountered this issue. After checking further, I discovered that FFMpeg v4 exhibits this problem by default. Even when I executed this raw code, ffmpeg -f gdigrab -offset_x 0 -offset_y 0 -video_size 1920x1722 -i desktop output.mp4
, the error persisted. But, with FFMpeg v6, I no longer encounter this error using the same raw command (though the issue still persists in Sipsorcery). So, I believe this issue is related to FFMpeg.Autogen or SipsorceryMedia.FFMpeg.
I have two displays and wanted to capture both the display and stream them using FFMpegFileAndDeviceTest Source code. When I run this raw ffmpeg command![image](https://github.com/sipsorcery-org/sipsorcery/assets/128209987/7ebfb158-d661-4a2e-b06a-70b7567ba3af)
ffmpeg -f gdigrab -offset_x 0 -offset_y 0 -video_size 1920x1722 -i desktop output.mp4
I am able to capture a video. But when I use the same attributes (offset_x: 0, offset_y: 0, video_size: 1920x1722, i(path): desktop) in Sipsorcery by modifying this linevideoSource = new SIPSorceryMedia.FFmpeg.FFmpegScreenSource("desktop", new System.Drawing.Rectangle(0, 0, 1920, 1722), 10);
I get this errorwhy does the total height reduces. This only happens when the screen is scaled. But even then, with raw ffmpeg command I am able to capture the stream. Only when I use FFMpeg from Sipsorcery, this issue arises.
My Two Displays: 1: 1920x954 : 100% Scaled 2: 1024x768 : 125% Scaled
When I use FFMpeg directly i get the height as 1722.![image](https://github.com/sipsorcery-org/sipsorcery/assets/128209987/8ec32c6a-e338-4067-8c2f-4c994a1bdfbe)