Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

ytdl python check video length

import youtube_dl

ydl_opts = {
  'outtmpl': 'tmp/%(id)s.%(ext)s',
  'prefer_ffmpeg': True,
  'forceduration':True
}

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    dictMeta = ydl.extract_info(
        "https://www.youtube.com/watch?v=t99ULJjCsaM",
        download=True)

dictMeta['entries'][0]['duration']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ytdl #python #check #video #length
ADD COMMENT
Topic
Name
8+3 =