Decrypted video lessons with size 250 to 300 bytes
Since the latest changes made to the script (a couple of months ago), I only get corrupted video files, with ridiculous size. If we talk only about this specific problem, the previous version of the script did not present this serious problem.
Expected Result
The script should download, decrypt and multiplex the playable video files for each of the lessons.
Branch
master/main
What operating systems are you seeing the problem on?
Linux/Unix, MacOS
Relevant log output
[02:25:33] [udemy-downloader] [parse_new:1632] INFO: > Processing lecture 05 of 371
[02:25:33] [udemy-downloader] [process_lecture:1448] INFO: > Lecture '05 Test' has DRM, attempting to download
[02:25:33] [udemy-downloader] [handle_segments:1211] INFO: > Downloading Lecture Tracks...
WARNING: You have asked for UNPLAYABLE formats to be listed/downloaded. This is a developer option intended for debugging.
If you experience any issues while using this option, DO NOT open a bug report
[generic] Extracting URL: file:///root/udemy-downloader/temp/index_42618910.mpd
[generic] index_42618910: Downloading webpage
WARNING: [generic] Forcing generic information extractor
[generic] index_42618910: Extracting information
[info] index_42618910: Downloading 2 format(s): 5, 6
[dashsegments] Total fragments: 4
[download] Destination: 33187966.encrypted.mp4
[download] 100% of 282.15KiB in 00:00:00 at 3.29MiB/s
[dashsegments] Total fragments: 20
[download] Destination: 33187966.encrypted.m4a
[download] 100% of 692.11KiB in 00:00:00 at 3.01MiB/s
[02:25:34] [udemy-downloader] [handle_segments:1236] INFO: > Lecture Tracks Downloaded
[02:25:34] [udemy-downloader] [handle_segments:1247] INFO: KID for video file is: 46e4d88a2ce54c34b86261ca5419015d
[02:25:34] [udemy-downloader] [handle_segments:1254] INFO: KID for audio file is: 46e4d88a2ce54c34b86261ca5419015d
[02:25:34] [udemy-downloader] [handle_segments:1293] INFO: > Merging video and audio, this might take a minute...
ffmpeg version 4.2.10 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 8 (GCC)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsrt --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55704647a900] Incorrect number of samples in encryption info
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55704647a900] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1920x1080, 131 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '33187966.encrypted.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1dash
creation_time : 2024-11-23T04:47:14.000000Z
Duration: 00:00:16.38, bitrate: 141 kb/s
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 1920x1080, 131 kb/s, SAR 1:1 DAR 16:9, 30 fps, 30k tbr, 30k tbn, 60k tbc (default)
Metadata:
creation_time : 2024-11-23T04:47:14.000000Z
handler_name : ETI ISO Video Media Handler
encoder : Elemental H.264
Side data:
unknown side data type 24 (3247 bytes)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5570464e3780] Found duplicated MOOV Atom. Skipped it
Last message repeated 3 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5570464e3780] Incorrect number of samples in encryption info
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '33187966.encrypted.m4a':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1dash
creation_time : 2024-11-23T04:47:15.000000Z
Duration: 00:00:16.39, bitrate: 345 kb/s
Stream #1:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 313 kb/s (default)
Metadata:
creation_time : 2024-11-23T04:47:15.000000Z
handler_name : ETI ISO Audio Media Handler
Side data:
unknown side data type 24 (16219 bytes)
[mp4 @ 0x5570465fe740] track 1: codec frame size is not set
Output #0, mp4, to '/root/udemy-downloader/out_dir/COURSE_NAME/01 - Pandas with DataFrames/33187966.mp4':
Metadata:
title : 05 Test
Stream #0:0: Video: h264 (avc1 / 0x31637661), none, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 131 kb/s, 30 fps, 30k tbr, 30k tbn, 30k tbc (default)
Side data:
unknown side data type 24 (3247 bytes)
Stream #0:1: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 313 kb/s (default)
Side data:
unknown side data type 24 (16219 bytes)
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5570464e3780] Incorrect number of samples in encryption info
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55704647a900] Incorrect number of samples in encryption info
33187966.encrypted.mp4: Invalid data found when processing input
frame= 0 fps=0.0 q=-1.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[02:25:34] [udemy-downloader] [handle_segments:1298] INFO: > Merging complete, renaming final file...
[02:25:34] [udemy-downloader] [handle_segments:1300] INFO: > Cleaning up temporary files...
...
What happened?
Decrypted video lessons with size 250 to 300 bytes
Since the latest changes made to the script (a couple of months ago), I only get corrupted video files, with ridiculous size. If we talk only about this specific problem, the previous version of the script did not present this serious problem.
Expected Result
The script should download, decrypt and multiplex the playable video files for each of the lessons.
Branch
master/main
What operating systems are you seeing the problem on?
Linux/Unix, MacOS
Relevant log output
Other information
I'm using: