Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for ffmpeg to handle colons in filenames #583

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions lib/svtplay_dl/postprocess/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def remux(self):
arguments = ["-map", "0:v", "-map", "0:a", "-c", "copy", "-copyts", "-f", "mp4"]
if ext == ".ts":
arguments += ["-bsf:a", "aac_adtstoasc"]
cmd = [self.detect, "-i", orig_filename]
cmd = [self.detect, "-i", "file:{0}".format(orig_filename)]

if self.merge_subtitle:
langs = self.sublanguage()
Expand All @@ -117,12 +117,12 @@ def remux(self):
if len(self.subfixes) >= 2:
for subfix in self.subfixes:
subfile = "{0}.srt".format(name + subfix)
cmd += ["-i", subfile]
cmd += ["-i", "file:{0}".format(subfile)]
else:
subfile = "{0}.srt".format(name)
cmd += ["-i", subfile]
cmd += ["-i", "file:{0}".format(subfile)]

arguments += ["-y", tempfile]
arguments += ["-y", "file:{0}".format(tempfile)]
cmd += arguments
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
stdout, stderr = p.communicate()
Expand Down Expand Up @@ -160,7 +160,7 @@ def merge(self):
name = os.path.splitext(orig_filename)[0]
audio_filename = u"{0}.m4a".format(name)
arguments = ["-c:v", "copy", "-c:a", "copy", "-f", "mp4"]
cmd = [self.detect, "-i", orig_filename, "-i", audio_filename]
cmd = [self.detect, "-i", "file:{0}".format(orig_filename), "-i", "file:{0}".format(audio_filename)]

if self.merge_subtitle:
langs = self.sublanguage()
Expand All @@ -169,12 +169,12 @@ def merge(self):
if len(self.subfixes) >= 2:
for subfix in self.subfixes:
subfile = "{0}.srt".format(name + subfix)
cmd += ["-i", subfile]
cmd += ["-i", "file:{0}".format(subfile)]
else:
subfile = "{0}.srt".format(name)
cmd += ["-i", subfile]
cmd += ["-i", "file:{0}".format(subfile)]

arguments += ["-y", tempfile]
arguments += ["-y", "file:{0}".format(tempfile)]
cmd += arguments
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
stdout, stderr = p.communicate()
Expand Down