News for hackers. Stuff that matters.
Re:Setting Up a Pi Hole Made My Home Network Faster by mattmanser on Saturday April 13, 2019 @07:24PM (#19656436)
Surely a computer can do that in sub-second time? As soon as it sees the signature of a well known advert start blocking.

Then again, what about clips from the show that you're watching, it might start blocking part of the show as it thinks it's an advert.

Re:Setting Up a Pi Hole Made My Home Network Faster by regecks on Saturday April 13, 2019 @07:50PM (#19656552)
I think that you can just look for specific markers in the stream to detect ads. e.g. I look for SCTE-35 (https://en.wikipedia.org/wiki/SCTE-35) in Twitch streams to filter out their ads. It takes no CPU at all to do. I believe broadcast TV has a similar thing in many places.
Re:Setting Up a Pi Hole Made My Home Network Faster by markovbot on Saturday April 13, 2019 @08:11PM (#19656641)
What software do you use to do that?
Re:Setting Up a Pi Hole Made My Home Network Faster by regecks on Saturday April 13, 2019 @09:17PM (#19656909)
Well, I watch Twitch using a personal fork of https://github.com/SebastianRask/Pocket-Plays-for-Twitch (which isn't really actively maintained), so when Twitch ads became in-stream this year, I replaced the default Android media player it uses with Google's ExoPlayer, and then made a bunch of changes to ExoPlayer to be able to detect when SCTE35 segments would be played, and silenced them.

I modeled my change on similar changes made by Streamlink's Twitch plugin recently: https://github.com/streamlink/streamlink/pull/2372

Re:Setting Up a Pi Hole Made My Home Network Faster by satori99 on Saturday April 13, 2019 @09:20PM (#19656919)
I have used this method with node.js+ffmpeg for Australian TV streams;

https://gist.github.com/satori99/2cb06938bfe8532ecc00e609065...

Re:Setting Up a Pi Hole Made My Home Network Faster by evan_ on Saturday April 13, 2019 @08:52PM (#19656805)
Seems like this is something machine learning would be very good at, given that commercial visuals look very different from “real” show visuals
Re:Setting Up a Pi Hole Made My Home Network Faster by windexh8er on Saturday April 13, 2019 @10:32PM (#19657193)
> Seems like this is something machine learning would be very good at, given that commercial visuals look very different from “real” show visuals

This feature was in MythTV literally 10+ years ago. Commercials are very easy to detect using simple methods [0].

[0] https://www.mythtv.org/wiki/Commercial_detection

Re:Setting Up a Pi Hole Made My Home Network Faster by grawprog on Saturday April 13, 2019 @08:58PM (#19656827)
As far as I know audio levels in commercials are different too. I don't know the exact number, but I seem to recall reading some time commercials are usually 30% louder or something. They are definitely noticeably louder than most shows, except maybe sitcoms.

ETA: Looking it up it looks like America has laws about this now. I'm in Canada I'm not sure if it's the same here.

And on further reading, it seems like advertisers may be using excessive compression to artificially boost loudness and skirt the law.

Re:Setting Up a Pi Hole Made My Home Network Faster by nkozyra on Saturday April 13, 2019 @11:15PM (#19657367)
There's volume and then there's "loudness."

Even if peak volume is under some prescribed maximum, compressed audio can feel very loud. Commercials often leave very little dynamic space, which makes them jarring in that they feel "loud."

Re:Setting Up a Pi Hole Made My Home Network Faster by yeahitslikethat on Sunday April 14, 2019 @12:35PM (#19660325)
Movies also have loud scenes which would false positive.
Re:Setting Up a Pi Hole Made My Home Network Faster by jonathankoren on Saturday April 13, 2019 @10:26PM (#19657175)
Why bother? There are already known ways to detect commercial breaks like so many milliseconds of black screen, and such. Also, there are very few commercials on television at any time, including local ads. You could just fingerprint them.
Re:Setting Up a Pi Hole Made My Home Network Faster by skookumchuck on Sunday April 14, 2019 @12:34AM (#19657629)
Just look for consistently louder volume.
Re:Setting Up a Pi Hole Made My Home Network Faster by St_Alfonzo on Sunday April 14, 2019 @05:36AM (#19658392)
Or check if the TV-Channel Logo is shown in the corner. At least in Germany the Logo is hidden during commercials.
Re:Setting Up a Pi Hole Made My Home Network Faster by yolo1 on Saturday April 13, 2019 @09:13PM (#19656886)
Surely subtitles would be an awesome signature to use?
Re:Setting Up a Pi Hole Made My Home Network Faster by tyingq on Saturday April 13, 2019 @07:49PM (#19656547)
Plex says this about their commercial removing tech:

"The process is CPU-intensive and can take several minutes to complete, depending on the recording duration. On a reasonably fast CPU, we typically see a 30-minute recording take 2-4 minutes to process."

Assuming they know what they are doing, real time blocking seems not possible with a reasonably modern approach.

Re:Setting Up a Pi Hole Made My Home Network Faster by ses1984 on Saturday April 13, 2019 @07:56PM (#19656581)
What leads you to believe that something that can process a 30 minute file in 3 minutes, can't be done in real time?
Re:Setting Up a Pi Hole Made My Home Network Faster by tyingq on Saturday April 13, 2019 @08:20PM (#19656684)
Maybe more context:

"The recording is analyzed on various characteristics such as black frames, silences and changes in aspect ratio.

Based on this information Comskip segments the recording in blocks and using heuristics, together with additional information such as the presence of logo, the scene change rate, Close Captioning information and other information sources Comskip tries to determine what blocks of the recording are to be characterized as commercials."

It doesn't say it explicitly, but based on this and the note on high CPU utilization, I get the impression it has to look back and forward to determine where the commercial is.

Re:Setting Up a Pi Hole Made My Home Network Faster by mbreese on Saturday April 13, 2019 @09:48PM (#19657027)
Given enough of a buffer and a historical corpus, it should be possible to do this in near-realtime, but likely with a few minutes of buffer. Especially with some kind of historical trained classifier, it should be possible to do this in close-enough-to-realtime-to-be-useful scale.