mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-04-23 14:17:46 -04:00
Added option to always use audio track for subtitle syncing
This commit is contained in:
parent
741a8172b2
commit
c622e1f710
4 changed files with 15 additions and 1 deletions
|
@ -219,7 +219,8 @@ defaults = {
|
|||
'subsync_threshold': '90',
|
||||
'use_subsync_movie_threshold': 'False',
|
||||
'subsync_movie_threshold': '70',
|
||||
'debug': 'False'
|
||||
'debug': 'False',
|
||||
'force_audio': 'False'
|
||||
},
|
||||
'series_scores': {
|
||||
"hash": 359,
|
||||
|
|
|
@ -54,6 +54,10 @@ class SubSyncer:
|
|||
try:
|
||||
unparsed_args = [self.reference, '-i', self.srtin, '-o', self.srtout, '--ffmpegpath', self.ffmpeg_path,
|
||||
'--vad', self.vad, '--log-dir-path', self.log_dir_path]
|
||||
if settings.subsync.getboolean('force_audio'):
|
||||
unparsed_args.append('--no-fix-framerate ')
|
||||
unparsed_args.append('--reference-stream')
|
||||
unparsed_args.append('a:0')
|
||||
if settings.subsync.getboolean('debug'):
|
||||
unparsed_args.append('--make-test-case')
|
||||
parser = make_parser()
|
||||
|
|
|
@ -364,6 +364,14 @@ const SettingsSubtitlesView: FunctionComponent = () => {
|
|||
<Text placeholder="0777" settingKey="settings-general-chmod"></Text>
|
||||
<Message>Must be 4 digit octal</Message>
|
||||
</CollapseBox>
|
||||
<Check
|
||||
label="Always use Audio Track as Reference for Syncing"
|
||||
settingKey="settings-subsync-force_audio"
|
||||
></Check>
|
||||
<Message>
|
||||
Use the audio track as reference for syncing, instead of using the
|
||||
embedded subtitle.
|
||||
</Message>
|
||||
<Check
|
||||
label="Automatic Subtitles Synchronization"
|
||||
settingKey="settings-subsync-use_subsync"
|
||||
|
|
1
frontend/src/types/settings.d.ts
vendored
1
frontend/src/types/settings.d.ts
vendored
|
@ -111,6 +111,7 @@ declare namespace Settings {
|
|||
use_subsync_movie_threshold: boolean;
|
||||
subsync_movie_threshold: number;
|
||||
debug: boolean;
|
||||
force_audio: boolean;
|
||||
}
|
||||
|
||||
interface Analytic {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue