mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-12-01 21:36:42 +02:00
@@ -20,7 +20,6 @@ from ..utils import (
|
||||
detect_exe_version,
|
||||
determine_ext,
|
||||
dfxp2srt,
|
||||
encodeArgument,
|
||||
filter_dict,
|
||||
float_or_none,
|
||||
is_outdated_version,
|
||||
@@ -235,14 +234,10 @@ class FFmpegPostProcessor(PostProcessor):
|
||||
raise PostProcessingError('ffprobe and ffmpeg not found. Please install or provide the path using --ffmpeg-location')
|
||||
try:
|
||||
if use_ffprobe:
|
||||
cmd = [
|
||||
self.probe_executable,
|
||||
encodeArgument('-show_streams')]
|
||||
cmd = [self.probe_executable, '-show_streams']
|
||||
basename = self.probe_basename
|
||||
else:
|
||||
cmd = [
|
||||
self.executable,
|
||||
encodeArgument('-i')]
|
||||
cmd = [self.executable, '-i']
|
||||
basename = self.basename
|
||||
cmd.append(self._ffmpeg_filename_argument(path))
|
||||
self.write_debug(f'{basename} command line: {shell_quote(cmd)}')
|
||||
@@ -278,11 +273,11 @@ class FFmpegPostProcessor(PostProcessor):
|
||||
|
||||
cmd = [
|
||||
self.probe_executable,
|
||||
encodeArgument('-hide_banner'),
|
||||
encodeArgument('-show_format'),
|
||||
encodeArgument('-show_streams'),
|
||||
encodeArgument('-print_format'),
|
||||
encodeArgument('json'),
|
||||
'-hide_banner',
|
||||
'-show_format',
|
||||
'-show_streams',
|
||||
'-print_format',
|
||||
'json',
|
||||
]
|
||||
|
||||
cmd += opts
|
||||
@@ -332,10 +327,10 @@ class FFmpegPostProcessor(PostProcessor):
|
||||
oldest_mtime = min(
|
||||
os.stat(path).st_mtime for path, _ in input_path_opts if path)
|
||||
|
||||
cmd = [self.executable, encodeArgument('-y')]
|
||||
cmd = [self.executable, '-y']
|
||||
# avconv does not have repeat option
|
||||
if self.basename == 'ffmpeg':
|
||||
cmd += [encodeArgument('-loglevel'), encodeArgument('repeat+info')]
|
||||
cmd += ['-loglevel', 'repeat+info']
|
||||
|
||||
def make_args(file, args, name, number):
|
||||
keys = [f'_{name}{number}', f'_{name}']
|
||||
@@ -346,9 +341,7 @@ class FFmpegPostProcessor(PostProcessor):
|
||||
args += self._configuration_args(self.basename, keys)
|
||||
if name == 'i':
|
||||
args.append('-i')
|
||||
return (
|
||||
[encodeArgument(arg) for arg in args]
|
||||
+ [self._ffmpeg_filename_argument(file)])
|
||||
return [*args, self._ffmpeg_filename_argument(file)]
|
||||
|
||||
for arg_type, path_opts in (('i', input_path_opts), ('o', output_path_opts)):
|
||||
cmd += itertools.chain.from_iterable(
|
||||
|
||||
Reference in New Issue
Block a user