AntonyCorbett / OnlyM

Simple Media Player (audio, video and images) for use in meetings.
MIT License
182 stars 45 forks source link

Video Start Delay on Second Display when using Media Foundation not FFmpeg #336

Open chadmbrown opened 4 years ago

chadmbrown commented 4 years ago

Describe the bug When playing to a second screen the audio starts but video delays a couple seconds when using Media Foundation encode. This does not happen when using FFmpeg.

To Reproduce Simply send a 720p or higher quality video to a second screen using Media Foundation.

Expected behavior Audio/Video to start simultaneously

Desktop (please complete the following information): Windows Version: 10.0.18363 Build 18363 OnlyM Version: 1.5.0.31

AntonyCorbett commented 4 years ago

@chadmbrown is it ok when rendering to the main display?

chadmbrown commented 4 years ago

@AntonyCorbett - Yes. On the Second display it will be in sync also if I start and then pause immediately, wait 2 seconds and then play again. This problem doesn't exist with FFMpeg but I find some clipping when I use FFMpeg so I prefer a fix for Media Foundation if possible. I'm running an i7 with 16G of memory and turn off almost everything so that Task Manager is quiet.

AntonyCorbett commented 4 years ago

@chadmbrown it should be fixed with the —nogpu commandline setting as described in the wiki. Unfortunately it's caused by a known bug in the MS renderer that has not yet been addressed.

LvDaniel commented 4 years ago

@AntonyCorbett I'm having the same behavior. I'll test with --nogpu commandline. Also when I'm using FFmpeg as engine I have some clipping so unfortunately FFmpeg is not a viable option. Maybe if VLC can be added as engine we can avoid this Foundation adn FFmpeg bugs.

LvDaniel commented 4 years ago

Unfortunately I don't see any changes with or without "--nogpu" command. If I play a video downloaded from jw.org using Media Foundation, audio and video are not synchronized. There's a lag, probably under 1 second. But when I play some content from stream.jw.org the lag is more obvious (probably the mp4 file is more compressed). Unforuntately I can't use FFmpeg either due to the clipping from time to time. Using VLC everything runs smoothly.