Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[reddit] Does not get the best video resolution available #3712

Closed
rEnr3n opened this issue Feb 28, 2023 · 5 comments
Closed

[reddit] Does not get the best video resolution available #3712

rEnr3n opened this issue Feb 28, 2023 · 5 comments

Comments

@rEnr3n
Copy link

rEnr3n commented Feb 28, 2023

Downloading a reddit video using yt-dlp gives me a video with a resolution of 608x1080.

$ yt-dlp -v --ignore-config https://www.reddit.com/r/twicemedia/comments/11aq54q/funny_jeongyeon_momo_moment/
[debug] Command-line config: ['-v', '--ignore-config', 'https://www.reddit.com/r/twicemedia/comments/11aq54q/funny_jeongyeon_momo_moment/']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.02.17 [a0a7c01]
[debug] Python 3.10.9 (CPython x86_64 64bit) - Linux-6.1.12-arch1-1-x86_64-with-glibc2.37 (OpenSSL 3.0.8 7 Feb 2023, glibc 2.37)
[debug] exe versions: ffmpeg 5.1.2 (setts), ffprobe 5.1.2
[debug] Optional libraries: Cryptodome-3.12.0, brotlicffi-1.0.9.2, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1782 extractors
[Reddit] Extracting URL: https://www.reddit.com/r/twicemedia/comments/11aq54q/funny_jeongyeon_momo_moment/
[Reddit] 11aq54q: Downloading JSON metadata
[Reddit] 11aq54q: Downloading m3u8 information
[Reddit] 11aq54q: Downloading MPD manifest
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] y6kov843q4ka1: Downloading 1 format(s): fallback+dash-audio_0_131792
[debug] Invoking http downloader on "https://v.redd.it/y6kov843q4ka1/DASH_1080.mp4?source=fallback"
[download] Destination: Funny Jeongyeon & Momo moment [y6kov843q4ka1].ffallback.mp4
[download] 100% of    8.17MiB in 00:00:02 at 3.24MiB/s
[debug] Invoking http downloader on "https://v.redd.it/y6kov843q4ka1/DASH_audio.mp4"
[download] Destination: Funny Jeongyeon & Momo moment [y6kov843q4ka1].fdash-audio_0_131792.m4a
[download] 100% of  245.49KiB in 00:00:01 at 147.50KiB/s
[Merger] Merging formats into "Funny Jeongyeon & Momo moment [y6kov843q4ka1].mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:Funny Jeongyeon & Momo moment [y6kov843q4ka1].ffallback.mp4' -i 'file:Funny Jeongyeon & Momo moment [y6kov843q4ka1].fdash-audio_0_131792.m4a' -c copy -map 0:v:0 -map 1:a:0 -movflags +faststart 'file:Funny Jeongyeon & Momo moment [y6kov843q4ka1].temp.mp4'
Deleting original file Funny Jeongyeon & Momo moment [y6kov843q4ka1].ffallback.mp4 (pass -k to keep)
Deleting original file Funny Jeongyeon & Momo moment [y6kov843q4ka1].fdash-audio_0_131792.m4a (pass -k to keep)

Doing the same with gallery-dl gives me a video with 406x720.

