I'm trying to download videos from youtube that are less than 10 minutes long. In order to exclude live streams I also passed the "!is_live" parameter but script completely ignores it.
the script is as follows:
ydl_opts = {
'format': 'mp4',
'quiet': True,
'postprocessors': [{'key': 'FFmpegFixupM3u8'}],
'noplaylist':'True',
'match_filter': youtube_dl.utils.match_filter_func("!is_live"),
'match_filter': youtube_dl.utils.match_filter_func("!live"),
'match_filter': youtube_dl.utils.match_filter_func("filesize"),
'match_filter': youtube_dl.utils.match_filter_func("duration < 600"),
'outtmpl': "video"+ "/" + "adidas" + "/%(title)s.%(ext)s"
}
with YoutubeDL(ydl_opts) as ydl:
video = ydl.extract_info(f"ytsearch5}:adidas", download=True)['entries'][0]
But each time I run the code it starts to download livestream, currently this one
THe !live and filesize are options found on reddit thread as a possible workaround but IRL that doesnt help at all.
Youtubedl version: 2021.6.6 Python version: 3.9.4