From a25ad7c94792669bb08475948e33b595a4ad95b8 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 29 Jul 2023 10:58:52 +0200 Subject: [PATCH] revert 8c977 wrong format, use b:v instead of vb, b:a instead of ab, no speed for 1st pass vp9 --- pandora/archive/extract.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pandora/archive/extract.py b/pandora/archive/extract.py index fc5d00c01..3a66d54ae 100644 --- a/pandora/archive/extract.py +++ b/pandora/archive/extract.py @@ -219,7 +219,7 @@ def stream(video, target, profile, info, audio_track=0, flags={}): bitrate = height*width*fps*bpp/1000 video_settings = trim + [ - '-vb', '%dk' % bitrate, + '-b:v', '%dk' % bitrate, '-aspect', aspect, # '-vf', 'yadif', '-max_muxing_queue_size', '512', @@ -286,7 +286,7 @@ def stream(video, target, profile, info, audio_track=0, flags={}): ac = min(ac, audiochannels) audio_settings += ['-ac', str(ac)] if audiobitrate: - audio_settings += ['-ab', audiobitrate] + audio_settings += ['-b:a', audiobitrate] if format == 'mp4': audio_settings += ['-c:a', 'aac', '-strict', '-2'] elif audio_codec == 'libopus': @@ -319,11 +319,12 @@ def stream(video, target, profile, info, audio_track=0, flags={}): pass1_post = post[:] pass1_post[-1] = '/dev/null' if format == 'webm': - pass1_post = ['-speed', '4'] + pass1_post + if video_codec != 'libvpx-vp9': + pass1_post = ['-speed', '4'] + pass1_post post = ['-speed', '1'] + post - cmds.append(base + ['-an', '-v:pass', '1', '-passlogfile', '%s.log' % target] + cmds.append(base + ['-an', '-pass', '1', '-passlogfile', '%s.log' % target] + video_settings + pass1_post) - cmds.append(base + ['-v:pass', '2', '-passlogfile', '%s.log' % target] + cmds.append(base + ['-pass', '2', '-passlogfile', '%s.log' % target] + audio_settings + video_settings + post) else: cmds.append(base + audio_settings + video_settings + post)