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] Sponsorblock support #552

Closed
not-a-dev-stein opened this issue Aug 18, 2023 · 10 comments · Fixed by #558
Closed

[Feature Request] Sponsorblock support #552

not-a-dev-stein opened this issue Aug 18, 2023 · 10 comments · Fixed by #558
Labels
feature New feature or request in-beta This issue is fixed in a beta version
Milestone

Comments

@not-a-dev-stein
Copy link

I was going to create a single issue for both the things I'd like to see, but this one might be a tougher pill to swallow and is probably going to be more difficult to support.

Sponsorblock, for the unaware, is an extension that helps you to get rid of in-video ads and breaks, which has great support in yt-dlp.

Once again, using the example I used on the other feature request I created, it could really come in handy for events like Flock to Fedora and GUADEC, where you could use the extension to tag which parts of the stream were breaks between each talk (which would already help a lot those that decide to watch the stream's VOD later), and when you export the video you can use --sponsorblock-mark all --sponsorblock-remove all in conjunction with --split-chapters to not only have the talks automatically trimmed and ready to upload, you also get zero videos containing the breaks.

@nlogozzo nlogozzo added the feature New feature or request label Aug 19, 2023
@nlogozzo nlogozzo added this to the V2023.8.3 milestone Aug 23, 2023
@nlogozzo
Copy link
Member

Do you think this should be a per-download setting (advanced options) or a global setting (Preferences)...I feel like maybe global on this one cause i'm sure if a user sponsorblocks they'd want to do it for all videos...

@not-a-dev-stein
Copy link
Author

I believe global should be the way to go on this one, it's how its support is usually built on apps that support it (YT Vanced and NewPipe, for example)

@nlogozzo
Copy link
Member

https://github.com/NickvisionApps/Parabolic/releases/tag/2023.8.3-rc1

should be on flathub beta soon...whenever gnome gitlab is up again

@nlogozzo nlogozzo added the in-beta This issue is fixed in a beta version label Aug 24, 2023
@BuonHobo
Copy link

Sorry guys, I'm not sure this feature is working correctly. I enabled it in the settings and I see [SponsorBlock] in the log, but the final video is unchanged

@nlogozzo
Copy link
Member

Sorry guys, I'm not sure this feature is working correctly. I enabled it in the settings and I see [SponsorBlock] in the log, but the final video is unchanged

SponsorBlock is a community-driven database. This means that your video would need to be submitted to SponsorBlock by someone who has watched it and has marked all of the places where sponsors are mentioned. Then SponsorBlock will remove the sponsors from the video in Parabolic.
So it's not that it "doesn't work" it's that your video hasn't been submitted to SponsorBlock.

See more info here: https://sponsor.ajay.app/about/

@BuonHobo
Copy link

I know how sponsorblock works, I use it regularly on my browser...

I tested the feature with this video (as you can see, there's a big beautiful green sponsor segment).

This is Parabolic's log:

[youtube] Extracting URL: https://www.youtube.com/watch?v=yRfDwkHPVeg
[youtube] yRfDwkHPVeg: Downloading webpage
[youtube] yRfDwkHPVeg: Downloading ios player API JSON
[youtube] yRfDwkHPVeg: Downloading android player API JSON
[youtube] yRfDwkHPVeg: Downloading m3u8 information
[info] yRfDwkHPVeg: Downloading subtitles: en
[SponsorBlock] Fetching SponsorBlock segments
[SponsorBlock] Found 3 segments in the SponsorBlock database
[info] yRfDwkHPVeg: Downloading 1 format(s): 17
[info] Writing video subtitles to: /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80.en.vtt
[download] Destination: /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80.en.vtt
[download] Download completed
[info] Downloading video thumbnail 41 ...
[info] Writing video thumbnail 41 to: /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80.webp
[download] Destination: /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80.3gp
[download] Download completed
[TCSubtitlesConvertor] Converting subtitles
[TCSubtitlesConvertor] Subtitle file for vtt is already in the requested format
[TCEmbedSubtitle] Subtitles can only be embedded in mp4, mov, m4a, webm, mkv, mka files
[TCMetadata] Adding metadata to "/home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80.3gp"
[ThumbnailsConvertor] Converting thumbnail "/home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80.webp" to png
[TCEmbedThumbnail] Supported filetypes for thumbnail embedding are: mp3, mkv/mka, ogg/opus/flac, m4a/mp4/m4v/mov
[TCEmbedThumbnail] WARNING: Failed to embed thumbnail
[MoveFiles] Moving file "/home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80.en.vtt" to "/run/user/1000/doc/19fc64f4/Parabolic/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80.en.vtt"
[MoveFiles] Moving file "/home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80.3gp" to "/run/user/1000/doc/19fc64f4/Parabolic/4b6985cf-a6f0-4562-9bdb-ca2c8e595d80.3gp"

From the log, I assume that I correctly enabled the SponsorBlock feature and it correctly detected the sponsored segments. However, the final video still has the sponsored segment and, at least according to mpv, the segment isn't tagged as sponsored.

Please, next time ask for more information before assuming I don't know what I'm talking about (which absolutely might be the case).

@nlogozzo
Copy link
Member

@BuonHobo What I find weird is that Parabolic is downloading the file as an 3gp when that's not a file format supported by Parabolic.

Do you have Disallow Conversions enabled?

@BuonHobo
Copy link

BuonHobo commented Nov 22, 2023

I think 3gp was selected because I chose to download the video with the smallest possible resolution (since I just needed the log for demonstration purposes).
When I downloaded the video with best quality I got an mkv file, but the result was the same.

Anyway yes, I had Disallow Conversions enabled.
This is what I get after disabling Disallow Conversions (nothing changes in the resulting file)

[youtube] Extracting URL: https://www.youtube.com/watch?v=yRfDwkHPVeg
[youtube] yRfDwkHPVeg: Downloading webpage
[youtube] yRfDwkHPVeg: Downloading ios player API JSON
[youtube] yRfDwkHPVeg: Downloading android player API JSON
[youtube] yRfDwkHPVeg: Downloading m3u8 information
[info] yRfDwkHPVeg: Downloading subtitles: en
[SponsorBlock] Fetching SponsorBlock segments
[SponsorBlock] Found 3 segments in the SponsorBlock database
[info] yRfDwkHPVeg: Downloading 1 format(s): 298+234
[info] Writing video subtitles to: /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.en.vtt
[download] Destination: /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.en.vtt
[download] Download completed
[info] Downloading video thumbnail 41 ...
[info] Writing video thumbnail 41 to: /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.webp
[download] Destination: /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.f298.mp4
[download] Download completed
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 81
[download] Destination: /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.f234.mp4
[download] Download completed
[Merger] Merging formats into "/home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.mp4"
Deleting original file /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.f298.mp4 (pass -k to keep)
Deleting original file /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.f234.mp4 (pass -k to keep)
[VideoConvertor] Not converting media file "/home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.mp4"; already is in target format mp4
[TCSubtitlesConvertor] Converting subtitles
[TCSubtitlesConvertor] Subtitle file for vtt is already in the requested format
[TCEmbedSubtitle] Embedding subtitles in "/home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.mp4"
Deleting original file /home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.en.vtt (pass -k to keep)
[TCMetadata] Adding metadata to "/home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.mp4"
[ThumbnailsConvertor] Converting thumbnail "/home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.webp" to png
[TCEmbedThumbnail] mutagen: Adding thumbnail to "/home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.mp4"
[MoveFiles] Moving file "/home/buonhobo/.var/app/org.nickvision.tubeconverter/cache/Nickvision Tube Converter/d011d458-01d3-4af8-9ff2-175e09413b2f/d011d458-01d3-4af8-9ff2-175e09413b2f.mp4" to "/run/user/1000/doc/19fc64f4/Parabolic/d011d458-01d3-4af8-9ff2-175e09413b2f.mp4"

@nlogozzo nlogozzo reopened this Nov 22, 2023
@nlogozzo
Copy link
Member

Figured out the issue! We were reading SponsorBlock information, but we then had to pass said read information to yt-dlp again for removal.
Going to release a stable update with these fixes later today :)

@nlogozzo nlogozzo modified the milestones: V2023.8.3, V2023.11.1 Nov 22, 2023
@nlogozzo
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request in-beta This issue is fixed in a beta version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants