AntonyCorbett / OnlyR

Simple Windows Audio Recorder
MIT License
83 stars 12 forks source link

Sync issue - Audio/Video #24

Closed Tale-Spin closed 3 years ago

Tale-Spin commented 5 years ago

Describe the bug Audio is ahead of video when playing videos in JW Library app when Only-R is open. Sync is fine when Only-R is not open. Recorder does not need to be recording - only open on the desktop. Sometimes the sync problem clears up if I close and reopen JW Library.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. See error

Expected behavior I updated Realtek audio driver which seemed to fix the problem with JW Library but it recurred when opening Only-R.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

AntonyCorbett commented 5 years ago

@Tale-Spin Thanks for feedback. I can't see from the code how OnlyR might interfere with JWL video playback when it is not recording.

I updated Realtek audio driver which seemed to fix the problem with JW Library but it recurred when opening Only-R.

This seems to indicate that the problem occured in JWL even when OnlyR was not running.

Are you sure there is a correlation?

AntonyCorbett commented 5 years ago

Closing for now as there is no response.

westhouseit commented 4 years ago

I can confirm that we're having this issue as well. To replicate:

  1. Open JW Library, download the latest broadcasting.
  2. Open OnlyR
  3. Start playing broadcasting.

I'm not sure where the issue lies but hopefully we can start to narrow down the true cause.

One thing we tried was scrubbing through the video timeline and back to the beginning. This appeared to reduce the lip sync issue from about 1 sec to about 1/4 sec.

The laptop here is an Asus using a Realtek chipset and one of those stupid combo headphone/mic ports. I'll try to get some more details the next time I can get access.

Some other things I'd like to try are:

  1. Test with another audio recording program, e.g. Audacity.
  2. Run the above steps on different computers and compare similarities/differences.
  3. Test with a USB audio device.
richfrantz commented 4 years ago

It's jwl

Get Outlook for Androidhttps://aka.ms/ghei36


