axcore / tartube

A GUI front-end for youtube-dl, partly based on youtube-dl-gui and written in Python 3 / Gtk 3
GNU Lesser General Public License v2.1
2.12k stars 112 forks source link

SponsorBlock settings not applied? #360

Closed francois072 closed 2 years ago

francois072 commented 2 years ago

SponsorBlock does not seem to be applied to newly downloaded videos. Is anything wrong with my configuration? The SponsorBlock settings are applied to General. Tartube settings (Rename to .json, Github doesn't support json): settings.txt

Screenshot_20211130_023432

Screenshot_20211130_025016

axcore commented 2 years ago

Hopefully you have installed FFmpeg using Tartube's menu (Operations > Install FFmpeg).

Hopefully you have checked that the videos exist on SponsorBlock's sever.

Then, give me the URL of a video that should be processed by SponsorBlock, but is not, and I'll test it.

francois072 commented 2 years ago

FFmpeg is installed. The option is greyed out. The video exists on SponsorBlock's server. https://www.youtube.com/watch?v=pyg615mdZeQ Ad at 33s

francois072 commented 2 years ago

When manually applying SponsorBlock. Special > Process with FFmpeg > Use the video's own slice data Output: Starting process operation Video 1/1: Amazing elementary apps you can install on other linux distributions

axcore commented 2 years ago

FFmpeg is installed. The option is greyed out.

My brain is not operating at full capacity today. On Linux it's not necessary, or even possible, to install FFmpeg via Tartube's menu.

francois072 commented 2 years ago

I am using Tartube to merge a m4a and mp4-dash into a mp4 file when downloading so assume that FFmpeg is working properly. FFmpeg is also installed at the default location.

axcore commented 2 years ago

I'm testing it now.

axcore commented 2 years ago

Ok, I tested your video using the same settings in your screenshots. It works perfectly, the video downloads and the advert is removed. Does your output look like this? working working2

So, if it is not working for you, let's start with an obvious question: are you doing a normal download or a custom download? For example, you can right-click the video and select "Custom download video", if you select "Download video" then SponsorBlock won't work.

Or, you can right-click the channel and select "Custom download channel", or you can use Tartube's main menu and select "Operations > Custom download all". Again, if you select "download channel" or "download all" it won't work.

francois072 commented 2 years ago

I was using the regular "download all" button. I thought that "general" was the options that were being applied to that button. It does now appear to be working in the output window, but the actual end result is only the first section before the ad. The download appears to be going very slowly, although a speed test shows my download speed to be normal.

[info] pyg615mdZeQ: Downloading 1 format(s): 302+251 [download] Destination: /run/media/francois/Storage/Downloads/Tartube/Unsorted Videos/.clips_304/clip_2.mp4 [ffmpeg] Downloaded 36778526 bytes [download] 100% of 35.07MiB in 05:40 [VideoRemuxer] Not remuxing media file '/run/media/francois/Storage/Downloads/Tartube/Unsorted Videos/.clips_304/clip_2.mp4'; frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 1 fps=0.0 q=-1.0 size= 0kB time=00:00:06.96 bitrate= 0.1kbits/s speed=0.109x
frame= 1 fps=0.0 q=-1.0 size= 0kB time=00:00:06.96 bitrate= 0.1kbits/s speed=0.0985x
frame= 1 fps=0.0 q=-1.0 size= 0kB time=00:00:06.96 bitrate= 0.1kbits/s speed=0.0896x
frame= 1 fps=0.0 q=-1.0 size= 0kB time=00:00:06.96 bitrate= 0.1kbits/s speed=0.0822x
frame= 371 fps=4.0 q=-1.0 size= 512kB time=00:00:14.36 bitrate= 292.0kbits/s speed=0.157x
frame= 1631 fps= 17 q=-1.0 size= 2560kB time=00:00:39.56 bitrate= 530.0kbits/s speed=0.419x
frame= 1762 fps= 18 q=-1.0 size= 2816kB time=00:00:42.18 bitrate= 546.8kbits/s speed=0.427x
frame= 2510 fps= 25 q=-1.0 size= 3584kB time=00:00:57.14 bitrate= 513.8kbits/s speed=0.563x
frame= 3282 fps= 31 q=-1.0 size= 4352kB time=00:01:12.58 bitrate= 491.2kbits/s speed=0.686x
frame= 3546 fps= 32 q=-1.0 size= 4608kB time=00:01:17.86 bitrate= 484.8kbits/s speed=0.697x
frame= 4676 fps= 39 q=-1.0 size= 5376kB time=00:01:40.46 bitrate= 438.4kbits/s speed=0.846x
frame= 5553 fps= 44 q=-1.0 size= 6400kB time=00:01:58.00 bitrate= 444.3kbits/s speed=0.939x
frame= 7067 fps= 55 q=-1.0 size= 7424kB time=00:02:28.28 bitrate= 410.1kbits/s speed=1.15x
frame= 7283 fps= 54 q=-1.0 size= 7680kB time=00:02:32.60 bitrate= 412.3kbits/s speed=1.12x
frame= 8220 fps= 58 q=-1.0 size= 8448kB time=00:02:51.34 bitrate= 403.9kbits/s speed= 1.2x
frame= 8875 fps= 59 q=-1.0 size= 9472kB time=00:03:04.44 bitrate= 420.7kbits/s speed=1.23x
frame= 9914 fps= 63 q=-1.0 size= 10240kB time=00:03:25.22 bitrate= 408.7kbits/s speed=1.31x
frame=10981 fps= 67 q=-1.0 size= 11264kB time=00:03:46.56 bitrate= 407.3kbits/s speed=1.38x
frame=11810 fps= 69 q=-1.0 size= 12288kB time=00:04:03.14 bitrate= 414.0kbits/s speed=1.42x
frame=12730 fps= 72 q=-1.0 size= 13056kB time=00:04:21.54 bitrate= 408.9kbits/s speed=1.47x
frame=13749 fps= 74 q=-1.0 size= 14080kB time=00:04:41.92 bitrate= 409.1kbits/s speed=1.52x
frame=14809 fps= 77 q=-1.0 size= 15360kB time=00:05:03.12 bitrate= 415.1kbits/s speed=1.58x
frame=15509 fps= 78 q=-1.0 size= 16128kB time=00:05:17.12 bitrate= 416.6kbits/s speed=1.59x
frame=16268 fps= 79 q=-1.0 size= 16896kB time=00:05:32.30 bitrate= 416.5kbits/s speed=1.61x
frame=17058 fps= 80 q=-1.0 size= 17920kB time=00:05:48.10 bitrate= 421.7kbits/s speed=1.63x
frame=17753 fps= 81 q=-1.0 size= 18688kB time=00:06:02.00 bitrate= 422.9kbits/s speed=1.64x
frame=19536 fps= 86 q=-1.0 size= 19712kB time=00:06:37.66 bitrate= 406.1kbits/s speed=1.75x
frame=21235 fps= 91 q=-1.0 size= 20992kB time=00:07:11.64 bitrate= 398.4kbits/s speed=1.84x
frame=21995 fps= 91 q=-1.0 size= 21760kB time=00:07:26.84 bitrate= 398.9kbits/s speed=1.85x
frame=22072 fps= 89 q=-1.0 size= 22016kB time=00:07:28.38 bitrate= 402.2kbits/s speed=1.81x
frame=23652 fps= 95 q=-1.0 size= 23040kB time=00:07:59.98 bitrate= 393.2kbits/s speed=1.93x
frame=23857 fps= 94 q=-1.0 size= 23296kB time=00:08:04.08 bitrate= 394.2kbits/s speed= 1.9x
frame=25655 fps=100 q=-1.0 size= 24832kB time=00:08:40.04 bitrate= 391.2kbits/s speed=2.03x
frame=25656 fps= 98 q=-1.0 size= 24832kB time=00:08:40.06 bitrate= 391.1kbits/s speed=1.98x
frame=25895 fps= 96 q=-1.0 size= 24832kB time=00:08:44.84 bitrate= 387.6kbits/s speed=1.95x
frame=27163 fps=101 q=-1.0 size= 26112kB time=00:09:10.20 bitrate= 388.8kbits/s speed=2.04x
frame=27200 fps= 98 q=-1.0 size= 26368kB time=00:09:10.94 bitrate= 392.1kbits/s speed=1.99x
frame=28704 fps=101 q=-1.0 size= 27648kB time=00:09:41.02 bitrate= 389.8kbits/s speed=2.05x
frame=28813 fps= 99 q=-1.0 size= 27648kB time=00:09:43.20 bitrate= 388.4kbits/s speed=2.01x
frame=30280 fps=102 q=-1.0 size= 29184kB time=00:10:12.54 bitrate= 390.3kbits/s speed=2.06x
frame=31693 fps=104 q=-1.0 size= 30464kB time=00:10:40.80 bitrate= 389.4kbits/s speed=2.11x
frame=32007 fps=103 q=-1.0 size= 30720kB time=00:10:47.08 bitrate= 388.9kbits/s speed=2.08x
frame=33398 fps=105 q=-1.0 size= 32000kB time=00:11:14.90 bitrate= 388.4kbits/s speed=2.12x
frame=33907 fps=104 q=-1.0 size= 33280kB time=00:11:25.08 bitrate= 397.9kbits/s speed=2.11x
frame=33953 fps=102 q=-1.0 size= 33280kB time=00:11:26.00 bitrate= 397.4kbits/s speed=2.06x
frame=34596 fps=104 q=-1.0 size= 34304kB time=00:11:38.86 bitrate= 402.1kbits/s speed= 2.1x
frame=34750 fps=102 q=-1.0 size= 34304kB time=00:11:41.94 bitrate= 400.3kbits/s speed=2.07x
frame=35277 fps=104 q=-1.0 Lsize= 35917kB time=00:11:52.48 bitrate= 413.0kbits/s speed= 2.1x video:25559kB audio:9803kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.568004%

I'm getting this warning: WARNING: --downloader-args given without specifying name. The arguments will be given to all external downloaders

axcore commented 2 years ago

[info] pyg615mdZeQ: Downloading 1 format(s): 302+251

FFmpeg's performance when slicing up videos depends greatly on the video format being used. Try downloading in plain .mp4 and see what happens then.

francois072 commented 2 years ago

As mentioned in the documentation it's faster too just skip the ads manually. Newpipe with SponsorBlock has a different approach. Instead of using FFmpeg to splice the clips together the app simply downloads the entire video and automatically skips the sections with ads. Would this be possibble in Tartube?

axcore commented 2 years ago

I haven't used Newpipe so I'm not sure what you're asking for.

If you mean: open the downloaded video in a media player, and ask the media player to skip certain sections: I don't know if that's possible, though if it were possible I would certainly implement it.

francois072 commented 2 years ago

If you mean: open the downloaded video in a media player, and ask the media player to skip certain sections: I don't know if that's possible, though if it were possible I would certainly implement it.

Exactly that.

francois072 commented 2 years ago

If the video in NewPipe is played online then SponsorBlock works, but if the video is downloaded and played offline SponsorBlock doesn't work.

That's why "Enable Local Player" has to be enabled so that SponsorBlock works. IMG_20211201_153301_510

Would be great if it was possible to add "skip section" metadata to a video file so that it could be played by any decent video player.

axcore commented 2 years ago

Would be great if it was possible to add "skip section" metadata to a video file so that it could be played by any decent video player.

I looked into that. Unfortunately, it is not possible. Popular media players do not recognise any kind of "skip this section" metadata (I used this list to check that).

Some years ago I considered adding a media player inside Tartube, but the VLC code no longer works and no-one is maintaining it.

So I think there's nothing I can do. I did change the layout of the edit window, to reduce the confusion a little. It now looks like this:

customdl