Skip to content

[Feature Request] FFmpeg features detection #1237

@xtkoba

Description

@xtkoba

Checklist

  • I'm reporting a feature request
  • I've verified that I'm running yt-dlp version 2021.10.10
  • I've searched the bugtracker for similar feature requests including closed ones
  • I've read the opening an issue section in CONTRIBUTING.md
  • I have given an appropriate title to the issue

Description

Please add a mechanism for detecting available features of FFmpeg in use. Features should include but are not limited to bit stream filters (bsfs).

A use case is to determine whether setts is available as a bsf in the FFmpegFixupTimestampPP class. The current code (committed to e36d50c) relies on the output string of ffmpeg -version for the availiablity of setts. This does not work in every situation. One reason is because the version string of FFmpeg is not necessarily in the form of dot-decimal notation (e.g. 4.4) but can be a commit hash (e.g. 6260c61).

In a shell script, the avalilabilty of setts in bsfs can be checked in the following way:

$ ffmpeg -hide_banner -bsfs | grep ^setts$
setts

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions