mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.7k stars 953 forks source link

download videos from redgifs WITH SOUND through parent data from subreddits #6329

Closed MrPromotor closed 1 week ago

MrPromotor commented 1 week ago

Hi, recently modify the config.json to download some tiktoks from a subreddit hosted in redgifs, and I noticed the videos doesn't have any sound if I download it from the reddit link, but if I click the link and paste the redgifs link the video appears with sound with no data like title, subreddit, etc, is there a way to download it with sound? through the reddit link?

"reddit": {
  "filename": "{date:%Y-%m-%d-T%H%M}_{title}_{subreddit}_{num}_{id}.{extension}",
  "videos": true,
  "parent-directory": true,
  "parent-metadata": "_r"
},
"reddit>redgifs": {
  "filename": "{_r[date:%Y-%m-%d-T%H%M]}_{_r[title]}_{_r[subreddit]}_{_r[num]}_{_r[id]}.{extension}",
    directory": []
},
"redgifs": {
   "format": ["hd", "sd", "gif"]

        },

what I want is to download the videos with sound but with the parented metadata from reddit

mikf commented 1 week ago

Redgifs videos do have sound. The "No Sound" videos are most likely the result of Reddit fallback previews when the redgifs download fails.

Could you post an example so I can see whats going on myself?

MrPromotor commented 1 week ago

Don't judme 😅,

When i tried to downlad for example, this tiktok, with all the sound and the date-title-subreddit filename, just download the video but with no sound and the redgifs watermark, all is good except it doesn't have sound.

but if a open directly in the redgifs page and I try to download it, it does it with sound and no watermark, But no with the data I want, Date-title-subreddit filename

mikf commented 1 week ago

It did download the no-sound reddit preview because of the FilenameFormatError caused by reddit>redgifs.filename. Try these config settings and it'll work:

"reddit": {
  "filename": "{date:%Y-%m-%d-T%H%M}_{title}_{subreddit}_{num}_{id}.{extension}",
  "videos": true,
  "parent-directory": true,
  "parent-metadata": "_r"
},
"reddit>redgifs": {
    "filename" : "{_r[date]:%Y-%m-%d-T%H%M}_{_r[title]}_{_r[subreddit]}_{_r[num]}_{_r[id]}.{extension}",
    "directory": []
},
"redgifs": {
   "format": ["hd", "sd", "gif"]
},
MrPromotor commented 1 week ago

THANKS A LOT BRO, IT WORKS 🎉🎉🎉🎉