StefanLobbenmeier / youtube-dl-gui

A cross-platform GUI for youtube-dl made in Electron and node.js
GNU Affero General Public License v3.0
1.55k stars 62 forks source link

[FR] Dowload only betwwen to timestamps #133

Open RFDarter opened 3 months ago

RFDarter commented 3 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context It would be awesome if we could provide a timestamp for the start and one for the end and only download that part of a given video

StefanLobbenmeier commented 3 months ago

Yeah I definitely plan on doing that in v3. Current GUI idea is having an edit button on the duration where you can change that

RFDarter commented 3 months ago

Yeah I definitely plan on doing that in v3. Current GUI idea is having an edit button on the duration where you can change that

I just had a deeper look into the project. Does youtube-dl even allow to download only parts of a Video? I havent found an option for that.

StefanLobbenmeier commented 3 months ago

Yeah it’s part of download sections: https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#download-options

       Download only chapters that match the
                                regular expression. A "*" prefix denotes
                                time-range instead of chapter. Negative
                                timestamps are calculated from the end.
                                "*from-url" can be used to download between
                                the "start_time" and "end_time" extracted
                                from the URL. Needs ffmpeg. This option can
                                be used multiple times to download multiple
                                sections, e.g. --download-sections
                                "*10:15-inf" --download-sections "intro"
StefanLobbenmeier commented 3 months ago

(I also plan to allow you to select the target chapter in that same UI, this is what chapter information I get for https://www.youtube.com/watch?v=eLVAMG_3fLg)

  "chapters": [
    {
      "start_time": 0.0,
      "title": "Intro",
      "end_time": 124.0
    },
    {
      "start_time": 124.0,
      "title": "Unstoppable Vine Robot",
      "end_time": 913.0
    },
    {
      "start_time": 913.0,
      "title": "Update on Vine Robot!",
      "end_time": 1224.0
    },
    {
      "start_time": 1224.0,
      "title": "Highest Jumping Robot",
      "end_time": 1935.0
    },
    {
      "start_time": 1935.0,
      "title": "Update on the Jumper!",
      "end_time": 2306.0
    },
    {
      "start_time": 2306.0,
      "title": "Micromouse Competition",
      "end_time": 3735.0
    },
    {
      "start_time": 3735.0,
      "title": "Benefit of non-humanoid robots",
      "end_time": 3768.0
    },
    {
      "start_time": 3768.0,
      "title": "Brilliant",
      "end_time": 3864.0
    },
    {
      "start_time": 3864.0,
      "title": "Bendy Machines",
      "end_time": 4586.0
    },
    {
      "start_time": 4586.0,
      "title": "Soft Robots",
      "end_time": 5155.0
    },
    {
      "start_time": 5155.0,
      "title": "Conclusion",
      "end_time": 5240
    }
  ],