Improved subtitles synchronization by using webrtcvad if available.

pull/1101/head
Louis Vézina 4 years ago
parent 3336cea3d0
commit 0209d1558a

@ -47,7 +47,7 @@ import logging
# deploy requirements.txt
if not args.no_update:
try:
import lxml, numpy
import lxml, numpy, webrtcvad
except ImportError:
try:
import pip

@ -16,7 +16,12 @@ class SubSyncer:
self.srtout = None
self.ffmpeg_path = None
self.args = None
self.vad = 'subs_then_auditok'
try:
import webrtcvad
except ImportError:
self.vad = 'subs_then_auditok'
else:
self.vad = 'subs_then_webrtc'
self.log_dir_path = os.path.join(args.config_dir, 'log')
def sync(self, video_path, srt_path, srt_lang, media_type, sonarr_series_id=None, sonarr_episode_id=None,

@ -1,2 +1,3 @@
lxml>=4.3.0
numpy>=1.12.0
webrtcvad-wheels>=2.0.10
Loading…
Cancel
Save