From: westhouseit notifications@github.com Sent: Sunday, March 8, 2020 2:56:09 PM To: AntonyCorbett/OnlyR OnlyR@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [AntonyCorbett/OnlyR] Sync issue - Audio/Video (#24)

I can confirm that we're having this issue as well. To replicate:

  1. Open JW Library, download the latest broadcasting.
  2. Open OnlyR
  3. Start playing broadcasting.

I'm not sure where the issue lies but hopefully we can start to narrow down the true cause.

One thing we tried was scrubbing through the video timeline and back to the beginning. This appeared to reduce the lip sync issue to about 1/4 of a second.

The laptop here is an Asus using a Realtek chipset and one of those stupid combo headphone/mic ports. I'll try to get some more details the next time I can get access.

Some other things I'd like to try are:

  1. Test with another audio recording program, e.g. Audacity.
  2. Run the above steps on different computers and compare similarities/differences.
  3. Test with an USB audio device.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAntonyCorbett%2FOnlyR%2Fissues%2F24%3Femail_source%3Dnotifications%26email_token%3DAINW6PMUYUWDD3X3XFPCPBLRGQH7TA5CNFSM4GLYKEY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOFCVLQ%23issuecomment-596257454&data=02%7C01%7C%7Ce5ec62b3c7e8441b512508d7c3ab82aa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637193013699680109&sdata=nQphpjkr8dd7W0NQyQcSfkvAocYKCqNUMpwOcYutfdQ%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAINW6PICYWCVN3JQNVQ744LRGQH7TANCNFSM4GLYKEYQ&data=02%7C01%7C%7Ce5ec62b3c7e8441b512508d7c3ab82aa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637193013699690114&sdata=ZEKa6m0gKUt3AE8SYRQ5zogOU8i6f%2F1muhy8eGcJT7Y%3D&reserved=0.

westhouseit commented 4 years ago

@richfrantz have you submitted the code fix to the brothers so they can implement it?

richfrantz commented 4 years ago

Sniff. Sniff. Is that snark I smell? To answer your question, no, but we've been dealing with this sync issue for well over a year. Download a video, not stream, and play it through JWL, sync issue. Play that same video through onlym, or VLC, no sync issue. That's why I said what I said.

Get Outlook for Androidhttps://aka.ms/ghei36


From: westhouseit notifications@github.com Sent: Sunday, March 8, 2020 3:00:16 PM To: AntonyCorbett/OnlyR OnlyR@noreply.github.com Cc: richfrantz rich_frantz@hotmail.com; Mention mention@noreply.github.com Subject: Re: [AntonyCorbett/OnlyR] Sync issue - Audio/Video (#24)

@richfrantzhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frichfrantz&data=02%7C01%7C%7Cecc550fd34e740cab17908d7c3ac1706%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637193016190473796&sdata=7P4hnXjAnzSrdcx7d3jU5v3PaL7dZ3YcI0Bt2zS3A%2F0%3D&reserved=0 have you submitted the code fix to the brothers so they can implement it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAntonyCorbett%2FOnlyR%2Fissues%2F24%3Femail_source%3Dnotifications%26email_token%3DAINW6PIMTVMJVBNAN4S6QGDRGQIPBA5CNFSM4GLYKEY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOFCX4A%23issuecomment-596257776&data=02%7C01%7C%7Cecc550fd34e740cab17908d7c3ac1706%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637193016190483801&sdata=CBFZXELbVQKBYtQzg%2BzzvwhD3Jr1ZH8HNjWLAR6ugUg%3D&reserved=0, or unsubscribehttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAINW6PN7AQUP625RP6LGK43RGQIPBANCNFSM4GLYKEYQ&data=02%7C01%7C%7Cecc550fd34e740cab17908d7c3ac1706%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637193016190493812&sdata=7Wi7ta%2FJvOExyxX7Fj3Iv3uxO0kxN3aeEcnL%2Ffucifo%3D&reserved=0.

westhouseit commented 4 years ago

Sorry, perhaps a bit. I'm just used to people claiming they know the reason for a software issue when they don't have access to or a deep enough understanding of the systems involved.

What you're referring to as JW Library being the cause is actually a correlation, not a causation. For example, do we know whether JWL is doing sync calculations (to support streaming) that could perhaps be thrown out by the Realtek drivers returning bad data when OnlyR is running? I certainly don't, so I can't assume on a system like Windows with a massive number of interconnected systems that one piece of software is clearly at fault when I can't even run a debugger for myself. So there certainly is a strong correlation, but until the actual core issue is identified and resolved how can we know the cause?

P.S. The example above is completely hypothetical and just there to illustrate a point.

richfrantz commented 4 years ago

No worries, I'm a developer too, for a living, when I get home it's the last thing I want to do, so for me my "correlation" is proof enough.

My "theory" is that it's the encoder, onlym and VLC use the same one I can't remember the name and I'm not going to go look it up FFmpeg or something like that.

Get Outlook for Androidhttps://aka.ms/ghei36


From: westhouseit notifications@github.com Sent: Sunday, March 8, 2020 3:22:38 PM To: AntonyCorbett/OnlyR OnlyR@noreply.github.com Cc: richfrantz rich_frantz@hotmail.com; Mention mention@noreply.github.com Subject: Re: [AntonyCorbett/OnlyR] Sync issue - Audio/Video (#24)

Sorry, perhaps a bit. I'm just used to people claiming they know the reason for a software issue when they don't have access to or a deep enough understanding of the systems involved.

What you're referring to as JW Library being the cause is actually a correlation, not a causation. For example, do we know whether JWL is doing sync calculations (to support streaming) that could perhaps be thrown out by the Realtek drivers returning bad data when OnlyR is running? I certainly don't, so I can't assume on a system like Windows with a massive number of interconnected systems that one piece of software is clearly at fault when I can't even run a debugger for myself. So there certainly is a strong correlation, but until the actual core issue is identified and resolved how can we know the cause?

P.S. The example above is completely hypothetical and just there to illustrate a point.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAntonyCorbett%2FOnlyR%2Fissues%2F24%3Femail_source%3Dnotifications%26email_token%3DAINW6PKMHUQDCPUSR4GJHIDRGQLC5A5CNFSM4GLYKEY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOFDHGA%23issuecomment-596259736&data=02%7C01%7C%7Cb60f19ca384a4c2a30b308d7c3af3627%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637193029597395714&sdata=pYEWCajDuv7teS2asUI%2B2Y9oM3cBVWJdtBbrq3kVnp0%3D&reserved=0, or unsubscribehttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAINW6PJGJZY6QZ5T5AVUBHDRGQLC5ANCNFSM4GLYKEYQ&data=02%7C01%7C%7Cb60f19ca384a4c2a30b308d7c3af3627%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637193029597395714&sdata=KNMor%2FUfMMZfhu2kkyAgzqexIdks%2BNVfMUV4HXZaTdc%3D&reserved=0.

AntonyCorbett commented 4 years ago

@westhouseit Thanks for your report. Some questions:

  1. Please would you confirm that JWL audio/video sync is ok when OnlyR is not running.
  2. Assuming 1 above is the case, what happens when OnlyR is launched after JWL playback.
  3. Please confirm that simply launching OnlyR (without starting a recording) is all that is needed to induce the problem.
  4. Does the video lag behind the audio or vice versa (not always easy to tell)?
  5. Does the problem exist even when OnlyR is minimized?
  6. What CPU % does OnlyR use when open (but not recording)?
  7. If you use 3rd party anti-virus tools, could you temporarily disable them to determine if they contribute to the problem?
  8. Does it make a difference whether JWL is also rendering the video on a secondary monitor?
  9. Please launch OnlyR with the --nogpu command-line option. This will ensure that OnlyR makes no use of GPU rendering. Does the problem still exist?

Although it's certainly true that JWL audio/video sync is a very common problem, I have reopened this issue in case we can discover something new!

Thanks for your help.

Kind regards Antony

Tale-Spin commented 4 years ago

This may be irrelevant, but we used to have three congregations at our hall, each with its own user account in Windows 10. The sync issue was intermittent for all three user accounts. After the reorganization in November 2019 we only have one congregation at our hall. Since deleting the other two user accounts the sync problem seems to have cleared up. We usually run JWL, Only-R, Only-T, Only-M (occasionally) and sometimes JWL Helper for a song. We sometimes use Firefox to stream audio of the Scriptures for the Cong, Bible Study. Even with everything open, the sync issue has cleared up since deleting those two user accounts.

westhouseit commented 4 years ago

Interesting. I'll be doing some more tests tomorrow night, hopefully. Otherwise after the assembly this weekend.

portlandpadre commented 3 years ago

Ok Friends.. this video Lag issue especially on the second display was killing me. AV brother insisted we only use jw library and not download the video and play thru VLC.. I went into the control panel for my graphics card Nvidia Geoforce RTX added Jw library to list of customizable apps.

turned on V sync and triple buffering and BAm!!!! all lag and sync issue are gone. Also assigned the graphics card to always run the videos. I guess it might resort to only cpu for playback with integrated graphics? Regardless immediately cleared up issues..

My lag was super bad on the second display. and it is now gone. I'm not a developer or anything just a friend who was going crazy with lag on the second display.

AntonyCorbett commented 3 years ago

I am closing this now as there is no further feedback. Please feel free to reopen if needed.