AntonyCorbett / OnlyM

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

OnlyM integration with ZOOM. #323

Open Jotxemari opened 4 years ago

Jotxemari commented 4 years ago

Hello, OnlyM can be integrated as a video input to the Windows PC in the Zoom conference system? Something similar to what the EA2SOFT VCAM software does. We are using Zoom to meet remotely and we would like to have a smoother operation when managing JW. Thank you.

AntonyCorbett commented 4 years ago

@Jotxemari Please see below for a more general disussion:

https://github.com/AntonyCorbett/OnlyT/issues/383

Please feel free to add your ideas / requests there.

Thanks Antony

Jotxemari commented 4 years ago

Thanks Antony.

KovalevArtem commented 4 years ago

I conducted experiments and came to the conclusion: Using OBS + OBS-VirtualCam gives a better and smoother video picture than a screen demonstration in ZOOM. (As described @vangquan) Have you made such comparisons? What conclusions have you come to?

Using the method with OBS + OBS-VirtualCam when playing a video raises some issues with sound. But there is a solution. Can Virtual Audio Cable (for sure) or VoiceMeeter (maybe) help with this. It is enough to emulate the sound from the speakers to the microphone.

simpsonnth commented 4 years ago

I conducted experiments and came to the conclusion: Using OBS + OBS-VirtualCam gives a better and smoother video picture than a screen demonstration in ZOOM. (As described @vangquan) Have you made such comparisons? What conclusions have you come to?

Using the method with OBS + OBS-VirtualCam when playing a video raises some issues with sound. But there is a solution. Can Virtual Audio Cable (for sure) or VoiceMeeter (maybe) help with this. It is enough to emulate the sound from the speakers to the microphone.

Have you tried the Zoom optimise video tick box on sharing and then using a second monitor with a website on playing the video? It work out to be roughly 1.2 seconds out which would be roughly about the same if you were to do it over OBS using a virtual audio cable. If you want to try and get true live you can use the delay audio feature within OBS

KovalevArtem commented 4 years ago

@simpsonnth

image I always put 2 checkboxes active. But despite this, as I said above, it seems to me that when using OBS + OBS-VirtualCam, the picture is better and smoother.

a website on playing the video Then I did not quite understand what you were talking about.

vangquan commented 4 years ago

Ticking on the Zoom "Optimize Screen Sharing for Video Clip" and Share Screen still costs us lagging video (the Audio goes well). But this works enough for OnlyT because it's just a clock.

I think what @KovalevArtem tried to say was to Share Screen the videos (from JW Library or wheresoever).

