Skip to content

Fix AV1 transcode validation: move -t option to output side of ffmpeg command#398

Merged
ShaneIsrael merged 2 commits intodevelopfrom
copilot/fix-av1-transcoding-errors
Jan 20, 2026
Merged

Fix AV1 transcode validation: move -t option to output side of ffmpeg command#398
ShaneIsrael merged 2 commits intodevelopfrom
copilot/fix-av1-transcoding-errors

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

AV1 files fail validation with "No sequence header" and "Corrupt frame detected" errors because the decode test limits input duration before the decoder can initialize.

Changes

  • Move -t 2 from input to output position in the ffmpeg decode test command within validate_video_file()

When -t precedes -i, it limits bytes read from input. AV1's sequence header may not be reached in time. As an output option, ffmpeg reads enough to initialize the decoder properly.

# Before: -t as input option (breaks AV1)
decode_cmd = ['ffmpeg', '-v', 'error', '-t', '2', '-i', path, '-f', 'null', '-']

# After: -t as output option (allows decoder init)
decode_cmd = ['ffmpeg', '-v', 'error', '-i', path, '-t', '2', '-f', 'null', '-']
Original prompt

I am getting this errors when trying to transcode some files that were originally encoded in AV1. Any ideas or suggestions on a fix?

[libaom-av1 @ 0x55cdb09802c0] Failed to decode frame: Corrupt frame detected
[libaom-av1 @ 0x55cdb09802c0] Additional information: No sequence header
[vist#0:0/av1 @ 0x55cdb0de8040] Error submitting packet to decoder: Invalid data found when processing input


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…eg decode test

Co-authored-by: ShaneIsrael <1677199+ShaneIsrael@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix errors in transcoding AV1 encoded files Fix AV1 transcode validation: move -t option to output side of ffmpeg command Jan 20, 2026
Copilot AI requested a review from ShaneIsrael January 20, 2026 03:56
@ShaneIsrael ShaneIsrael marked this pull request as ready for review January 20, 2026 03:56
@ShaneIsrael ShaneIsrael merged commit 359e785 into develop Jan 20, 2026
@ShaneIsrael ShaneIsrael deleted the copilot/fix-av1-transcoding-errors branch January 20, 2026 06:16
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.

2 participants