My use-case: streaming video to a Linux virtual mount and want compression of said video files on the fly.

Rclone has an experimental remote for compression but this stuff is important to me so that’s no good. I know rsync can do it but will it work for video files, and how I get rsync to warch the virtual mount-point and automatically compress and move over each individual file to rclone for upload to the Cloud? This is mostly to save on upload bandwidth and storage costs.

Thanks!

Edit: I’m stupid for not mentioning this, but the problem I’m facing is that I don’t have much local storage, which is why I wanted a transparent compression layer and directly push everything to the Cloud. This might not be worth it though since video files are already compressed. I will take a look at handbrake though, thanks!

  • catloaf@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 months ago

    This sounds like an XY problem. I would first recommend not streaming to disk, but streaming to a program that does compression, and write that to disk.

    If that’s unavoidable, can you stream to a pipe or socket? A compressor should be able to read from there and do its work.

    If you can’t control the stream to disk, there are plenty of file watcher tools that can run arbitrary commands.

    • MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      Streaming to a socket sounds like a decent idea. I don’t know how and which program I could stream to; is there a way for handbrake to transparently reencode video and send it to a virtual FUSE mount-point? The problem I have is no local storage to keep video.