Skip to content

Add attached_pic property to avformat consumer#1207

Merged
ddennedy merged 4 commits intomasterfrom
attached_pic
Mar 20, 2026
Merged

Add attached_pic property to avformat consumer#1207
ddennedy merged 4 commits intomasterfrom
attached_pic

Conversation

@bmatherly
Copy link
Member

This allows applications to add cover art to files

This allows applications to add cover art to files
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support to the avformat consumer for embedding cover art (FFmpeg “attached picture” stream) into output files, and updates the consumer metadata version accordingly.

Changes:

  • Bump consumer_avformat metadata version to 6.
  • Add a new attached_pic consumer parameter (file picker) to specify a cover-art image path.
  • Implement image loading, basic JPEG/PNG detection, dimension parsing, stream creation, and writing the attached picture packet right after the container header.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/modules/avformat/consumer_avformat.yml Adds the attached_pic parameter and bumps the module metadata version.
src/modules/avformat/consumer_avformat.c Implements attached-picture stream creation and writes cover art immediately after the container header.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@ddennedy ddennedy added this to the v7.38.0 milestone Mar 15, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new attached_pic consumer property to the avformat (FFmpeg output) module so callers can embed cover art into output files.

Changes:

  • Bump avformat consumer definition version and introduce a new attached_pic parameter in the YAML schema.
  • Add cover-art handling in consumer_avformat.c: detect JPEG/PNG, parse dimensions, create an attached-picture stream, and write the packet after header (or as Matroska attachment).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/modules/avformat/consumer_avformat.yml Bumps consumer version and documents the new attached_pic parameter.
src/modules/avformat/consumer_avformat.c Implements reading an image file and muxing it as cover art via an attached-picture stream/attachment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ddennedy ddennedy merged commit 2d426cc into master Mar 20, 2026
25 checks passed
@ddennedy ddennedy deleted the attached_pic branch March 20, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants