You have seen them, video clips grabbed off Instagram or TikTok have this EXTREMELY annoying logo and sound at the end (specially Instagram lately, doubly so with headphones). I’d like to just throw a script/command/Bash alias at any of these and have a resulting video without them, and ffmpeg IS the Swiss army knife of video processing, but it’s syntax is NOT what you’d call simple. Does anyone have a recipe for this already?

    • jherazob@beehaw.orgOP
      link
      fedilink
      English
      arrow-up
      13
      ·
      19 days ago

      I can think of one: it’s FUCKING annoying, I’d be quite fine with the creator watermark in the video itself (and many do so), but that extra tacked-on logo clip, usually at 2-3 times the volume of the clip itself, is EXTREMELY annoying, i understand what you say but this is also a legitimate reason

      • delcake@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        17 days ago

        Since the primary complaint is unbalanced audio levels, perhaps the better question would be how to construct a command to normalize the audio of the clip rather than removing the attribution to the creators.

        • jherazob@beehaw.orgOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 days ago

          Since you mentioned it days ago I’ve been thinking it, would i be OK with those if the sound was normalized? Been actually checking it, normalizing audio on clips and seeing if i am now OK with those. And the answer continues to be a no. Why? Because IT’S AN AD. It’s an ad for the enshittified, cancerous social media platform it came from. Put creator watermarks in the video itself like so many already do, then chop off those COMPLETELY unnecessary ads for tikitocs or Zuckergram, and we’ll be better off and missing nothing.

    • babyincubi@beehaw.org
      link
      fedilink
      arrow-up
      8
      ·
      18 days ago

      For both platforms, the uploader’s username shows throughout the video when downloaded, not just at the end. Removing the part op wants to get rid off does nothing to prevent knowing who the original uploader was.

  • bruce965@lemmy.ml
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    19 days ago

    I would recommend checking out LosslessCut. Behind the curtain it runs ffmpeg, so you should be able to find the perfect command.

    In the features list:

    View ffmpeg last command log so you can modify and re-run modify recent commands on the command line

  • mox@lemmy.sdf.org
    link
    fedilink
    arrow-up
    7
    ·
    19 days ago

    I would try the -to option with a negative duration. (I’m assuming negative duration counts from the end of the file instead of the beginning.)

    • bbbhltz@beehaw.org
      link
      fedilink
      arrow-up
      9
      ·
      19 days ago

      I think this is the easiest. But, -to can’t do negative times. You need to nest a different comment inside the FFmpeg command to to the math.

      I think this might work to remove 2 seconds from the end of a video

      ffmpeg -ss 0 -i in.mp4 -t $(( $(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 in.mp4 |cut -d\. -f1) - 2 )) -c copy out.mp4

  • unknowing8343@discuss.tchncs.de
    link
    fedilink
    arrow-up
    5
    ·
    18 days ago

    This is my (controversial) tip: ask an LLM. It works wonderfully for these cases. “Give me an ffmpeg command that cuts the last X seconds of a video in a lossless manner, stabilizes it and speeds it up 200%”.

    You can then checkout those commands on the manual/online to verify.