mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 05:13:16 -07:00
Merge pull request #516 from roderickvd/nightly
Fix subtitle extraction with multiple streams
This commit is contained in:
commit
f72beab92f
1 changed files with 2 additions and 1 deletions
|
@ -401,6 +401,7 @@ def extract_subs(file, newfilePath, bitbucket):
|
||||||
num = len(subStreams)
|
num = len(subStreams)
|
||||||
for n in range(num):
|
for n in range(num):
|
||||||
sub = subStreams[n]
|
sub = subStreams[n]
|
||||||
|
idx = sub["index"]
|
||||||
try:
|
try:
|
||||||
lan = sub["tags"]["language"]
|
lan = sub["tags"]["language"]
|
||||||
except:
|
except:
|
||||||
|
@ -415,7 +416,7 @@ def extract_subs(file, newfilePath, bitbucket):
|
||||||
if os.path.isfile(outputFile):
|
if os.path.isfile(outputFile):
|
||||||
outputFile = os.path.join(subdir, "%s.%s.%s.srt" %(name, lan, n))
|
outputFile = os.path.join(subdir, "%s.%s.%s.srt" %(name, lan, n))
|
||||||
|
|
||||||
command = [nzbtomedia.FFMPEG, '-loglevel', 'warning', '-i', file, '-vn', '-an', '-codec:s:' + str(n), 'srt', outputFile]
|
command = [nzbtomedia.FFMPEG, '-loglevel', 'warning', '-i', file, '-vn', '-an', '-codec:' + str(idx), 'srt', outputFile]
|
||||||
if platform.system() != 'Windows':
|
if platform.system() != 'Windows':
|
||||||
command = nzbtomedia.NICENESS + command
|
command = nzbtomedia.NICENESS + command
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue