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
131.25k stars 9.94k forks source link

Cannot download video from olympics.com/fr #30165

Open grysor opened 2 years ago

grysor commented 2 years ago

Hello i'm french ,i have a desktop PC with windows10 64 bits . I use youtube-dl v2021.06.06

I want to download this video in 1080p :

https://olympics.com/fr/video/men-s-109kg-group-a-weightlifting-tokyo-2020-replays

but impossible youtube-dl displays me this error in cmd :(

" [generic] men-s-109kg-group-a-weightlifting-tokyo-2020-replays: Requesting header WARNING: Falling back on generic information extractor. [generic] men-s-109kg-group-a-weightlifting-tokyo-2020-replays: Downloading webpage [generic] men-s-109kg-group-a-weightlifting-tokyo-2020-replays: Extracting information ERROR: Unsupported URL: https://olympics.com/fr/video/men-s-109kg-group-a-weightlifting-tokyo-2020-replays "

Is there a way to solve this problem? thanks in advance

ghost commented 2 years ago

olympics.com is not supported.

If you use browser's dev tools, you can find "manifest.m3u8" url which can be passed to youtube-dl. There is also a Firefox add-on "The Stream Detector" that will detect urls of streams and generate youtube-dl (or other tools) command. Please be aware that this manifest.m3u8 will expire in about a minute. You may need to reload the page and extract the url again.

Edit: yt-dlp seems to support olympics.com

grysor commented 2 years ago

olympics.com is not supported.

If you use browser's dev tools, you can find "manifest.m3u8" url which can be passed to youtube-dl. There is also a Firefox add-on "The Stream Detector" that will detect urls of streams and generate youtube-dl (or other tools) command. Please be aware that this manifest.m3u8 will expire in about a minute. You may need to reload the page and extract the url again.

Thank you for these info and for your i will try

I am novice, i apologize, but how, after having had the M3U8, pass it in youtube-dl to download the video in MP4 format? What is the process in cmd please?

grysor commented 2 years ago

@kikuyan yt-dlp thank you ,i found it, is it the last version? :

yt-dlp 2021.10.22 Windows 64-bit

Is it used exactly the same way that youtube-dl with CMD as i did?

grysor commented 2 years ago

edit :

I just tried yt-dlp by doing exactly the same method i had done with youtube-dl and it always gives an error unfortunately :(

" PS C:\WINDOWS\system32> cmd Microsoft Windows [version 10.0.19042.867] (c) 2019 Microsoft Corporation. Tous droits réservés.

C:\WINDOWS\system32>cd C:\Users***

C:\Users***>yt-dlp https://olympics.com/fr/video/men-s-109kg-group-a-weightlifting-tokyo-2020-replays [generic] men-s-109kg-group-a-weightlifting-tokyo-2020-replays: Requesting header WARNING: [generic] Falling back on generic information extractor. [generic] men-s-109kg-group-a-weightlifting-tokyo-2020-replays: Downloading webpage [generic] men-s-109kg-group-a-weightlifting-tokyo-2020-replays: Extracting information ERROR: [generic] Unsupported URL: https://olympics.com/fr/video/men-s-109kg-group-a-weightlifting-tokyo-2020-replays "

ghost commented 2 years ago

Sorry about yt-dlp, it doesn't seem to support all url form.

To download: • You need to have ffmpeg installed (for merge). • --hls-prefer-native option recommended (to continue download after some interruption), and you need to have pycryptodome (python module) installed for this to work. • -o "somefilename.%(ext)s" option recommended for output filename. Modify somefilename part. • Whole manifest.m3u8 url may need to be double quoted (url contains special characters). • youtube-dl "manifest.m3u8 url" --hls-prefer-native -o "somefilename.%(ext)s" will start download video (for this manifest.m3u8 url, 1080p) then audio, and merge to mp4. • If error occurs during download, reload the page, extract and replace manifest.m3u8 url and run youtube-dl again. youtube-dl will continue download in case --hls-prefer-native is effective.

dirkf commented 2 years ago

Maybe this YT video (2 hrs of the event) will do instead?

grysor commented 2 years ago

Thank you for your responses and your help! Waiting for your answers, i managed thanks to your help kikuyan in effect i installed your firefox add-on " The Stream Detector "

Then i copied the " manifest.m3u8 " version 1080p that found me the extension " The Stream Detector " :)

and i pasted it in cmd with youtube-dl But it did not work ,nothing to do

so then i did the same thing but with yt-dlp 2021.10.22 Windows 64-bit

And i had a mistake but it succeeded !!! :-D

C:\Users**>yt-dlp youtube-dl --no-part --restrict-filenames --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0" --referer "https://olympics.com/" "https://vod-b.olympicchannel.com/output/tok1000691/hdntl=exp=1635467934~acl=%2f~data=hdntl~hmac=f814135c8cc1962fd3ea28e8ee4400d9d31349935685ff8754a7b7eaccccd3dd/video_1920_6000000.m3u8?aka_me_session_id=AAAAAAAAAACeQnthAAAAAN+zdE0%2fT2HxqhMiozAQFGcQvgVdst0LmNUs9IxyQaY7YVWcYkBkTKxTaplk1d2gzaGZlv5OvDAh&aka_media_format_type=hls" ERROR: [generic] 'youtube-dl' is not a valid URL. Set --default-search "ytsearch" (or run yt-dlp "ytsearch:youtube-dl" ) to search YouTube [generic] video_1920_6000000: Requesting header [generic] video_1920_6000000: Downloading m3u8 information [info] video_1920_6000000: Downloading 1 format(s): 0 [hlsnative] Downloading m3u8 manifest [hlsnative] Total fragments: 1804 [download] Destination: video_1920_6000000-[video_1920_6000000].mp4 [download] 100% of 5.16GiB in 03:14:05

"

I will now check and pray that there is sound in the video :( because with another technique that i had done before i did not have any at all :(

grysor commented 2 years ago

edit @dirkf thank you for your youtube video too! She is great and complete! I had sought a little on youtube of course, but i had not found anything. I knew that protected videos, youTube removes them because of copyright unfortunately :(

edit : My video by yt-dlp : I am disgusted there is no sound at all, even problem i had before! PowerDVD tells me : " audio not supported " and by VLC no sound :(

Fortunately lucky you found me your video on youTube dirkf ! , thousand thank you i will quickly record it

grysor commented 2 years ago

Hello everyone The size of the video i downloaded yesterday with yt-dlp with link of " The Stream Detector " is 5,16go But the video in 1080p that i downloaded through your youtube link @dirkf does only 1,47go yet the length of the videos are exactly the same and are all 2 in mp4 format . So can someone explain to me how it is done because i do not understand?thank you

dirkf commented 2 years ago

The videos are encoded differently. Maybe if you put up the two videos on a 4k monitor you would see some spatial or temporal glitches in the smaller file, compared with the larger (but then again, maybe not).

grysor commented 2 years ago

The videos are encoded differently. Maybe if you put up the two videos on a 4k monitor you would see some spatial or temporal glitches in the smaller file, compared with the larger (but then again, maybe not).

thank you for your help and these info :)

nicolaasjan commented 2 years ago

@grysor Fixed in yt-dlp with https://github.com/yt-dlp/yt-dlp/pull/1483. Just wait for the next release or compile from the master branch. :)

yt-dlp -v --ignore-config https://olympics.com/fr/video/men-s-109kg-group-a-weightlifting-tokyo-2020-replays
[debug] Command-line config: ['-v', '--ignore-config', 'https://olympics.com/fr/video/men-s-109kg-group-a-weightlifting-tokyo-2020-replays']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, err UTF-8, pref UTF-8
[debug] yt-dlp version 2021.10.31 (zip)
[debug] Python version 3.6.9 (CPython 64bit) - Linux-5.4.0-89-generic-x86_64-with-LinuxMint-19.3-tricia
[debug] exe versions: ffmpeg N-104315-g148ada5577-Nico-20211011-With-VP9-Timestamp-Fix, ffprobe N-104315-g148ada5577-Nico-20211011-With-VP9-Timestamp-Fix
[debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [OlympicsReplay] Extracting URL: https://olympics.com/fr/video/men-s-109kg-group-a-weightlifting-tokyo-2020-replays
[OlympicsReplay] men-s-109kg-group-a-weightlifting-tokyo-2020-replays: Downloading webpage
[OlympicsReplay] f6a0753c-8e6f-4b7d-a435-027054a4f8e9: Downloading m3u8 url
[OlympicsReplay] f6a0753c-8e6f-4b7d-a435-027054a4f8e9: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] f6a0753c-8e6f-4b7d-a435-027054a4f8e9: Downloading 1 format(s): hls-6313+hls-audio_group-ENGLISH
WARNING: Requested formats are incompatible for merge and will be merged into mkv
[debug] Invoking downloader on "https://vod-b.olympicchannel.com/output/tok1000691/hdntl=exp=1635746476~acl=%2f*~data=hdntl~hmac=42704f952d52548d1131f37d326ab8768cf994e66d307c72619b3a39a23259f2/video_1920_6000000.m3u8?aka_me_session_id=AAAAAAAAAACsgn9hAAAAAM6oKGsbjkIEMmX3ctQ9QUT3Sr9bbRrGj+7KIT%2fhPJZZFzgSskCBhp3GX7btKzdoyLcQcXDEvPto&aka_media_format_type=hls"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 1804
[download] Destination: +109kg (H) Groupe A - Haltérophilie _ Replay de Tokyo 2020 [f6a0753c-8e6f-4b7d-a435-027054a4f8e9].fhls-6313.mp4
[download]   5.1% of ~5.15GiB at  8.37MiB/s ETA 15:49^C
ERROR: Interrupted by user