mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-29 03:23:02 +00:00
FFmpegPostProcessor: print the command line used if the --verbose option is given
This commit is contained in:
parent
b4cdc245cf
commit
4eb7f1d12e
2 changed files with 7 additions and 0 deletions
|
@ -83,6 +83,8 @@ def run_ffmpeg_multiple_files(self, input_paths, out_path, opts):
|
||||||
+ opts +
|
+ opts +
|
||||||
[encodeFilename(self._ffmpeg_filename_argument(out_path))])
|
[encodeFilename(self._ffmpeg_filename_argument(out_path))])
|
||||||
|
|
||||||
|
if self._downloader.params.get('verbose', False):
|
||||||
|
self._downloader.to_screen(u'[debug] ffmpeg command line: %s' % shell_quote(cmd))
|
||||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
stdout,stderr = p.communicate()
|
stdout,stderr = p.communicate()
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
import json
|
import json
|
||||||
import locale
|
import locale
|
||||||
import os
|
import os
|
||||||
|
import pipes
|
||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
|
@ -927,3 +928,7 @@ def write(self, *args):
|
||||||
|
|
||||||
def read(self, *args):
|
def read(self, *args):
|
||||||
return self.f.read(*args)
|
return self.f.read(*args)
|
||||||
|
|
||||||
|
|
||||||
|
def shell_quote(args):
|
||||||
|
return ' '.join(map(pipes.quote, args))
|
||||||
|
|
Loading…
Reference in a new issue