• pixelscience@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    1 year ago

    But part of the fun of FFmpeg is spending two days trying to figure out how to get it to do what you are trying to do.

    • Paradox@lemdro.idOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 year ago

      When writing my filtergraphs, I’ve found the following three “tricks” to be immensely helpful

      1. Use an actual editor. Fish shell has a keybind that opens the current prompt in your $EDITOR, and saving+quitting returns to the editor. Makes multi line ffmpeg filters trivial. Doubly so if your editor has something like TabNine completions
      2. If that’s not enough, write the filter in a dedicated file, and use either editor automation or something like entr to run ffmpeg’s graph2dot command and then graphviz to get a visualization of said graph. Helps ferret out bugs
      3. Build up more complex graphs using either ffplay or mpv. You can add filters at runtime to mpv via the repl (press ~) and the vf add command