yt-dlp / yt-dlp

A feature-rich command-line audio/video downloader
https://discord.gg/H5MNcFW63r
The Unlicense
89.88k stars 6.97k forks source link

Facebook format table resolution issue #11384

Closed DreanoLucas closed 2 weeks ago

DreanoLucas commented 2 weeks ago

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

Checklist

Region

No response

Provide a description that is worded well enough to be understood

The same resolution is displayed for each format of the same video, even though on Facebook, you can see different resolutions that do not match the output from YT-DLP. For this link, https://fb.watch/vv4KcJ16Ft/, we get seven instances of 1280x720, while it should show different resolutions for each result.

Provide verbose output that clearly demonstrates the problem

Complete Verbose Output

yt-dlp.exe -vU -F https://fb.watch/vv4KcJ16Ft/
[debug] Command-line config:
https://fb.watch/vv4KcJ16Ft/']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version nightly@2024.10.27.232921 from yt-dlp/yt-dlp-nightly-builds [330335386] (win_exe)
[debug] Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.0.19045-SPO (OpenSSL 1.1.1t 7 Feb 2023)
[debug] exe versions : none 
[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.08.30, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.40.1, urllib3-2.2.3, websockets-13.1
[debug] Proxy map: (}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1837 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.10.27.232921 from yt-dlp/yt-dlp-nightly-builds yt-dlp is up to date (nightly@2024.10.27.232921 from yt-dlp/yt-dlp-nightly-builds)
[generic] Extracting URL: https://fb.watch/vv4KcJ16Ft/
[generic] vv4KcJ16Ft: Downloading webpage
[redirect] Following redirect to https://www.facebook.com/WataugaOnline/videos/1000688475075983/?share_url=https%3A%2F%2Ffb.watch%2Fvv4KcJ16Ft%2F
Extracting URL: https://www.facebook.com/Watauga0nline/videos/1000688475075983/?share_ur]=https%3A%2F%2Ffb.watch%2Fvv4KcJ16Ft%2F
[facebook] 1000688475075983: Downloading webpage
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec-vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[info] Available formats for 1000688475075983:
bashonly commented 2 weeks ago

try passing the user-agent of your browser with --user-agent

bashonly commented 2 weeks ago

and show the output with -vF

DreanoLucas commented 2 weeks ago

and show the output with -vF

[debug] Command-line config: ['-vF', '--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0', 'https://fb.watch/vv4KcJl6Ft/'] [debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version nightly@2024.10.27.232921 from yt-dlp/yt-dlp-nightly-builds [330335386] (win_exe) [debug] Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1t 7 Feb 2023) [debug] exe versions: none [debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.08.30, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.40.1, urllib3-2.2.3, websockets-13.1 [debug] Proxy map: {} [debug] Request Handlers: urllib, requests, websockets, curl_cffi [debug] Loaded 1837 extractors [generic] Extracting URL: https://fb.watch/vv4KcJl6Ft/ [generic] vv4KcJl6Ft: Downloading webpage [redirect] Following redirect to https://www.facebook.com/WataugaOnline/videos/1000688475075983/?share_url=https%3A%2F%2Ffb.watch%2Fvv4KcJl6Ft%2F [facebook] Extracting URL: https://www.facebook.com/WataugaOnline/videos/1000688475075983/?share_url=https%3A%2F%2Ffb.watch%2Fvv4KcJl6Ft%2F [facebook] 1000688475075983: Downloading webpage [debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id [info] Available formats for 1000688475075983:

DreanoLucas commented 2 weeks ago

and show the output with -vF

[debug] Command-line config: ['-vF', '--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0', 'https://fb.watch/vv4KcJl6Ft/'] [debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version nightly@2024.10.27.232921 from yt-dlp/yt-dlp-nightly-builds [330335386] (win_exe) [debug] Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1t 7 Feb 2023) [debug] exe versions: none [debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.08.30, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.40.1, urllib3-2.2.3, websockets-13.1 [debug] Proxy map: {} [debug] Request Handlers: urllib, requests, websockets, curl_cffi [debug] Loaded 1837 extractors [generic] Extracting URL: https://fb.watch/vv4KcJl6Ft/ [generic] vv4KcJl6Ft: Downloading webpage [redirect] Following redirect to https://www.facebook.com/WataugaOnline/videos/1000688475075983/?share_url=https%3A%2F%2Ffb.watch%2Fvv4KcJl6Ft%2F [facebook] Extracting URL: https://www.facebook.com/WataugaOnline/videos/1000688475075983/?share_url=https%3A%2F%2Ffb.watch%2Fvv4KcJl6Ft%2F [facebook] 1000688475075983: Downloading webpage [debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id [info] Available formats for 1000688475075983:

Same result with the user agent

bashonly commented 2 weeks ago

you didn't post the actual formats table?

kclauhk commented 2 weeks ago

The resolution list of this video webpage is fake (may be site changes in progress) You can check it by following the steps below:

  1. open https://fb.watch/vv4KcJl6Ft/ in browser WITHOUT login facebook (you ran yt-dlp without facebook login)

  2. pause playback

  3. launch developer tool, open the "Network" tab then clear the log

  4. choose 640p

  5. you get new lines in the network log

  6. look for the URL similar to this (type is "fetch" in chrome or "mp4" in firefox): https://video.fhkg3-1.fna.fbcdn.net/v/t39.25447-2/463483456_2922988664517678_2013884078709851073_n.mp4?_nc_cat=100&ccb=1-7&_nc_sid=9a5d50&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfcjJhdjEtcjFnZW4ydnA5X3E4MCIsInZpZGVvX2lkIjoxMDAwNjg4NDc1MDc1OTgzfQ%3D%3D&_nc_e2o=1000688475075983&_nc_ohc=adkQeTOILx8Q7kNvgH2RLm3&_nc_zt=28&_nc_ht=video.fhkg3-1.fna&_nc_gid=AnxIHgw6KJD0xp59hiy0VMN&oh=00_AYAJVklTSYZVPNrfCsdUKa08l3pvDJ4Idg8o2c1Hmr2b4A&oe=6725A255&bytestart=0&byteend=825 (your URL will not be the same as this due to different timestamp and location)

  7. remove the bytestart and byteend parameters at the end of the url

  8. open the url in browser and right-click to save the video

  9. check the resolution of the saved video. You get 1280x720

  10. choose 480p

  11. repeat the step 5-9 above the URL looks like this: https://video.fhkg3-1.fna.fbcdn.net/v/t39.25447-2/463391795_4001208383478235_3494695673428672294_n.mp4?_nc_cat=104&ccb=1-7&_nc_sid=9a5d50&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfcjJhdjEtcjFnZW4ydnA5X3E2MCIsInZpZGVvX2lkIjoxMDAwNjg4NDc1MDc1OTgzfQ%3D%3D&_nc_e2o=1000688475075983&_nc_ohc=buevBAQV354Q7kNvgGHnrlJ&_nc_zt=28&_nc_ht=video.fhkg3-1.fna&_nc_gid=AnxIHgw6KJD0xp59hiy0VMN&oh=00_AYDPl5RlOqWbzsVCHUIZMg5eUyYtV1Ux_9DT2mS3u81tJw&oe=6725B771&bytestart=0&byteend=825 which is also a 1280x720 video

  12. choose 240p

  13. repeat step 5-9 above the URL looks like this: https://video.fhkg3-1.fna.fbcdn.net/v/t39.25447-2/463366874_567428675707391_862087812479695912_n.mp4?_nc_cat=109&ccb=1-7&_nc_sid=9a5d50&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfcjJhdjEtcjFnZW4ydnA5X3EzMCIsInZpZGVvX2lkIjoxMDAwNjg4NDc1MDc1OTgzfQ%3D%3D&_nc_e2o=1000688475075983&_nc_ohc=NvuFjs3eJEcQ7kNvgHGXE3s&_nc_zt=28&_nc_ht=video.fhkg3-1.fna&_nc_gid=AnxIHgw6KJD0xp59hiy0VMN&oh=00_AYC3osQGvDtEFpmnQaSUC0rE4jPMlLH3_vYyxluU5Z73ZA&oe=67258E16&bytestart=1113052&byteend=1212997 It is a 1280x720 video too

For https://fb.watch/vv4KcJl6Ft/, all resolutions are served by a 720p video (but not the same 720p video). The output of yt-dlp is correct.

If you perform the above check on another video, such as https://www.facebook.com/radiokicksfm/videos/3676516585958356/, you will download videos with different resolutions (720p and 360p for this example)