Does someone have a script that converts all videos files from 264 to 265 and changes the name?

Even an attempt at it would be appreciated

  • Kevnyon@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    I use ffmpeg batch AV converter, you can convert multiple files automatically, its great for that.

  • beta_tester@lemmy.mlOP
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    What about

    #!/bin/bash
    
    find . -type f -name '*.mp4' -exec sh -c 'ffmpeg -i "$0" -c:v libx265 "${0%.mp4}-conv.mp4""' {} \;
    
    • navigatron@beehaw.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 months ago

      That looks promising. Just keep in mind that this will take a very long time to run. I believe there is a *arr out there that can manage this / show progress, but the name escapes me

    • beta_tester@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 months ago

      I did that a long time ago and I was more pleased with unmanic but I’ve got one job and that’s just to convert 264 to 265 which should be straightforward and easy and many people should want this as ee all have limited storage

  • Faceman🇦🇺@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    I have several media libraries so I set up file flows to only perform compression based on a few specific rules. I never used to compress, but 2 years ago I ran out of space and had no money to upgrade disks, so I started compressing, intending for it to be temporary until I could add space. but it became part of my servers automatic setup and it works great.

    TV show episodes between 3 and 5gb that aren’t already H265 get compressed with RF21 H265, but files over 5gb get RF22. only files older than 6 weeks get compressed to give people a chance to watch them in original quality. the compression flow also includes making a stereo aac downmix audio track for added compatibility. so anything that is already H265 or low bitrate is left untouched to avoid unnecessary compression.

    Movies get a similar treatment and H264 files under 5gb are ignored, 5-20gb gets RF21 and 20gb plus gets RF22. All of this is done with 10bit H265 as it tends to look a little better. the amount of compression I;m doing is pretty small, a 3gb TV show for example might end up being 2gb or so, and a 30gb movie will usually end up around 12-15gb at most. I could push harder, particularly for movies but I don’t see a need as i’ve saved 13TB so far with this setup.

    If sonarr/radarr download new versions of something (a TV show gets released on bluray for example) it will go back into the loop and get compressed again, but now it will be a higher quality.

    4K shows and movies are always left untouched, they are in a separate library and are only accessible to certain clients.