[This is off topic, I'm sorry] To stream video from JW Library (Sign Language in our case), we used Spacedesk HTML5 feature to create a virtual display, and JW Library/JW Library Sign Language can use this new virtual display to play videos to (the same for OnlyX apps); OBS would help to capture this virtual screen (display) and OBS virtual webcam plugin helped to bring it to Zoom/Jitsi/Webex... as a webcam. This helped to have better video but zero audio (@KovalevArtem had a suggestion https://github.com/AntonyCorbett/OnlyM/issues/323#issuecomment-604542748).

KovalevArtem commented 4 years ago

Share Screen the videos (from JW Library or wheresoever).

Yes. That is exactly what I mean! (Forgive me for my English)

Spacedesk HTML5

I am the first to hear about this program. Thank you so much for sharing this!

zero audio

The problem with sound can also be solved using a "virtual microphone." For example, use the Virtual Audio Cable program. I wrote about this above!

Jotxemari commented 4 years ago

Hello, Thank you very much for the suggestions. Finally I am with VCAM from e2esoft and it allows me to send live video and audio, as well as still images in a very comfortable way. The video quality is acceptable and it also manages the audio.

KovalevArtem commented 4 years ago

I think this issues is closed prematurely ....

Jotxemari commented 4 years ago

I'm very sorry, I thought it had been answered, I reopen the thread. Sorry.

AntonyCorbett commented 4 years ago

@Jotxemari The latest pre-release includes the ability to have OnlyM display in a window. This may be of some use when used in a broadcast setting. See OnlyM Settings => Display => Windowed

inston commented 4 years ago

Another option for the audio concerns when using a virtual web cam. Zoom has an option to share just device audio. When you share just device audio, all of the normal meetings controls act like normal (non shared state). So if you go the path of virtual web cameras for media, then this sharing setting can be left on for the whole meeting. It's probably easier than using virtual audio cable.

Personally, I'm still leaning towards traditional zoom screen sharing for all media, but that's because I want more brothers to be able to run this so that it doesn't not fall on the same brothers each week to run the meetings

vangquan commented 4 years ago

That’s right, Virtual Cam from OBS or Xsplit or NDI cannot route audio because it’s just a camera. Your suggestion and the https://www.vb-audio.com/Cable/ and similar solutions can help to route the sound to apps like Zoom, Skype. Please keep in mind that if your internet connection is very good, maybe, the built-in Share-screen feature is all you need to display media. Or perhaps, if video latency is very important and your internet connection is not very good, then you can use Virtual Cam (OBS + OBS virtual cam, for example).

One more good reason to use Virtual Cam is to display media directly from the JW Library apps.

Jotxemari commented 4 years ago

Thank you very much Antony. Have you thought about doing the windowed without borders?

AntonyCorbett commented 4 years ago

@Jotxemari I tried it briefly but OBS would not capture it. I may take another look at some stage.

tenisak commented 4 years ago

Have you thought about doing the windowed without borders?

A borderless window would be great! Now you can see the edges of the window in the stream, which is unprofessional 😉

It would also be very useful if one of the pictures could be selected as a "fallback image". See #47.

AntonyCorbett commented 4 years ago

@tenisak @Jotxemari Latest pre-release uses a window with no title bar, etc

tenisak commented 4 years ago

Thank you very much Antony!

Jotxemari commented 4 years ago

Antony, Thank you for your magnificent and selfless work.

gabeluci commented 4 years ago

I downloaded the new pre-release version (1.6.0.3). I've selected "Windowed" in the settings, but when I play a video, it is still full screen. Maybe I was wrong in assuming this, but I was expecting it to play in the window at the native size of the media (I was playing a 640x360 video).

This is my first time using OnlyM, so I haven't changed any of the other settings.

A side note: a bonus would be if I can specify what size the window should be in the settings.

timjobutler commented 4 years ago

@gabeluci If you click and drag the window to reposition it. Then with access to the edges and corners, you can resize as need. The Windows key + ⬆️⬇️⬅️➡️ buttons can be used to snap the window to quadrant of the screen.

However, when resizing, best to play a video to maintain the video as correct ratio without black edges.

gabeluci commented 4 years ago

Ah, ok. Thank you! That works nicely except that I don't know what the exact size of the window is, but that's not a big deal.

One issue I do see with using this with Zoom: you can only share a window that exists. So before you can start sharing in Zoom, you have to play the video, immediately pause, then share the window, then hit play again. However, if you're not quick enough to hit pause, and you scrub back to the beginning, the playback stops completely and the window disappears.

I like that the window disappears when not playing, since Zoom will automatically stop sharing when the window goes away (one less thing for us to do at the end of a video). However, it would be nice to be able to scrub back to the beginning. Or have a setting that will automatically pause the video at the beginning to give you a chance to share the window before playing.

Edit: Or, actually.... I could use the Blank Screen item. Start that first, then share the screen, then play the video. That'll work.

timjobutler commented 4 years ago

@gabeluci

Ah, ok. Thank you! That works nicely except that I don't know what the exact size of the window is, but that's not a big deal.

With a meeting song playing, you can resize until the window has no black edges. Also, OnlyM remembers the size of the window when you open the program the next time.

If the "Blank screen" option is turned on, you can play this image to open the output window and make it available for selection in Zoom's Share screen options. Once shared, click play on the video and no need to worry about pausing or scrubbing the video position.

Another option in the Advanced tab of Zoom is "Share a portion of screen". Setup once for a meeting, ensure no other windows are behind the OnlyM output window and black desktop background. When you share screen, it will always sharing that portion of screen.

Hope this helps.

timjobutler commented 4 years ago

@gabeluci If you would like OnlyM to display a persistent image to prevent the window from disappearing at the end of video, add your comments to Issue #47.

gabeluci commented 4 years ago

@gabeluci If you would like OnlyM to display a persistent image to prevent the window from disappearing at the end of video, add your comments to Issue #47.

This part I'm ok with. I prefer that the window go away.

Thanks for your help. I'm going to use this for the meeting this Sunday.

gabeluci commented 4 years ago

I like that the window disappears when not playing, since Zoom will automatically stop sharing when the window goes away (one less thing for us to do at the end of a video).

I just tested this out now. Apparently Zoom does not automatically stop sharing when you hit stop in OnlyM. It only "pauses" screen sharing - everyone sees the last frame shared before the window closed. If I close OnlyM entirely, then Zoom automatically stops sharing, saying that the window has been closed.

I'm guessing that the window isn't actually destroyed between playbacks?

Edit: Yeah, I confirmed with Spy++ that the window is just hidden, not destroyed.

getabc commented 4 years ago

We found if you install the pre-release on a fresh computer, the interface is missing the top bar controls (e.g you cannot minimize the interface) and you cannot resize the program window.

image

The program also hangs frequently during video playback and the only way to fix it is to kill it in task manager.

Installing the 1.5.0.31 version and then the 1.6.0.3 pre-release fixes all the issues.

getabc commented 4 years ago

We are experiencing interface freezes. It seems to be happening with mp4 files. The windowed video screen is frozen, and you cannot click on the stop button. You cannot close the player because media is still "playing". We have to kill it in task manager. This happens at random.

timjobutler commented 4 years ago

@getabc I faced similar issues on random occurences and have Issue #329 open

AntonyCorbett commented 4 years ago

@getabc What version are you using please? Does this happen only when used in windowed mode or when using a target monitor too?

getabc commented 4 years ago

@AntonyCorbett we are using 1.6.0.3, and only in windowed mode.

The operator was switching from a picture to a video when the error occurred. My own computer is configured with ffmpeg encoding, so I changed it to ffmpeg on the PC where the error occurred. Waiting to see if it fixes the issue.

Log of the failure (15:29:19) and task manger reset of the program (15:46:34).

The operator tried to get the system to unfreeze during that period.

2020-04-12 13:41:22.049 -07:00 [Information] Opened 2020-04-12 14:53:23.640 -07:00 [Information] ==== Launched ==== 2020-04-12 14:53:23.702 -07:00 [Information] Version 1.6.0.3 2020-04-12 14:53:26.168 -07:00 [Information] Opening media window (windowed) 2020-04-12 15:13:31.751 -07:00 [Information] Opening media window (windowed) 2020-04-12 15:13:31.768 -07:00 [Information] Starting media C:\Users\Brother Joseph\Documents\OnlyM\Media\00-blank.png 2020-04-12 15:26:34.040 -07:00 [Information] Opening media window (windowed) 2020-04-12 15:26:34.040 -07:00 [Information] Starting media C:\Users\Brother Joseph\Documents\OnlyM\Media\5 (Song 122).mp4 2020-04-12 15:26:35.032 -07:00 [Information] Opened 2020-04-12 15:29:01.028 -07:00 [Information] Opening media window (windowed) 2020-04-12 15:29:01.043 -07:00 [Information] Starting media C:\Users\Brother Joseph\Documents\OnlyM\Media\7.png 2020-04-12 15:29:06.825 -07:00 [Information] Opening media window (windowed) 2020-04-12 15:29:06.825 -07:00 [Information] Starting media C:\Users\Brother Joseph\Documents\OnlyM\Media\10.jpg 2020-04-12 15:29:19.262 -07:00 [Information] Opening media window (windowed) 2020-04-12 15:29:19.262 -07:00 [Information] Starting media C:\Users\Brother Joseph\Documents\OnlyM\Media\5 (Song 122).mp4 2020-04-12 15:46:34.701 -07:00 [Information] ==== Exit ====

avs-eng commented 4 years ago

good afternoon all. i just wanted to share that we are using a second monitor on the host pc and then when we screen share in zoom we just share that 2nd monitor. so that means that we can use JW library and onlyM just as we would at the hall, which also has the benefit that when you share the screen initially all that everyone sees is the years text until you get the video image etc up - they dont see your panic in trying to get things started! also quality is good and latency minimal.

(first time contributor so i just also want to say thanks to Antony for all his work through the various versions of soundbox, onlyM etc. we appreciate it greatly.) rgds Kevin

getabc commented 4 years ago

Timestamp 2020-04-16 21:20:23.566 the video and interface froze

log-20200416-AC.txt

Installed K-lite codec Reinstalled 1.5.0.31 and then the 1.6.0.3

Worked normal for a little while - started with errors again.

It will lock up and I would have to end task to get it to shut down so I could restart it.

However, when we disable windowed mode it works perfectly.

AntonyCorbett commented 4 years ago

@getabc there's nothing unusual in the log. Please would you send the Windows event viewer entries that correspond to the freeze?

getabc commented 4 years ago

BC-time-logs.zip

getabc commented 4 years ago

Reset all the logs and ran another test. Force the application to run in administrator mode.

17:45 - started initial test 17:56 - went to eat some food 18:30 - resumed test - failed on the first video 18:32 - killed application in task manager 18:34 - failed on video 18:36 - killed application in task manager

test02.zip

gabeluci commented 4 years ago

I'm speaking for Antony here: I see you included the System and Security logs, but the Application log will probably be the most useful. (unless the OnlyM log has enough)

getabc commented 4 years ago

@gabeluci they were empty

getabc commented 4 years ago

freeze Example of the interface freeze. Set the program up to run as an administrator - same result.

It seems to only happen after a few minutes of running the program.

getabc commented 4 years ago

I was able to get application logs this time. I kept clicking on the interface and windows recorded the freeze. We would normally click it once to discover the freeze, and then kill it in task manager.

logs.zip

Unchecking windowed mode, we seem to have no lockups.

getabc commented 4 years ago

@AntonyCorbett I found a webpage describing how Windows Media Foundation codec has a problem with displaying MP4 videos on the secondary displays.

http://breakthrusoftware.com/html/onlinedocs/kb/videomill/KL_MediaFoundation.html

The MP4 video will always freeze on the first frame with the play counter stuck at 00:00:00

We moved the windowed video to the primary display and it no longer freezes.

@timjobutler is your window on the secondary display?

AntonyCorbett commented 4 years ago

@getabc thanks, I'd forgotten about this bug. OnlyM works around it in full-screen mode but it remains a problem on some graphics adapters in windowed mode. The best fix atm is to replace the codecs. But I will look at the code to see what can be done.

getabc commented 4 years ago

@AntonyCorbett will this error also occur if you set the encoding to ffmpeg?

AntonyCorbett commented 4 years ago

@getabc No. The FFMPEG mode does not have the bug

KovalevArtem commented 4 years ago

Perhaps this repository will be useful for integrating NDI! https://github.com/leadedge/ofxNDI or https://github.com/nariakiiwatani/ofxNDI

mjameswh commented 4 years ago

In case this might help, here are some information regarding the implementation of a virtual camera in Windows:

In summary, the preferred approach is through some DirectShow API. This implies registering a COM service that implements some specific interfaces. The main challenge though is definitely to inject frame data (video and audio) into the virtual camera's output buffer. I know essentially nothing about DirectShow at this point, but I have the feeling that feeding video frames from the WMF renderer to this DirectShow virtual camera would be a difficult task. Maybe however it might be reasonable to exploit the ffmeg based renderer for this purpose…

Also, here are some open source projects that actually implement virtual cameras on Windows, following the same approach:

mjameswh commented 4 years ago

Another option I see would be to use the Zoom SDK to integrate Zoom inside the OnlyM application. Then, it would be possible for the media player to get control over the screen sharing feature of Zoom, so it would be possible for example to have Zoom automatically start sharing the correct window as soon as the brother press play in the media list, and stop sharing when the brother press stop in the media list. That would still be some improvement compared to the current situation.

I have started building a prototype based on this idea, though I will use an ElectronJS based media player (at this time, the only developpement computer I have on hand is a Mac, and 2 out of 3 brothers in charge of medias for Zoom meetings in our congregation at present are actually using Mac for that purpose).

AntonyCorbett commented 4 years ago

@mjameswh Thanks. I did take a look at the zoom sdk and its community supported c# wrapper.

jozefsk commented 4 years ago

We use old Soundbox software with a second monitor that we share in Zoom. It works without problems. The monitor is black at the beginning, which is great.