{
  "generatedAt": "2026-09-11T05:34:25.423Z",
  "runtime": "native FFmpeg",
  "platform": "win32",
  "ffmpegVersion": "ffmpeg version 8.1-full_build-www.gyan.dev Copyright (c) 2000-2026 the FFmpeg developers",
  "scope": "Synthetic local inputs. One run per case. Not browser, device-capacity, visual-quality or Discord upload testing.",
  "cases": [
    {
      "id": "discord-single-pass-20mb",
      "command": "ffmpeg -i input.mp4 -map 0:v:0 -map 0:a:0? -c:v libx264 -b:v 1560k -preset medium -c:a aac -b:a 128k -map_metadata -1 -map_chapters -1 -sn -dn -movflags +faststart discord-20mb.mp4",
      "input": {
        "generatorArgs": [
          "-f",
          "lavfi",
          "-i",
          "testsrc2=size=640x360:rate=30:duration=90",
          "-f",
          "lavfi",
          "-i",
          "sine=frequency=440:sample_rate=48000:duration=90",
          "-c:v",
          "libx264",
          "-preset",
          "ultrafast",
          "-crf",
          "18",
          "-c:a",
          "aac",
          "-b:a",
          "128k",
          "-shortest",
          "input.mp4"
        ],
        "bytes": 30180387,
        "durationSeconds": 90,
        "streams": [
          {
            "codec_name": "h264",
            "codec_type": "video",
            "width": 640,
            "height": 360,
            "r_frame_rate": "30/1"
          },
          {
            "codec_name": "aac",
            "codec_type": "audio",
            "r_frame_rate": "0/0"
          }
        ],
        "sha256": "e1cdbcd795ee3acd98b2b2c6ea0bb419bdd98178f99fd780e469a65ae368450e"
      },
      "output": {
        "bytes": 19039954,
        "durationSeconds": 90.005,
        "streams": [
          {
            "codec_name": "h264",
            "codec_type": "video",
            "width": 640,
            "height": 360,
            "r_frame_rate": "30/1"
          },
          {
            "codec_name": "aac",
            "codec_type": "audio",
            "r_frame_rate": "0/0"
          }
        ],
        "sha256": "cab5eb155f81552620335e20d1ed330a4244560d2c0e6ced7275a41522bbf603"
      },
      "expected": {
        "duration": 90,
        "tolerance": 0.1,
        "audioStreams": 1,
        "limitBytes": 20000000
      },
      "passed": true
    },
    {
      "id": "discord-two-pass-20mb",
      "command": "ffmpeg -i input.mp4 -map 0:v:0 -map 0:a:0? -c:v libx264 -b:v 1560k -preset medium -pass 2 -passlogfile discord20-pass -c:a aac -b:a 128k -map_metadata -1 -map_chapters -1 -sn -dn -movflags +faststart discord-20mb-2pass.mp4",
      "input": {
        "generatorArgs": [
          "-f",
          "lavfi",
          "-i",
          "testsrc2=size=640x360:rate=30:duration=90",
          "-f",
          "lavfi",
          "-i",
          "sine=frequency=440:sample_rate=48000:duration=90",
          "-c:v",
          "libx264",
          "-preset",
          "ultrafast",
          "-crf",
          "18",
          "-c:a",
          "aac",
          "-b:a",
          "128k",
          "-shortest",
          "input.mp4"
        ],
        "bytes": 30180387,
        "durationSeconds": 90,
        "streams": [
          {
            "codec_name": "h264",
            "codec_type": "video",
            "width": 640,
            "height": 360,
            "r_frame_rate": "30/1"
          },
          {
            "codec_name": "aac",
            "codec_type": "audio",
            "r_frame_rate": "0/0"
          }
        ],
        "sha256": "e1cdbcd795ee3acd98b2b2c6ea0bb419bdd98178f99fd780e469a65ae368450e"
      },
      "output": {
        "bytes": 19115005,
        "durationSeconds": 90.005,
        "streams": [
          {
            "codec_name": "h264",
            "codec_type": "video",
            "width": 640,
            "height": 360,
            "r_frame_rate": "30/1"
          },
          {
            "codec_name": "aac",
            "codec_type": "audio",
            "r_frame_rate": "0/0"
          }
        ],
        "sha256": "4c8fe64796f545d25362dbdcd523999543b32acf651281d85d8de54333d3250f"
      },
      "expected": {
        "duration": 90,
        "tolerance": 0.1,
        "audioStreams": 1,
        "limitBytes": 20000000
      },
      "passed": true,
      "preparationCommand": "ffmpeg -i input.mp4 -map 0:v:0 -c:v libx264 -b:v 1560k -preset medium -pass 1 -passlogfile discord20-pass -an -f null -"
    },
    {
      "id": "fps-only-preserves-duration",
      "command": "ffmpeg -i input.mp4 -vf fps=1/10 -an -c:v libx264 fps-only.mp4",
      "input": {
        "generatorArgs": [
          "-f",
          "lavfi",
          "-i",
          "testsrc2=size=320x180:rate=30:duration=20",
          "-c:v",
          "libx264",
          "-preset",
          "ultrafast",
          "-crf",
          "18",
          "input.mp4"
        ],
        "bytes": 2478784,
        "durationSeconds": 20,
        "streams": [
          {
            "codec_name": "h264",
            "codec_type": "video",
            "width": 320,
            "height": 180,
            "r_frame_rate": "30/1"
          }
        ],
        "sha256": "a6d06d5b5693b9f1e78fc4fe230ea6836f081b9b4d753ce1a1b8bca8395369b5"
      },
      "output": {
        "bytes": 13375,
        "durationSeconds": 20,
        "streams": [
          {
            "codec_name": "h264",
            "codec_type": "video",
            "width": 320,
            "height": 180,
            "r_frame_rate": "1/10"
          }
        ],
        "sha256": "81c533caaa87ef5ea91d8e2a43a648706559df4a684d1241e35bc03e37ab0b73"
      },
      "expected": {
        "duration": 20,
        "tolerance": 0.1,
        "audioStreams": 0
      },
      "passed": true
    },
    {
      "id": "timelapse-10x",
      "command": "ffmpeg -i input.mp4 -vf \"fps=3,settb=AVTB,setpts=N/(30*TB),fps=30\" -an -c:v libx264 -pix_fmt yuv420p timelapse-10x.mp4",
      "input": {
        "generatorArgs": [
          "-f",
          "lavfi",
          "-i",
          "testsrc2=size=320x180:rate=30:duration=20",
          "-c:v",
          "libx264",
          "-preset",
          "ultrafast",
          "-crf",
          "18",
          "input.mp4"
        ],
        "bytes": 2478784,
        "durationSeconds": 20,
        "streams": [
          {
            "codec_name": "h264",
            "codec_type": "video",
            "width": 320,
            "height": 180,
            "r_frame_rate": "30/1"
          }
        ],
        "sha256": "a6d06d5b5693b9f1e78fc4fe230ea6836f081b9b4d753ce1a1b8bca8395369b5"
      },
      "output": {
        "bytes": 121761,
        "durationSeconds": 2,
        "streams": [
          {
            "codec_name": "h264",
            "codec_type": "video",
            "width": 320,
            "height": 180,
            "r_frame_rate": "30/1"
          }
        ],
        "sha256": "a0baa704751eab8bf88f1a4666cca7a5cd444c96f2a9cae3907dbe2fd7355cca"
      },
      "expected": {
        "duration": 2,
        "tolerance": 0.05,
        "audioStreams": 0
      },
      "passed": true
    },
    {
      "id": "timelapse-300x",
      "command": "ffmpeg -i input.mp4 -vf \"fps=1/10,settb=AVTB,setpts=N/(30*TB),fps=30\" -an -c:v libx264 -pix_fmt yuv420p timelapse-300x.mp4",
      "input": {
        "generatorArgs": [
          "-f",
          "lavfi",
          "-i",
          "testsrc2=size=320x180:rate=30:duration=20",
          "-c:v",
          "libx264",
          "-preset",
          "ultrafast",
          "-crf",
          "18",
          "input.mp4"
        ],
        "bytes": 2478784,
        "durationSeconds": 20,
        "streams": [
          {
            "codec_name": "h264",
            "codec_type": "video",
            "width": 320,
            "height": 180,
            "r_frame_rate": "30/1"
          }
        ],
        "sha256": "a6d06d5b5693b9f1e78fc4fe230ea6836f081b9b4d753ce1a1b8bca8395369b5"
      },
      "output": {
        "bytes": 7618,
        "durationSeconds": 0.066667,
        "streams": [
          {
            "codec_name": "h264",
            "codec_type": "video",
            "width": 320,
            "height": 180,
            "r_frame_rate": "30/1"
          }
        ],
        "sha256": "7f594547ab9cf4d4ef1f5908125792000e6e9d756ed526300e4b919dd9595dd9"
      },
      "expected": {
        "duration": 0.06666666666666667,
        "tolerance": 0.02,
        "audioStreams": 0
      },
      "passed": true
    }
  ]
}
