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

Youtube - Download according to timestamps. #24858

Open
3 tasks done
kettenfett opened this issue Apr 18, 2020 · 15 comments
Open
3 tasks done

Youtube - Download according to timestamps. #24858

kettenfett opened this issue Apr 18, 2020 · 15 comments

Comments

@kettenfett
Copy link

kettenfett commented Apr 18, 2020

Description

It seems, youtube is now using information found in timecodes in the video description and displays them in the videoplayer like so:
grafik

It may have been like this for some time, but I saw it for the first time today (link to video).

Can this be used by youtube-dl to offer a download option, that automatically downloads the individual videos/audios according to these timecodes?

Checklist

  • I'm reporting a site feature request
  • I've verified that I'm running youtube-dl version 2020.03.24
  • I've searched the bugtracker for similar site feature requests including closed ones
@wattux
Copy link

wattux commented Apr 19, 2020

The extractor already gets thoses tracks as "chapters". I'm not really into that project base, but I guess adding a new FFmpegPostProcessor for splitting the resulting file into own tracks is a good approach?

I'm playing around with that for a bit

wattux referenced this issue in wattux/youtube-dl Apr 26, 2020
This introduces a new FFmpegPostProcessor, which looks for "chapters"
extracted by IEs. For each identified chapter, it extracts a single
track from the source file, using ffmpeg's -ss / -t arguments.
wattux referenced this issue in wattux/youtube-dl Apr 26, 2020
This introduces a new FFmpegPostProcessor, which looks for "chapters"
extracted by IEs. For each identified chapter, it extracts a single
track from the source file, using ffmpeg's -ss / -t arguments.
wattux referenced this issue in wattux/youtube-dl Apr 26, 2020
This introduces a new FFmpegPostProcessor, which looks for "chapters"
extracted by IEs. For each identified chapter, it extracts a single
track from the source file, using ffmpeg's -ss / -t arguments.
wattux referenced this issue in wattux/youtube-dl Apr 26, 2020
This introduces a new FFmpegPostProcessor, which looks for "chapters"
extracted by IEs. For each identified chapter, it extracts a single
track from the source file, using ffmpeg's -ss / -t arguments.
wattux referenced this issue in wattux/youtube-dl Apr 26, 2020
This introduces a new FFmpegPostProcessor, which looks for "chapters"
extracted by IEs. For each identified chapter, it extracts a single
track from the source file, using ffmpeg's -ss / -t arguments.
wattux referenced this issue in wattux/youtube-dl Apr 26, 2020
This introduces a new FFmpegPostProcessor, which looks for "chapters"
extracted by IEs. For each identified chapter, it extracts a single
track from the source file, using ffmpeg's -ss / -t arguments.
wattux referenced this issue in wattux/youtube-dl Apr 26, 2020
This introduces a new FFmpegPostProcessor, which looks for "chapters"
extracted by IEs. For each identified chapter, it extracts a single
track from the source file, using ffmpeg's -ss / -t arguments.
@jtagcat
Copy link

jtagcat commented May 31, 2020

Instead of splitting to separate files, what about mapping the timestamps to chapters?

@wattux
Copy link

wattux commented May 31, 2020

afaik the timestamps are already parsed into those chapters. At least thats were I got them from.

@jtagcat
Copy link

jtagcat commented May 31, 2020

image

youtube-dl https://www.youtube.com/watch?v=zPuELAzJyno
image

No chapters, not fully sure if talking about the same thing.

@wattux
Copy link

wattux commented May 31, 2020

We were kinda. I was talking about the chapters raw, internal data, created by the extractors. I guess they are just not included in the local file by default. Maybe there is an extra argument for that

@jtagcat
Copy link

jtagcat commented May 31, 2020

We were kinda. I was talking about the chapters raw, internal data, created by the extractors. I guess they are just not included in the local file by default. Maybe there is an extra argument for that

F3 in the main readme for chapter and timestamp did not yield any results.

wattux referenced this issue in wattux/youtube-dl Jul 6, 2020
This introduces a new FFmpegPostProcessor, which looks for "chapters"
extracted by IEs. For each identified chapter, it extracts a single
track from the source file, using ffmpeg's -ss / -t arguments.
@dyloxim
Copy link

dyloxim commented Aug 8, 2020

being able to split a video into multiple files according to these timestamps (with the result the same as if the files had been downloaded from a playlist of those segments) would be great

@dogancelik
Copy link

dogancelik commented Aug 29, 2020

I want to see the timestamps in VLC / Media Player Classic. How can I embed chapters of the video when I download it with youtube-dl -f bestaudio URL? I only want the audio and the timestamps with titles embedded inside the file.

@lyz-code
Copy link

I've found crisbal/album-splitter which does exactly this, maybe it can be used as inspiration

@darkred
Copy link

darkred commented Nov 16, 2020

For reference, here's another approach, a awk/bash script:
https://github.com/Pab0/album_splitter

Syntax:

./album_splitter.sh URL [download_location]

It uses youtube-dl, ffmpeg and awk:
The youtube webpage is fetched (--get-description) and the video's description is parsed (using 'format_titles.awk') for titles and timestamps/tracks.
Then the album file (e.g. webm) is downloaded (--get-title), converted to audio (--extract-audio --audio-format mp3),
and split (using 'split_audio.awk') into single tracks according to the parsed track information.

swapdisk added a commit to swapdisk/youtube-dl that referenced this issue Nov 22, 2020
…rg#24858)

This introduces a new FFmpegPostProcessor, which looks for "chapters"
extracted by IEs. For each identified chapter, it extracts a single
track from the source file, using ffmpeg's -ss / -t arguments.
@makew0rld
Copy link

It would be helpful if the chapters could also be downloaded as a data file, so that the timestamps and the names of the chapters can be archived and used later. Perhaps it could be included in the .info.json file that's enabled with --write-info-json?

Please let me know if I should make a separate issue for this.

femaref pushed a commit to femaref/youtube-dl that referenced this issue Jan 2, 2021
…rg#24858)

This introduces a new FFmpegPostProcessor, which looks for "chapters"
extracted by IEs. For each identified chapter, it extracts a single
track from the source file, using ffmpeg's -ss / -t arguments.
femaref pushed a commit to femaref/youtube-dl that referenced this issue Jan 7, 2021
…rg#24858)

This introduces a new FFmpegPostProcessor, which looks for "chapters"
extracted by IEs. For each identified chapter, it extracts a single
track from the source file, using ffmpeg's -ss / -t arguments.
@xantares
Copy link
Contributor

xantares commented Apr 8, 2021

@femaref your commit looks promising, any updates on this ?

@femaref
Copy link

femaref commented Apr 23, 2021

@femaref your commit looks promising, any updates on this ?

not more than is in the fork I'm afraid. I can do a PR for what's there.

@xantares
Copy link
Contributor

yes, please

@SpL1Ne
Copy link

SpL1Ne commented Aug 22, 2021

Yet another rough and simple powershell script:
https://gist.github.com/SpL1Ne/54d8c8d036f58b8afb89eaa34ce77fd0

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