{"record":{"id":"a853ba9ae927b158","repo":"AlexxIT/go2rtc","slug":"ffmpeg-unsupported-version","errorCode":null,"errorMessage":"ffmpeg: unsupported version: ","messagePattern":"ffmpeg: unsupported version: ","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/ffmpeg/version.go","lineNumber":40,"sourceCode":"\t}\n\n\tcmd := exec.Command(defaults[\"bin\"], \"-version\")\n\tb, err := cmd.Output()\n\tif err != nil {\n\t\tverFF = \"-\"\n\t\tverErr = err\n\t\treturn verFF, verErr\n\t}\n\n\tverFF, verAV = ffmpeg.ParseVersion(b)\n\n\tif verFF == \"\" {\n\t\tverFF = \"?\"\n\t}\n\n\t// better to compare libavformat, because nightly/master builds\n\tif verAV != \"\" && verAV < ffmpeg.Version50 {\n\t\tverErr = errors.New(\"ffmpeg: unsupported version: \" + verFF)\n\t}\n\n\tlog.Debug().Str(\"version\", verFF).Str(\"libavformat\", verAV).Msgf(\"[ffmpeg] bin\")\n\n\treturn verFF, verErr\n}\n","sourceCodeStart":22,"sourceCodeEnd":47,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/internal/ffmpeg/version.go#L22-L47","documentation":"go2rtc checks the bundled/linked FFmpeg version by parsing ffmpeg -version, comparing the libavformat version against the minimum supported (ffmpeg.Version50). If libavformat is older than 5.0, ffmpeg.NewProducer cannot work with it and Version returns this error naming the reported ffmpeg version string.","triggerScenarios":"Using a system FFmpeg older than 5.0 (libavformat < 58.x/59 boundary per Version50) with the ffmpeg module; distro ships FFmpeg 4.x.","commonSituations":"Ubuntu 20.04/Debian 11 with FFmpeg 4.x; minimal Docker images pinning old FFmpeg; nightly/master builds reporting odd version strings but old libavformat.","solutions":["Upgrade FFmpeg to >= 5.0 (or a build with libavformat >= 59)","Install FFmpeg from a newer repo (e.g. jrottenberg/ffmpeg image, distro backports, static builds from BtbN/FFmpeg-Builds)","Point the ffmpeg module at a newer binary path in config","If upgrade is impossible, use a different source type (e.g. exec/rtsp) instead of the ffmpeg producer"],"exampleFix":"// before\napt install -y ffmpeg   # v4.x on Ubuntu 20.04\n// after\n# install FFmpeg 6.x static build\nwget https://github.com/BtbN/FFmpeg-Builds/releases/latest/download/ffmpeg-master-latest-linux64-gpl.tar.xz","handlingStrategy":"validation","validationCode":"out, _ := exec.Command(\"ffmpeg\", \"-version\").Output()\nif strings.Contains(string(out), \"ffmpeg version 4\") { return errors.New(\"ffmpeg >= 5.0 required\") }","typeGuard":null,"tryCatchPattern":"ver, err := ffmpeg.Version(); if err != nil && strings.Contains(err.Error(), \"unsupported version\") { /* switch to exec/rtsp source or upgrade ffmpeg */ }","preventionTips":["Pin FFmpeg >= 5.0 in Dockerfiles and install scripts","Check ffmpeg -version / libavformat version after OS upgrades","Avoid distro FFmpeg 4.x (Ubuntu 20.04, Debian 11) with the go2rtc ffmpeg module"],"tags":["ffmpeg","version","compatibility","go2rtc"],"backgroundTag":"unsupported-version","analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}