$ gallery-dl -v --ignore-config https://www.reddit.com/r/twicemedia/comments/11aq54q/funny_jeongyeon_momo_moment/
[gallery-dl][debug] Version 1.24.5
[gallery-dl][debug] Python 3.10.9 - Linux-6.1.12-arch1-1-x86_64-with-glibc2.37
[gallery-dl][debug] requests 2.28.2 - urllib3 1.26.12
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting DownloadJob for 'https://www.reddit.com/r/twicemedia/comments/11aq54q/funny_jeongyeon_momo_moment/'
[reddit][debug] Using RedditSubmissionExtractor for 'https://www.reddit.com/r/twicemedia/comments/11aq54q/funny_jeongyeon_momo_moment/'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): oauth.reddit.com:443
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/11aq54q/.json?limit=0&raw_json=1 HTTP/1.1" 200 2161
[downloader.ytdl][debug] [generic] Extracting URL: https://v.redd.it/y6kov843q4ka1/DASHPlaylist.mpd?a=1680156621%2CMTFkMmVlMWYwZGU2OTEyMDVmNjMwN2RjN...mQ2ZA%3D%3D&v=1&f=sd
[downloader.ytdl][debug] [generic] DASHPlaylist: Downloading webpage
[downloader.ytdl][warning] [generic] Falling back on generic information extractor
[downloader.ytdl][debug] [generic] DASHPlaylist: Extracting information
./gallery-dl/reddit/twicemedia/11aq54q Funny Jeongyeon & Momo moment.mp4[downloader.ytdl][debug] [download] Destination: ./gallery-dl/reddit/twicemedia/11aq54q Funny Jeongyeon & Momo moment.fvideo_2284519.mp4
[downloader.ytdl][debug] [download]   0.0% of    4.18MiB at   40.57KiB/s ETA 01:45
[downloader.ytdl][debug] [download]   0.1% of    4.18MiB at  111.29KiB/s ETA 00:38
[downloader.ytdl][debug] [download]   0.2% of    4.18MiB at  247.31KiB/s ETA 00:17
[downloader.ytdl][debug] [download]   0.4% of    4.18MiB at  506.36KiB/s ETA 00:08
[downloader.ytdl][debug] [download]   0.7% of    4.18MiB at  465.11KiB/s ETA 00:09
[downloader.ytdl][debug] [download]   1.5% of    4.18MiB at  238.67KiB/s ETA 00:17
[downloader.ytdl][debug] [download]   3.0% of    4.18MiB at  268.86KiB/s ETA 00:15
[downloader.ytdl][debug] [download]   6.0% of    4.18MiB at  384.88KiB/s ETA 00:10
[downloader.ytdl][debug] [download]  12.0% of    4.18MiB at  643.54KiB/s ETA 00:05
[downloader.ytdl][debug] [download]  23.9% of    4.18MiB at 1012.23KiB/s ETA 00:03
[downloader.ytdl][debug] [download]  47.9% of    4.18MiB at    1.63MiB/s ETA 00:01
[downloader.ytdl][debug] [download]  95.8% of    4.18MiB at    2.76MiB/s ETA 00:00
[downloader.ytdl][debug] [download] 100.0% of    4.18MiB at    2.86MiB/s ETA 00:00
[downloader.ytdl][debug] [download] 100% of    4.18MiB in 00:00:02 at 1.96MiB/s
[downloader.ytdl][debug] [download] Destination: ./gallery-dl/reddit/twicemedia/11aq54q Funny Jeongyeon & Momo moment.faudio_0_131792.m4a
[downloader.ytdl][debug] [download]   0.4% of  245.49KiB at   44.19KiB/s ETA 00:05
[downloader.ytdl][debug] [download]   1.2% of  245.49KiB at  125.48KiB/s ETA 00:01
[downloader.ytdl][debug] [download]   2.9% of  245.49KiB at  274.62KiB/s ETA 00:00
[downloader.ytdl][debug] [download]   6.1% of  245.49KiB at  561.74KiB/s ETA 00:00
[downloader.ytdl][debug] [download]  12.6% of  245.49KiB at  454.22KiB/s ETA 00:00
[downloader.ytdl][debug] [download]  25.7% of  245.49KiB at  235.34KiB/s ETA 00:00
[downloader.ytdl][debug] [download]  51.7% of  245.49KiB at  263.46KiB/s ETA 00:00
[downloader.ytdl][debug] [download] 100.0% of  245.49KiB at  417.80KiB/s ETA 00:00
[downloader.ytdl][debug] [download] 100% of  245.49KiB in 00:00:01 at 193.61KiB/s
[downloader.ytdl][debug] [Merger] Merging formats into "./gallery-dl/reddit/twicemedia/11aq54q Funny Jeongyeon & Momo moment.mp4"
[downloader.ytdl][debug] Deleting original file ./gallery-dl/reddit/twicemedia/11aq54q Funny Jeongyeon & Momo moment.fvideo_2284519.mp4 (pass -k to keep)
[downloader.ytdl][debug] Deleting original file ./gallery-dl/reddit/twicemedia/11aq54q Funny Jeongyeon & Momo moment.faudio_0_131792.m4a (pass -k to keep)
./gallery-dl/reddit/twicemedia/11aq54q Funny Jeongyeon & Momo moment.mp4
@enduser420
Copy link
Contributor

extractor.reddit.videos=ytdl (configuration)

{
    "extractor": {
        "reddit": {
            "videos": "ytdl"
        }
    }
}

OR

$ gallery-dl https://www.reddit.com/r/twicemedia/comments/11aq54q/funny_jeongyeon_momo_moment/ -o extractor.reddit.videos=ytdl
$ ffprobe -hide_banner -i "11aq54q Funny Jeongyeon & Momo moment.mp4"
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '11aq54q Funny Jeongyeon & Momo moment.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.27.100
  Duration: 00:00:15.33, start: 0.000000, bitrate: 4604 kb/s
  Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 608x1080 [SAR 1:1 DAR 76:135], 4469 kb/s, 30 fps, 30 tbr, 12k tbn (default)
    Metadata:
      handler_name    : Bento4 Video Handler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : Bento4 Sound Handler
      vendor_id       : [0][0][0][0]

@rEnr3n
Copy link
Author

rEnr3n commented Feb 28, 2023

Is there a reason gallery-dl uses own downloader for the videos instead of forwarding them to ytdl?

@cheese529
Copy link

im having the same problem, just noticed everything i downloaded was in lower quality despite gallery-dl telling me it was using yt-dlp to download the reddit files. i know it was using yt-dlp because i got this message [downloader.ytdl][warning] [generic] Falling back on generic information extractor

@mikf
Copy link
Owner

mikf commented Mar 1, 2023

Most likely caused by the changes from #3306, which also caused some other issues as mentioned in a7c7953#commitcomment-92042240

mikf added a commit that referenced this issue Mar 6, 2023
- add 'dash' to directly extract DASH manifest URLs
  (was default behavior since a7c7953)
- change default strategy back to before a7c7953
- disable 'Falling back on generic information extractor' warning
@mikf
Copy link
Owner

mikf commented Mar 6, 2023

Fixed in da9840a

It now uses the same strategy as before PR #3306 by default and passes https://v.redd.it/y6kov843q4ka1 instead of the DASH manifest URL to ytdl.

@mikf mikf closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants