microsoft / microsoft/FFmpegInterop

Questions about recording video

Open
#146 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.4k
Forks
319
PR merge metrics
No merged PRs in 30d

Description

        bool forceDecodeAudio = false;
        bool forceDecodeVideo = false;
        PropertySet options = new PropertySet();
        FFmpegMSS = FFmpegInteropMSS.CreateFFmpegInteropMSSFromUri("udp://192.168.5.2:1008", forceDecodeAudio, forceDecodeVideo);
        if (FFmpegMSS != null)
        {
            var mediaUI = Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                 mss = FFmpegMSS.GetMediaStreamSource();
                if (mss != null)
                {
                    _mediaPlayer = new MediaPlayer();
                    _mediaPlayerElement.Source = MediaSource.CreateFromMediaStreamSource(mss);
                    _mediaPlayer = _mediaPlayerElement.MediaPlayer;
                    _mediaPlayer.Play();
                    _mediaPlayer.MediaOpened += _mediaPlayer_MediaOpened;


                    var settings = new MediaCaptureInitializationSettings();
                    settings.VideoSource =mss;
                    settings.MediaCategory = MediaCategory.Other;
                    settings.StreamingCaptureMode = StreamingCaptureMode.Video;



                    _mediaCapture = new MediaCapture();
                    await _mediaCapture.InitializeAsync(settings);
                }
            });
        }

Run to _mediaCapture.InitializeAsync (settings); suggested that the error, what is the reason. What should I do? Hope to get everyone's help, very grateful!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the code in the issue and capture the exact error reported at _mediaCapture.InitializeAsync(settings). Read the MediaCapture initialization path and the settings that use the MediaStreamSource, then verify the cause against the FFmpegInterop sample or relevant documentation. Done means identifying the initialization failure and documenting the required correction or missing information.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
audio-video-rtc, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.