prefer video+audio files, debug postprocessor hook

This commit is contained in:
Barbara Miller 2022-03-21 13:28:08 -07:00
parent 7ea7e543a6
commit d67a05572d

View File

@ -224,7 +224,8 @@ def _build_youtube_dl(worker, destdir, site):
def ydl_postprocess_hook(d):
if d['status'] == 'finished':
print('[ydl_postprocess_hook] Done postprocessing')
if worker._using_warcprox(site):
print('[ydl_postprocess_hook] {}'.format(d['postprocessor']))
if d['postprocessor'] == 'ffmpeg' and worker._using_warcprox(site):
_YoutubeDL._push_stitched_up_vid_to_warcprox(_YoutubeDL, site, d['info_dict'])
ydl_opts = {
@ -247,6 +248,7 @@ def _build_youtube_dl(worker, destdir, site):
# "If --prefer-free-formats is used, the order changes to opus > ogg > webm > m4a > mp3 > aac."
# "ext: Equivalent to vext,aext"
"format_sort": ["ext"],
"format": "b/bv+ba",
# --cache-dir local or...
"cache_dir": False,