I’m getting tired of the extremely loud ads on that don’t seem to be subject to the old TV broadcasting laws that prevent them from being blasted 10db louder than the actual content. Wondering if there’s stuff out there that would let me take the hdmi stream from my Apple TV or other streaming source, and do ad detection like the olden days so that it could just mute or do volume leveling at least.

I suppose something very basic might just be an hdmi splitter to a rpi with hdmi that’ll detect ads via the black screens or “this ad will over over in 30s” overlays, then send a mute signal over CEC or something to a receiver or TV….but would be nice if it could modify the hdmi signal directly.

Thoughts on what to search for to do something like this?

  • @[email protected]
    link
    fedilink
    1414 days ago

    take the hdmi stream from my Apple TV

    I think there’s two big obstacles here: HDCP and processing power. Most legal devices you can buy will not support simply handing over HDCP-unecrypted raw frames for you to mess with as that defeats the whole point of HDCP.

    But even if you get past that, you’re going to need at least a very high speed FPGA or ASIC, optionally also connected to a reasonably high-end PC, in order to be able to modify the stream in real-time and send it back out… certainly no current rpi can do this in even 1080p in real-time, and many devices now are going to 4k and beyond.

    • umami_wasabi
      link
      fedilink
      5
      edit-2
      14 days ago

      As OP said volume leveling is acceptable, something like this will do.

      Modifying HDMI video signal is simply impossible due to DMCA and bla bla bla. But not all hope is lost though. You can overlay opaque video on top of another encrypted stream via this little box. This is an old project per se and I have no idea if still available, but with some dirty work you might able to detect the increase of volume or match of an algo or something with a total black screen overlay on top.

      • @[email protected]
        link
        fedilink
        5
        edit-2
        14 days ago

        Yes those are FPGA/ASIC based solutions like I mentioned. That should work for 1080p at least, but getting to 4k is still prohibitively expensive.

        impossible

        My understanding is the DMCA explicitly allows reverse engineering of encryption for interoperability purposes… the only problem is that would have to specifically be tested in court to know if the government would agree in this instance, and nobody wants to try it.

        • umami_wasabi
          link
          fedilink
          014 days ago

          Overlay isn’t transcoding. All it need is a muxer like MKVToolNix. I doubt it need much processing power.

            • umami_wasabi
              link
              fedilink
              013 days ago

              It doesn’t and I didn’t ever mentioned HDMI in my reply. Just doubt if overlaying another encrypted stream with a muxer ever need that much processing power to the point of “prohibitively expensive”.

              • @[email protected]
                link
                fedilink
                013 days ago

                Encrypted streams also don’t have anything to do with a muxer, I really don’t understand what you’re trying to say. Muxers are for handling file formats, which is not being discussed at all, this is about raw video frame processing in hardware.

                • umami_wasabi
                  link
                  fedilink
                  0
                  edit-2
                  13 days ago

                  Well, I’m simply reciting what is described on the page based on my understanding. From the diagram, it does not do raw frame processing from the source (assuming HDMI w/ HDCP) as the stream remains encrypted. By the look of it, it is copy or passthrough to the muxer (as it labeled). With some magic, it muxes two encrypted streams into one and output to the video sink. How is that done I have no idea.

    • @Decipher0771OP
      link
      314 days ago

      Yeah I think hdcp and reprocessing would be most difficult. There are hdmi splitter devices like those used for coloured bias lighting that I think could be used….similarly I think the processing actually isn’t unsolvable, it’s not much different than object detection from a live camera stream. I agree re-encoding the stream would be too hardware intensive for anything “cheap” like a pi, hence the secondary device control alternative initially, but analyzing the stream should be possible.

    • @[email protected]
      link
      fedilink
      English
      013 days ago

      in order to be able to modify the stream in real-time and send it back out…

      It doesn’t need to modify. What it needs is detection, and then either blacking it out, or replacing with a simple progesssbar-like screen on a black background.

      • @[email protected]
        link
        fedilink
        113 days ago

        I consider “blacking it out” and “replacing” to be equivalent to “modify” in this case as you still need basically the same amount of processing power to do any of it.

  • @[email protected]
    link
    fedilink
    English
    1114 days ago

    Some AV Processors include a night mode or loudness processing that attempts to normalize the levels. In practice, the levels will lower some, but perhaps not enough to alleviate the problem.

    You could try reporting the provider, but it’s likely their legal team would argue the CALM act doesn’t apply to them. Come to think of it, the FCC may not have ever formalized the rules still…

    • @Decipher0771OP
      link
      614 days ago

      That’s the act I was thinking of. I’m almost certain web streamers will say it doesn’t apply to them……and it’s definitely one of those things you’d take for granted until you hit the “new” streaming medium and realize why it was necessary in the first place.

  • @[email protected]
    link
    fedilink
    English
    10
    edit-2
    14 days ago

    You can get an unencrypted hdmi out by using a splitter. I do this to record video with camlink. This is the splitter I use between a dedicated device like a firetv and the camlink: https://a.co/d/clpveZh

  • @[email protected]
    link
    fedilink
    1014 days ago

    If this pisses you off so much that you think about processing the HDMI streams, why don’t you directly go to sail the high seas?

    • @Decipher0771OP
      link
      -514 days ago

      Because I think this could be neat product……kinda like PiKVM, but maybe using ML to detect ads and make it a nice community tool to block in a device independent way. like hardware Adblock.

      • @[email protected]
        link
        fedilink
        -3
        edit-2
        14 days ago

        So you came here with zero technical expertise or knowledge about the situation, and asking for specific steps on how to do this in order to make a product? 😂🤣🤦 Hope there was some profit sharing involved somewhere.

        How would ML detect ads? Do you know the difference between ML and CV? You may want to start there.

        Get a Pihole or AdGuard endpoint and hope for the best if all you want is to remove ads.

        • @[email protected]
          link
          fedilink
          6
          edit-2
          14 days ago

          So you came here with zero technical expertise or knowledge about the situation, and asking for specific steps on how to do this in order to make a product?

          no need to be rude

        • @Decipher0771OP
          link
          -614 days ago

          And you came here with nothing productive to add 🤣 we can both make useless comments it seems

            • @Decipher0771OP
              link
              014 days ago

              I suspect we got off on the wrong foot when I called it a product instead of just a project idea, but I don’t actually disagree with that stance. Cheers.

  • voxel
    link
    fedilink
    713 days ago

    lol hdcp will absolutely fuck you over with this one.

    • @[email protected]
      link
      fedilink
      213 days ago

      Isn’t HDCP crap? If I remember correctly it’s extremely easy to buy HDCP compliant splitters and stuff that just strips all protection.

  • @[email protected]
    link
    fedilink
    513 days ago

    I think you are over complicating things. Just get an HDMI audio extractor (HDCP compliant), feed the audio into an audio compressor/limitor, then you can run the audio into your speakers or buy an HDMI audio injector to feed back into your TV.

      • @[email protected]
        link
        fedilink
        112 days ago

        Audio compressors do not compress all of your audio. Please refer to the graph in my original comment.

      • @[email protected]
        link
        fedilink
        110 days ago

        I’m pretty sure the compression is amplitude compression, just making it quieter not data compression. All the audio information will remain, just volume changed

  • @[email protected]
    link
    fedilink
    English
    114 days ago

    The easiest thing to do would be to check for a volume limit or range compression option on your TV, sound bar, or whatever.

    • @Decipher0771OP
      link
      114 days ago

      True….I’m hoping to expand on it to full ad detection and blocking eventually tho.

      • Em Adespoton
        link
        114 days ago

        Ever heard of TiVo? LoCast?

        Both were a thing at one point. The first could do almost what you describe, the second did what you’d need to do today to accomplish the same thing.

        The first lost the market when HDMI came along, as it couldn’t decrypt HDCP. The second was found to be illegal and shut down, despite being (in my opinion) very obviously fair use (although they were technically rebroadcasting, which is what got them in trouble).

        All this to say, if you find a legal way to evade HDCP, whatever you do will likely be deemed illegal anyway. Fine for a GitHub project, not fine for a business venture.

        • @Decipher0771OP
          link
          114 days ago

          A modern TiVo pretty much what I had in mind. I believe they detected commercials by a couple seconds of blank between shows and commercial breaks. Using ML based object/logo detection might be a modern way to do it.

          I hear the way hdmi splitters work is by providing a full hdcp 4k stream to one side and use hdcp fallback to 720p for the other side. That should work sufficiently for identifying an ad or not.

          And yeah I didn’t mean a commercial product, more an OSS project that could be useful for hobbyists.