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

[Feature request] yt-dlp sponsorblock flags #74

Open
1 of 2 tasks
kzshantonu opened this issue May 25, 2023 · 4 comments
Open
1 of 2 tasks

[Feature request] yt-dlp sponsorblock flags #74

kzshantonu opened this issue May 25, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@kzshantonu
Copy link

app version: 1.0.1

  • twitch api key set
  • youtube api key set

would be nice to have

@kzshantonu
Copy link
Author

PS: love the project

@madiele
Copy link
Owner

madiele commented May 26, 2023

Hi and thanks for enjoying the project!
This is a natural feature to add but due to how I'm using yt-dlp only to get the stream URL and then transcode with ffmpeg on my own with it adding the flag will not work.

The 2 options are:

  1. use the sponsorblock API to add named blocks timestamp to the description (some podcast clients allow for skipping based on chapters names).
  2. Actually tell ffmpeg to cut around the transcoded stream, I still haven't researched it but my guess is that something can be done.

I think I will add the timestamp first and when that is done use the same logic for the the actual stitching of the stream.

If someone comes across this issue feel free to drop any knowledge they have in a possible solution using ffmpeg

@madiele madiele added the enhancement New feature or request label May 26, 2023
@kzshantonu
Copy link
Author

kzshantonu commented May 27, 2023

Hmm. I'm not very technical, but yt-dlp does allow outputting to stdout using -o -. ffmpeg could then take that from stdin and do what it needs to do.

Edit: not sure how seeking would work though

@madiele
Copy link
Owner

madiele commented May 27, 2023

I had experimented with that and I know I had problems so I dropped it as an idea, but can't remember the real reason but I think seeking was one of them, when I have a bit of time I might try again.

Anyway if this article is correct I can also just do multiple ffmpeg commands in sequence and the client should not notice, due to how MPEG works, I will do some research and report back.
http://www.mp3-tech.org/programmer/frame_header.html

edit for my own documentation:
also I could try to use the -map_metadata -1 ffmpeg option to skip the ID3 metadata

if I ever want to edit ID3 data (es: add timestamps directly in the mp3) this might be interesting, chapters are an id3v2 feature, id3v2 max size is 16 MB
https://docs.rs/id3/latest/id3/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants