Open imothep666 opened 2 years ago
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
I had the same problem, but after I used the following configuration, it (hopefully) does not seem to happen any longer:
private void onMediaOpening(object? sender, MediaOpeningEventArgs e)
{
e.Options.IsTimeSyncDisabled = true;
e.Options.IsAudioDisabled = true;
e.Options.MinimumPlaybackBufferPercent = 0.1;
e.Options.VideoForcedFps = 30;
e.Options.DecoderParams.EnableFastDecoding = true;
e.Options.DecoderParams.EnableLowDelayDecoding = true;
}
private void onMediaInitializing(object? sender, MediaInitializingEventArgs e)
{
e.Configuration.PrivateOptions["rtsp_transport"] = "tcp";
e.Configuration.PrivateOptions["fflags"] = "nobuffer";
e.Configuration.PrivateOptions["flvflags"] = "no_duration_filesize";
e.Configuration.PrivateOptions["avioflags"] = "direct";
e.Configuration.PrivateOptions["framedrop"] = "true";
e.Configuration.PrivateOptions["flags"] = "low_delay";
e.Configuration.PrivateOptions["preset"] = "ultrafast";
e.Configuration.PrivateOptions["tune"] = "zerolatency";
e.Configuration.PrivateOptions["fpsprobesize"] = "1";
e.Configuration.PrivateOptions["max_delay"] = "1";
e.Configuration.GlobalOptions.ProbeSize = 32;
e.Configuration.GlobalOptions.EnableReducedBuffering = true;
e.Configuration.GlobalOptions.MaxAnalyzeDuration = TimeSpan.Zero;
}
Hello,
I am writing a net core 3.1 wpf application to display multiple rtsp streams.
the NuGet-Package version is FFME:Windows 4.4.350 and FFmpeg.Autogen 4.4.1
At the moment I open a single fixed Uri in the code behind. But after a few seconds of playback the stream stops without any log output from ffmpeg.
When the window of the application is loaded I open the stream directly with:
if (!await MediaElement.Open(new Uri("rtsp://192.168.93.40:554/1"))) { throw new Exception("unable to open media stream"); }
further i have subscribed the "MediaInitializing", "MediaOpening" and "FFmpegMessageLogged" events.
` private void MediaElement_FFmpegMessageLogged(object sender, MediaLogMessageEventArgs e) { Debug.WriteLine(e.Message); }
`
The FFmpeg log: ` [tcp @ 0a3a8ac0] Starting connection attempt to 192.168.93.40 port 554
`
Thanks in edvance