Open Wolfleader101 opened 2 years ago
Update: I was able to reduce the delay a little bit, but is not decreased the whole way.....
Adding OnMediaOpening event somewhat helps...
<ffme:MediaElement
x:Name="slipsView"
Grid.ColumnSpan="3"
IsDesignPreviewEnabled="True"
LoadedBehavior="Play"
MediaInitializing="Media_OnMediaInitializing"
MediaOpening="Media_OnMediaOpening"
Stretch="Fill" />
private void Media_OnMediaOpening(object sender, MediaOpeningEventArgs e)
{
e.Options.IsTimeSyncDisabled = true;
e.Options.IsAudioDisabled = true;
e.Options.MinimumPlaybackBufferPercent = 0;
e.Options.DecoderParams.EnableFastDecoding = true;
e.Options.DecoderParams.EnableLowDelayDecoding = true;
e.Options.VideoForcedFps = 30;
}
Although I don't think 0 latency can ever be achieved (nature of mpeg video) - right now I'm looking at about 2 seconds (inside my LAN). I'm going to try your methods and see how much it trims. Thanks for positing this!
With ffplay I was able to get it below 250ms - but yes not 0 đŸ¤£
@Wolfleader101 +1. I called the properties as you list them above and it appears (knock on wood) that the latency is significantly better for my application. Thanks for posting this!
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
@Wolfleader101 hi,I used the above configuration to reduce the playback delay, but after playing for a while, the delay will become higher and higher. How to solve this problem?
Cannot get 0 delay live stream working
I am trying to get an RTSP live stream with zero delay to work on my WPF application using FFME however I have been unable to set the correct parameters for it in your library.
Currently, I can run the following directly via FFPlay CLI and I don't get any delays.
Issue Categories
Version Information
Expected Results
Sample Code
In my code I have the following:
XAML
C
Command line ffplay