-
Notifications
You must be signed in to change notification settings - Fork 13
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
FFmpeg error with Logitech C925e #48
Comments
...Well that's really weird... A different error each time. And the error messages don't help. I need to do something about it. I have no clue if I can fix this bug though. I still don't have any Windows installation. Also thanks, didn't know they discouraged |
For the time being, I switched to calling FFmpeg directly using rosenbjerg/FFMpegCore, and it works perfectly fine as long as I'm using their var args = FFMpegArguments
.FromDeviceInput("video=\"Logitech Webcam C925e\"", a => a.ForceFormat("dshow"))
.OutputToPipe(
new StreamPipeSink(FrameStream),
a =>
a.WithVideoCodec("rawvideo")
.ForceFormat("rawvideo")
.WithCustomArgument("-pix_fmt rgb24")
.WithVideoFilters(f => f.Scale(new Size(640, 480)))
.WithFramerate(12)
)
.WithLogLevel(FFMpegLogLevel.Info);
Log.Information("{Args}", args.Arguments);
args.ProcessSynchronously(); The code above produces the following command line arguments: -f dshow -i video="Logitech Webcam C925e" -c:v rawvideo -f rawvideo -pix_fmt rgb24 -vf "scale=640:480" -r 12 "\\.\pipe\FFMpegCore_4c4d8" -y I know it's too vague but I'm exhausted to find the root cause myself, so hope this info somewhat helps? Some quick Ctrl+LMB's:
|
Initializing camera with default settings
When initializing the camera without an explicit format requirement, I get the following exception on calling
TryGetFrame()
:Soon the program would crash with another
ApplicationException
:Initialization code
Initializing with
yuyv422
640x480If I instead specify the format to be yuyv422 640x480 (I already dumped
AvailableVideoInputOptions
so I know for sure it's supported),GetDevice()
will fail with the following:Initialization code
Initializing with
mjpeg
640x480Interestingly, using
mjpeg
will throw a different exception:Initialization code
Initializing with
yuyv422
1920x1080... And if I use the full resolution the program crashes with a memory error...
Maybe another minor issue?
Also unrelated, but Microsoft officially discourages the use of
ApplicationException
.Environment Info
Windows 11 22H2 (22621.963)
Logitech C925e
net7.0 with
Microsoft.NET.Sdk.Web
, AnyCPU or x64, Debug or Releaseprebuilt FFmpeg binaries from https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2023-05-23-12-46/ffmpeg-n5.1.3-10-g33ed503e59-win64-gpl-shared-5.1.zip or https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-5.1.2-full_build-shared.7z
The text was updated successfully, but these errors were encountered: