Skip to content

cpb34/Audio-Video-Delay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Audio/Video Delay

Browser extension that Delays audio and video for synchronized playback

Privacy

Audio/Video Delay runs locally and does not collect any user data or analytics. It is fully open-source and can be freely reviewed.

Contributions

If this extension solves your audio issues, please consider leaving a Google review, starring the GitHub repository, or donating. If you would like to contribute to the code, you are welcome to do so in the develop branch. Thank you!

Limitations

  • DRM-protected content can only have its audio delayed. The screen will appear black when attempting to delay DRM video.
  • Subtitles are delayed only for videos on YouTube and those using the JW Player

Installation Guide

Audio/Video Delay is built for Chromium-based browsers (Brave, Chrome, Edge, etc.). You can install it through the Chrome Web Store or by manually loading it into the browser. Use the latter process if you would like to modify the code or if you just like to guarantee what is running on your computer.

Chrome Web Store:

Audio/Video Delay is available here and can be installed like any other extension on the Chrome Web Store

Load Unpacked:

Audio/Video Delay can be manually loaded into the browser with the following steps:

  1. Download and unzip Audio-Video-Delay-2.4.6 from the latest GitHub release
  2. Visit the browser extensions page and turn on Developer mode
  3. Click "Load unpacked"
  4. Select the unzipped folder

Optional Font Download for Arch Linux:

Audio/Video Delay uses the Courier New and Brush Script MT fonts, which are not standard fonts on Linux. Use command yay -S ttf-ms-fonts to obtain these from the AUR.

Usage Guide

For the best experience with frame-perfect playback, enable graphics acceleration in your browser and set all displays to 60fps in your computer's settings. If any display is over 60fps, frame drift may occur and the delayed video may be choppy. Only use above 60fps if your computer has a dedicated graphics card or powerful integrated graphics and can maintain a locked framerate.

Enabling/Disabling the Extension

Enable or disable the extension by pressing the bottom button in the GUI. The current on/off state is reflected here.

Changing Delay Modes Between Audio and Video

Video is delayed by default. Delay audio instead by clicking the yellow "Video" button at the top of the GUI. It will change to a red "Audio" button, and clicking it will return the delay mode back to video.

Changing the Delay Amount

Input the desired delay (in milliseconds) in the middle box of the GUI; no page refresh is required.

If Screen Tearing Occurs

NVIDIA GPU users:

  • NVIDIA Control Panel -> Manage 3D Settings -> enable Vertical Sync in Global Settings or do so in Program Settings for your browser
  • Set all displays to 60fps, as the delay mechanism is fundamentally different for videos at 60fps and above 60fps
  • Follow potential fixes in the Intel section below
  • Roll back drivers with NVCleanstall if all else fails. If on gaming drivers, try studio drivers instead.
  • Send an email to support@cpb.dev with a description of your issues and I will help resolve them

AMD GPU/iGPU users:

  • AMD Adrenalin Software -> Gaming -> Display -> enable VRR

Intel GPU/iGPU users:

  • Experiment with resolution settings, disabling hardware acceleration in the browser (will reduce performance but will confirm it's a GPU issue), and having multiple displays active (moving the cursor to the display not containing the video may help)

Known Bugs

Normal Instagram post videos are inconsistent due to undetermined video caching logic

Release Notes

v2.4.6 - Fixed Plex bug where edges weren't fully covered by modifying how video size is determined

v2.4.5 - Bug fix for broken centering caused by v2.4.4

v2.4.4 - Canvas placement fix where delayed video was shifted underneath Bilibili player

v2.4.3 - Modify Plex logic to handle any Plex domain using element 2's ASCII art

v2.4.2 - Plex edge case handling, replaced Instagram Reels bandaid fix with proper solution

v2.4.1 - Resolved a bug which caused a black frame after switching tabs and restarting videos

v2.4.0 - Instagram Reels edge case handling, additional memory leak protections

v2.3.3 - Subtitle alignment fix for thumbnail-sized videos, logic fix for buffering videos, documentation updates

v2.3.2 - General optimization and logic fixes

v2.3.1 - Fallback to original frame queue method for displays over 60fps

v2.3.0 - Optimizations to reduce frame drift and GPU utilization spikes

v2.2.0 - Autogenerated and standard YouTube subtitle delay support

v2.1.0 - Removed fullscreen limitation, GUI behavior modifications

v2.0.0 - Audio delay implemented, GUI update, filename changes, subtitle bug fix

v1.2.1 - Subtitle logic changed to allow multiple styles per line

v1.2.0 - Better render efficiency and subtitle clarity at low resolutions

v1.1.2 - Subtitle bug fix

v1.1.1 - Chrome storage bug fix

v1.1.0 - Subtitle delay support implemented for videos using the JW Player

v1.0.0 - Video delay and UI foundation

About

Browser extension that Delays audio and video for synchronized playback

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors