More settings to allow verbose for ffmpg
This commit is contained in:
@@ -263,9 +263,25 @@ Examples:
|
||||
dest="search_max",
|
||||
help="For pexels --search: maximum number of videos to download (default: 200)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--ffmpeg-log",
|
||||
type=str,
|
||||
default=None,
|
||||
dest="ffmpeg_log",
|
||||
choices=["quiet", "error", "warning", "info", "verbose", "debug", "trace"],
|
||||
help="Stream FFmpeg output at this -loglevel (e.g. 'verbose', 'debug') instead of the quiet progress bar",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# FFmpeg log verbosity for every ffmpeg run: an explicit --ffmpeg-log level
|
||||
# wins; otherwise -v turns on verbose streaming.
|
||||
from .preprocessor import set_ffmpeg_verbose, set_ffmpeg_loglevel
|
||||
if args.ffmpeg_log:
|
||||
set_ffmpeg_loglevel(args.ffmpeg_log)
|
||||
elif args.verbose:
|
||||
set_ffmpeg_verbose(True)
|
||||
|
||||
# Resolve project path (optional for 'pexels --search')
|
||||
action = args.action
|
||||
if args.project is None:
|
||||
|
||||
Reference in New Issue
Block a user