After a recent data loss, I’m reconsidering various CODECs before re-encoding my re-pirated “loot”. I’m looking to maintain a good balance between quality and file size as my previous files were HUGE. I’ve read about x264, h264, h265 & vp9 for video and it’s between AAC or AC-3 for audio. I’m looking for long-term and broad device compatibility. Also, I’ll be using FFBatch front-end for ffmpeg for re-encoding. So, fellow pirates, what are your libraries coded in? Any helpful input would be greatly appreciated.

  • Pulp@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    12
    ·
    1 year ago

    I recommend using H.265 and Opus for audio. In my opinion, encoding to H.264 in 2023 is not a wise choice. AV1 is a good option, especially with hardware encoding and compatible devices.

  • HumanPerson@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    First, just to be clear because codec terminology can be weird, x264 is a h264 encoder, not a separate codec. H265 is not an open standard so it may not play back properly if you use a Firefox or a Firefox based browser. I would recommend av1 if you can encode it, as it is good for quality and file size, however only new GPUs can encode it. CPUs can encode it slowly, but if you don’t have a new gpu (like 40 series Nvidia, arc, or AMD 7000 and maybe 6000) I would recommend vp9. It is a bit worse for file size but it won’t take a year to encode and should be compatible with most browsers.

    • Rodrigo_de_Mendoza@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      1 year ago

      Thanks for the clarification on 264. I have an AMD 3700x with Radeon 470 graphics card. I’d like a decent balance between CPU/GPU encoding so not to put too much stress on just the CPU. I know nothing about AV1. Can Smart TVs read the AV1 or VP9 codec? I know my LG will take H.264 & H.265 but I haven’t tried the others?

      • HumanPerson@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I am not too knowledgeable on different encoders, but I don’t know if using cpu and gpu is an option. Av1 and vp9 are open standards, meaning basically anything can implement them, but av1 is new so older devices haven’t. The tv will probably handle vp9 fine, but I would still recommend transcoding a test video and looking if it plays back natively. With that gpu av1 is definitely not supported so I would recommend vp9.

  • entropicdrift@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 year ago

    I’m favoring h265 10-bit for my library recently. Whether SDR or not, it seems to provide a slightly better compression ratio and fewer banding artifacts than 8-bit. Any player that can handle 4K streaming content can decode h265 10-bit, so there’s a ton of forward compatibility for the foreseeable future

  • neo [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    Depending on what I’m encoding, I am trying as much as possible to do AV1 + Opus.

    x264 kind of stands on its own. It is a legendary encoder with excellent encode times, but h264 is an ancient codec and it really shows if you don’t give it a bitrate that’s, frankly, too high. I use it most frequently these days for sharing short, low res clips of videos on Discord or through iMessage or something.

    So that leaves us with with our modern choices: hevc, vp9, and AV1.
    Off the bat I would say VP9 is irrelevant just because it’s way too slow to encode, and is effectively superseded by AV1. To whatever extent possible I try to use AV1, reencode into AV1, download AV1, and so forth. When done correctly it will shrink files even smaller than hevc can, it can encode relatively quickly with SVT-AV1 and is patent unencumbered so it’s actually supported in web browsers. If the video is an AV1 .webm it will play in Firefox. If I need subtitles, I can put them in a .mkv.

    HEVC (with x265) is a pretty strong choice. I will not avoid downloading torrents in this format but I will avoid encoding into it. It maybe has better compatibility in certain cases, like if you have a “smart” TV (ugh) that can natively decode it. In which case that might override any decision you will make: you just want the best compatibility with your existing hardware.

    As for audio, that’s Opus. Every time. It absolutely whips. For stereo audio I can do Opus at 96 or 112kbps and it is transparent. Another source with more going on (maybe loud explosions and effects and all that) could possibly benefit from 128. It’s great.

    The final thing to mention about encoding is no matter which codec you use you will have to learn a bit about how to use it. You can one and done the encoders with default choices, but at minimum you do need to factor in what happens when you do things like change preset speeds. From there you can consider things like what about changing the keyframe interval (for shorter vids I will do more frequent keyframes to make seeking tolerable. For something like a full movie a keyframe every 10 seconds is probably fine. But what about scene detection? What about bit depth?). Potentially much to consider.

  • PeachMan@lemmy.one
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    For broad compatibility and good quality+compression, h265. I use Handbrake’s Nvidia encoder and it works great. I’m not sure about the differences between AAC and AC3.

    • entropicdrift@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      AAC is generally more modern and better for lower bitrates, but AC3 (also known as Dolby Digital) has the advantage of being able to be transmitted in 5.1 over SPIDF optical connections, so it can allow for surround sound in older setups that may not otherwise be able to recieve digital surround sound.

      Opus is slightly better than AAC at matched bitrates, slightly less commonly supported, and totally open-source. It’s a fine choice as well.

      Also of note because of its use for anime encodes is FLAC, which is lossless and therefore results in much larger files, but will always have the exact same quality as the original audio it encoded, so it’s excellent for archival quality.

  • drwankingstein@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    1 year ago

    Av1 is pretty well supported now on a lot of devices thanks to dav1d, and it’s the video codec with the best quality:compression ratio. “broad device compatibility” will be up to you and your devices, I would seriously look into it. It’s what I personally encode all my stuff to.

    as for audio Opus or AAC, AC-3 is bad

    • MasterBuilder@lemmy.one
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Why is AC-3 bad? It’s pretty much compatible with everything, holds Dolby Digital and atmos. Especially if the source is already encoded in AC-3, would it be wise to re-encode it?

      • drwankingstein@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        if you already have AC-3 content you can leave it as is, however as a codec itself, it is worse then aac and opus in terms of fidelity:size

        • MasterBuilder@lemmy.one
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          I agree that if it is already AAC, it should not be changed as it has the highest fidelity and best compression.

          While AC-3 is not the best, it and AC-4 are the only formats i know that can encode TrueHD and Atmos metadata, so that should be kept it it is there.

          Any transcode will lose fidelity unless the target codec is lossless, and I don’t think AAC has a lossless mode.

          • drwankingstein@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            yeah but OP is wondering about transcoding their stuff. there is no reason to encode to AC3. I would just use traditional surround if you plan kn transcoding it.