ffmpeginteropx / FFmpegInteropX

FFmpeg decoding library for Windows 10 UWP and WinUI 3 Apps
Apache License 2.0
211 stars 53 forks source link

live screen is output about 5 seconds slowly #235

Closed sdrc2806 closed 3 years ago

sdrc2806 commented 3 years ago

The rtsp live is output, but the screen is output about 5 seconds slowly. I want to slow it down for about a second. What should I do?

If you apply this code, the screen will still output slowly for about 5 seconds.

MediaPlayerElement mp = new MediaPlayerElement(); mp.MediaPlayer.RealTimePlayback = true;

sdrc2806 commented 3 years ago

answer one's own question

                mFFmpegMSS = await FFmpegInteropMSS.CreateFromUriAsync(RtspUrl, mConfig);
                **mFFmpegMSS.BufferTime = TimeSpan.Zero;**
                var source = mFFmpegMSS.CreateMediaPlaybackItem();

buffertime set timespan zero