• WolfLink@sh.itjust.works
    link
    fedilink
    arrow-up
    10
    ·
    12 hours ago

    Compress video to a broadly compatible format:

    ffmpeg -i input -c:v libx264 -pix_fmt yuv420p -crf 25 -preset slow -c:a libfdk_aac -b:a 128k output.mp4
    

    This incantation is what I end up needing 99% of the time I do something with ffmpeg.

      • WolfLink@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        6 hours ago

        I ran a comparison between libsvtav1 and h264 and h265 and found that libsvtav kinda sucks.

        It does produce smaller file sizes at h265, but it tends to add a visible blur.

  • Ganbat@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    44
    ·
    2 days ago

    Why learn when you can do what I do and look it up every single time you want to do something as though you are but a goldfish who learned to type?

    • hraegsvelmir@ani.social
      link
      fedilink
      arrow-up
      1
      ·
      11 hours ago

      Because you can improve and refine your technique. For example, I no longer need to open up duckduckgo to figure out what that one command was that worked for me 6 months ago. Now, I just type away. ctrl-r, ffmpeg, and bam, right there in my shell history, all I need to do is change the inputs and outputs.

  • tiramichu@sh.itjust.works
    link
    fedilink
    arrow-up
    24
    ·
    2 days ago

    I find it wild there are countless “convert videos online for free!” sites on the Internet full of bonus malware which are all just thin wrappers around ffmpeg. And yet they persist because people want googleable answers to their problem which don’t need a command line or downloading anything.

    Personally I’ve got a Python script which provides a slightly friendlier wrapper around ffmpeg for my common use-cases.

    But honestly ffmpeg is such a beast, so much of what we use daily depends on it under the hood.

    • [object Object]@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      11 hours ago

      Wait until you hear that ffmpeg is available as a library, including for Python. And that there are Python modules providing Python-specific ways of specifying the processing filters and whatnot, instead of putting them into the single command string.

    • Limerance@piefed.social
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 days ago

      There are many nice and FOSS GUIs for the tasks ffmpeg is usually used for.

      Handbrake is a great example for macOS, windows, Linux.

      For more advanced video compression Shutter Encoder is fantastic.

      Good old AVIDemux has a few other cool features as well, like cutting without reencoding.

      There are also a bunch of straight up ffmpeg front ends as well.

      Why do people use those shitty websites?

      They show up as a fast and easy option without having to research, download, install, and learn to use a more complicated application.

      • tiramichu@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        For sure yeah.

        I still end up having to use ffmpeg directly (in combination with other CLI tools) because there’s always something the GUIs haven’t caught up with yet. Most recently for me it was converting animated webp’s into something I could actually work with

  • Passerby6497@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 days ago

    Why learn ffmpeg when you can find the holy words that invokes the machine spirits transmutation codex and write them on your data slate to be used again later?