Skip to content

Conversation

Dan-Flores
Copy link
Contributor

@Dan-Flores Dan-Flores commented Oct 6, 2025

This PR adds 8 as an option in load_torchcodec_shared_libraries() and _core/CMakeLists.txt to enable FFmpeg8 builds.

In addition, to enable local builds with FFmpeg8, we need to update our pixel_format setting approach.
Old flow (<= FFmpeg7) :

  • Create and init the filter with avfilter_graph_create_filter()
  • then set "pix_fmts" with av_opt_set_int_list .

New flow (>= FFmpeg8) :

  • Allocate the filter with avfilter_graph_alloc_filter
  • set "pixel_formats" with av_opt_set
  • then init with avfilter_init_str.

These changes are encapsulated FFmpegCommon.h in createBuffersinkFilter(), which either returns AVFilterContext* or nullptr if an error occurred.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 6, 2025
@Dan-Flores Dan-Flores marked this pull request as ready for review October 7, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant