Skip to content

ffmpeg: bump to master#136

Merged
ReenigneArcher merged 14 commits intonightlyfrom
ffmpeg-bump-to-v6.0
Oct 1, 2023
Merged

ffmpeg: bump to master#136
ReenigneArcher merged 14 commits intonightlyfrom
ffmpeg-bump-to-v6.0

Conversation

@ReenigneArcher
Copy link
Member

@ReenigneArcher ReenigneArcher commented Mar 10, 2023

Description

Bump ffmpeg from v5.1 to master (9a3bbf8) and enable new AV1 encoders.

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@psyke83 psyke83 requested a review from cgutman May 28, 2023 17:16
@psyke83 psyke83 force-pushed the ffmpeg-bump-to-v6.0 branch 7 times, most recently from 43832f6 to 0ca250c Compare May 28, 2023 20:40
@psyke83
Copy link
Contributor

psyke83 commented May 28, 2023

I tested the artifact from the latest run against nightly; software and amfenc appear to work fine, but I only tested on Windows 11 in SDR.

@cgutman
Copy link
Contributor

cgutman commented May 28, 2023

I think we need to also update 02-idr-on-amf.patch to cover amfenc_av1.c

@psyke83 psyke83 force-pushed the ffmpeg-bump-to-v6.0 branch 2 times, most recently from bc90d6d to d68acb4 Compare May 29, 2023 00:27
@psyke83
Copy link
Contributor

psyke83 commented May 29, 2023

I think we need to also update 02-idr-on-amf.patch to cover amfenc_av1.c

I've updated patch 01 (amf hdr) and 05 (qsv) with your suggested changes, but 02 (amf idr insertion) looks more complicated to implement.

The AV1 frame types seem different, and I'm not certain how to map the values to the traditional I/B/P/IDR/SKIP frames. The header insertion logic also seems more complicated (with different alignment types), so I'm not 100% certain how to implement the necessary changes.

@psyke83 psyke83 force-pushed the ffmpeg-bump-to-v6.0 branch from d68acb4 to 44e48f1 Compare May 29, 2023 01:03
@cgutman cgutman force-pushed the ffmpeg-bump-to-v6.0 branch 4 times, most recently from f04be23 to 1863d14 Compare July 6, 2023 00:17
@ReenigneArcher ReenigneArcher marked this pull request as ready for review July 11, 2023 01:13
Copy link
Contributor

@cgutman cgutman left a comment

Choose a reason for hiding this comment

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

We can't merge this because FFmpeg 6.0 introduces a memory leak in the QSV context. We should be able to use FFmpeg 6.1 when it's released.

@ReenigneArcher ReenigneArcher marked this pull request as draft August 14, 2023 02:21
@cgutman cgutman force-pushed the ffmpeg-bump-to-v6.0 branch from 64c41a3 to 51740a8 Compare August 15, 2023 23:34
@cgutman cgutman force-pushed the ffmpeg-bump-to-v6.0 branch 2 times, most recently from 813450b to 51740a8 Compare August 16, 2023 03:50
@cgutman cgutman force-pushed the ffmpeg-bump-to-v6.0 branch from 51740a8 to 0aeecac Compare August 17, 2023 03:29
@cgutman cgutman force-pushed the ffmpeg-bump-to-v6.0 branch from 0aeecac to 7b6647d Compare August 17, 2023 03:42
@cgutman
Copy link
Contributor

cgutman commented Aug 20, 2023

Leaving these notes here so we don't forget:

For FFmpeg 6.1, we'll need to also change preanalysis -> preencode in our options dict, since upstream FFmpeg changed the semantics of the existing option in FFmpeg/FFmpeg@f593dc9

I believe the QSV encoders also gained a remote_gaming preset which we should probably use too.

@psyke83
Copy link
Contributor

psyke83 commented Aug 22, 2023

The AMF colourspace patch has also been updated to v3 (which includes av1 support): https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=9415

@cgutman cgutman changed the title ffmpeg: bump to v6.0 ffmpeg: bump to master Sep 30, 2023
VDPAU is a decoding API, so we don't need it
@cgutman cgutman marked this pull request as ready for review September 30, 2023 03:43
@cgutman cgutman dismissed their stale review September 30, 2023 03:45

No longer blocked due to 6.0 QSV leak

@cgutman
Copy link
Contributor

cgutman commented Sep 30, 2023

Testing progress:

  • QSV leak fix verified
  • Windows AMF H.264+HEVC
  • Windows AMF AV1
  • Windows QSV H.264+HEVC
  • Windows QSV AV1
  • Linux VAAPI H.264+HEVC
  • Linux VAAPI AV1
  • Linux NVENC H.264+HEVC
  • Linux NVENC AV1

@cgutman
Copy link
Contributor

cgutman commented Oct 1, 2023

I'm satisfied that this build generally works. Let's merge this and we can perform final testing on the PR to the Sunshine repo.

@ReenigneArcher ReenigneArcher merged commit 910fdf8 into nightly Oct 1, 2023
@ReenigneArcher ReenigneArcher deleted the ffmpeg-bump-to-v6.0 branch October 1, 2023 23:41
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