ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.43k stars 10.04k forks source link

Downloaded oreilly video are cutting off at 1:00 #22166

Closed alex131290 closed 5 years ago

alex131290 commented 5 years ago

Checklist

Verbose log

Downloads youtube-dl --cookies cookies.txt "https://learning.oreilly.com/videos/kubernetes-in-7/9781789130881" -i -c  --no-warnings --console-title -o '%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s' --verbose --embed-subs
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--cookies', u'cookies.txt', u'https://learning.oreilly.com/videos/kubernetes-in-7/9781789130881', u'-i', u'-c', u'--no-warnings', u'--console-title', u'-o', u'%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s', u'--verbose', u'--embed-subs']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.08.13
[debug] Python version 2.7.10 (CPython) - Darwin-18.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.1.4, ffprobe 4.1.4, rtmpdump 2.4
[debug] Proxy map: {}
[safari:course] 9781789130881: Downloading course JSON
[download] Downloading playlist: Kubernetes in 7 Days
[safari:course] playlist Kubernetes in 7 Days: Collected 38 video ids (downloading 38 of them)
[download] Downloading video 1 of 38
[safari:api] 9781789130881/video1_1: Downloading part JSON
[safari] 9781789130881-video1_1: Downloading webpage
[Kaltura] 9781789130881-video1_1: Downloading webpage
[Kaltura] 0_5mc5w6zl: Downloading video info JSON
[Kaltura] 0_5mc5w6zl: Checking mp4-527 URL
[Kaltura] 0_5mc5w6zl: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'http://cdnapi.kaltura.com/p/1926081/sp/192608100/playManifest/entryId/0_5mc5w6zl/format/url/protocol/http/flavorId/0_3whwvu2q'
[download] Destination: Kubernetes in 7 Days/01-Course overview.mp4
[download] 100% of 3.57MiB in 00:00
[ffmpeg] There aren't any subtitles to embed
[download] Downloading video 2 of 38
[safari:api] 9781789130881/video1_2: Downloading part JSON
[safari] 9781789130881-video1_2: Downloading webpage
[Kaltura] 9781789130881-video1_2: Downloading webpage
[Kaltura] 0_w9ql00fd: Downloading video info JSON
[Kaltura] 0_w9ql00fd: Checking mp4-552 URL
[Kaltura] 0_w9ql00fd: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'http://cdnapi.kaltura.com/p/1926081/sp/192608100/playManifest/entryId/0_w9ql00fd/format/url/protocol/http/flavorId/0_1wgqhawo'
[download] Destination: Kubernetes in 7 Days/02-Installing the Pre-reqs.mp4
[download] 100% of 1.83MiB in 00:00
[ffmpeg] There aren't any subtitles to embed

Description

Videos which are downloaded from Oreilly, for example this course https://learning.oreilly.com/videos/kubernetes-in-7/9781789130881, are being cut off at 1:00 minute, all the videos are longer than 1 minute.

I have ffmpeg installed

Downloads which ffmpeg
/usr/local/bin/ffmpeg

ffmpeg -version
ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.4_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
libavutil      56. 22.100 / 56. 22.100
libavcodec     58. 35.100 / 58. 35.100
libavformat    58. 20.100 / 58. 20.100
libavdevice    58.  5.100 / 58.  5.100
libavfilter     7. 40.101 /  7. 40.101
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  3.100 /  5.  3.100
libswresample   3.  3.100 /  3.  3.100
libpostproc    55.  3.100 / 55.  3.100

I don't have any configuration, only the parameters which i'm providing through the CLI. My logon to oreilly is through the organisation where i'm working at, so i'm passing the --cookies option, i've downloaded the cookies file through the Chrome browser using the

cookies.txt extension

https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg

More debug info, i've executed the command without actually downloading the videos, just printing the length and title so you can see that the length in more than 1 minute

 Downloads youtube-dl --cookies cookies.txt "https://learning.oreilly.com/videos/kubernetes-in-7/9781789130881" -i -c  --no-warnings --console-title -o '%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s' --verbose --prefer-ffmpeg --ffmpeg-location /Users/abrodov/Downloads/ffmpeg-4.1-32bit-static -s --get-duration --get-filename --get-id --get-title
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--cookies', u'cookies.txt', u'https://learning.oreilly.com/videos/kubernetes-in-7/9781789130881', u'-i', u'-c', u'--no-warnings', u'--console-title', u'-o', u'%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s', u'--verbose', u'--prefer-ffmpeg', u'--ffmpeg-location', u'/Users/abrodov/Downloads/ffmpeg-4.1-32bit-static', u'-s', u'--get-duration', u'--get-filename', u'--get-id', u'--get-title']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.08.13
[debug] Python version 2.7.10 (CPython) - Darwin-18.7.0-x86_64-i386-64bit
[debug] exe versions: rtmpdump 2.4
[debug] Proxy map: {}
[debug] Default format spec: bestvideo+bestaudio/best
Course overview
0_5mc5w6zl
Kubernetes in 7 Days/01-Course overview.mp4
3:23
[debug] Default format spec: bestvideo+bestaudio/best
Installing the Pre-reqs
0_w9ql00fd
Kubernetes in 7 Days/02-Installing the Pre-reqs.mp4
4:58
[debug] Default format spec: bestvideo+bestaudio/best
Creating a Cluster with Minikube
0_4rahamea
Kubernetes in 7 Days/03-Creating a Cluster with Minikube.mp4
3:33
alex131290 commented 5 years ago

@dstftw Would you be able to provide the link of the duplicate issue?

I found only one issue which is related to it, #2045 , this issue was closed due to login issue, in my case there's no login issue, i'm providing the cookies file which i'm downloading.

btous commented 3 years ago

Hi alex131290,

I had the same problem trying to login throw the cookies. The solution was to just add a random credentials for the user and password parameters like the example below:

-u someuser
-p somepassword
--cookies /path/to/cookies/file.txt

Hope it will be helpful

greatpilaf commented 2 years ago

I had the same problem, all the downloaded videos had a maximum duration of 1:00, the solution for me was to add the username and password as parameters, not with the cookies file.

youtube-dl -u <username> -p <password> --verbose <link>