Use file: URI to not let ffmpeg fall over with colons in names
This commit is contained in:
parent
3415f9acf2
commit
0457582ed5
|
@ -34,8 +34,8 @@ def has_audio_not_in_lang(meta: Dict[str, Any], lang: str) -> bool:
|
|||
|
||||
def make_dubstrip_command(
|
||||
file: Path, outfile: Path, meta: Dict[str, Any], keep_lang: str
|
||||
) -> List[Union[str, Path]]:
|
||||
cmd = ["ffmpeg", "-nostdin", "-i", file, "-map", "0"]
|
||||
) -> List[str]:
|
||||
cmd = ["ffmpeg", "-nostdin", "-i", f"file:{file}", "-map", "0"]
|
||||
|
||||
for stream in meta["streams"]:
|
||||
if stream["codec_type"] == "audio":
|
||||
|
@ -44,7 +44,7 @@ def make_dubstrip_command(
|
|||
cmd += ["-map", f"-0:{idx}"]
|
||||
|
||||
# Only remux; don't recode.
|
||||
cmd += ["-c", "copy", outfile]
|
||||
cmd += ["-c", "copy", f"file:{outfile}"]
|
||||
|
||||
return cmd
|
||||
|
||||
|
|
|
@ -28,13 +28,13 @@ class DubstripTestCase(unittest.TestCase):
|
|||
"ffmpeg",
|
||||
"-nostdin",
|
||||
"-i",
|
||||
fin,
|
||||
"file:a.mkv",
|
||||
"-map",
|
||||
"0",
|
||||
"-map",
|
||||
"-0:1",
|
||||
"-c",
|
||||
"copy",
|
||||
fout,
|
||||
"file:b.mkv",
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue