Opened 2 years ago
Last modified 5 months ago
#65623 assigned update
ffmpeg: update to 6.x
Reported by: | janngobble | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | Cc: | dbevans (David B. Evans), jeremyhu (Jeremy Huddleston Sequoia), mohd-akram (Mohamed Akram), rectalogic (Andrew Wason), i0ntempest, andlabs (Pietro Gagliardi) | |
Port: | ffmpeg |
Description (last modified by mascguy (Christopher Nielsen))
Macports on 4.4.2, ffmpeg currently GM release is at 6.0.
Change History (28)
comment:1 Changed 2 years ago by jmroot (Joshua Root)
Cc: | dbevans jeremyhu added |
---|---|
Owner: | set to mascguy |
Priority: | High → Normal |
Status: | new → assigned |
comment:2 Changed 2 years ago by jmroot (Joshua Root)
comment:3 Changed 2 years ago by mascguy (Christopher Nielsen)
The latest release is available via port ffmpeg-upstream
. However, we haven't updated ffmpeg
yet, as v5.x breaks a number of dependent ports.
You're welcome to try it though, via the following steps. But bear in mind that MacPorts will need to rebuild ports dependent on it, and you may see build failures for some of those. So caveat emptor!
$ sudo port -f deactivate ffmpeg $ sudo port -N install ffmpeg-upstream
comment:4 Changed 2 years ago by mascguy (Christopher Nielsen)
Summary: | ffmpeg live check failed...macports release is 3-4 releases behind. → ffmpeg: update to 5.x |
---|
comment:5 Changed 2 years ago by mascguy (Christopher Nielsen)
Version: | → 2.7.2 |
---|
comment:6 Changed 2 years ago by mascguy (Christopher Nielsen)
Type: | defect → update |
---|
comment:7 Changed 18 months ago by Christopher Nielsen <mascguy@…>
comment:8 Changed 18 months ago by mascguy (Christopher Nielsen)
Description: | modified (diff) |
---|---|
Summary: | ffmpeg: update to 5.x → ffmpeg: update to 6.x |
comment:9 Changed 18 months ago by mascguy (Christopher Nielsen)
As an intermediate step, port ffmpeg-upstream
has been segregated, so that it can now be installed alongside ffmpeg
. And as a starting point, binaries are symlinked in ${prefix}/bin
:
/opt/local/bin/ffmpeg6 /opt/local/bin/ffplay6 /opt/local/bin/ffprobe6
There's still more work to be done - such as symlinking the manpages and such - but making progress.
comment:10 follow-up: 11 Changed 18 months ago by mohd-akram (Mohamed Akram)
What are the issues with updating to FFmpeg 6? Perhaps there should be an ffmpeg4 port that lives in libexec for ports that require an old version, and otherwise update to 6.
comment:11 Changed 18 months ago by mascguy (Christopher Nielsen)
Replying to mohd-akram:
What are the issues with updating to FFmpeg 6? Perhaps there should be an ffmpeg4 port that lives in libexec for ports that require an old version, and otherwise update to 6.
Upstream has made breaking API changes, such that we can't simply update the default ffmpeg
port to version 5.x or 6.x. But yes, the longer-term plan is to create an ffmpeg4
port, and rename ffmpeg-upstream
to ffmpeg6
. Followed by updating all dependents to build with the appropriate one.
But that's going to take some time.
comment:12 Changed 18 months ago by mohd-akram (Mohamed Akram)
Strangely, I didn't get a notification for your response. Perhaps we should assemble a list of ports that depend on ffmpeg, and tick off the ones that support version 6 upstream, linking to relevant PRs/commits. This way we have an idea of the scope of the compatibility issues at least. Just to get it started if there is no such list yet - port echo 'depends:ffmpeg[^6]' | grep -v '^py[0-9]'
returns:
- audacity Supported
- audacity-devel Supported
- audacity-legacy [Old]
- baresip Supported #67619
- blender [Supported] #67620
- chromaprint Pending release
- cmus Pending release
- ffmpegthumbnailer Unsupported
- ffms2 Pending release
- gegl Builds
- gegl-0.3 [Old]
- gegl-devel Builds
- gmic [Maintained]
- gmic-clib [Maintained]
- gmic-gimp [Maintained]
- gmic-lib [Maintained]
- gmic-qt [Maintained]
- goldendict Supported
- libdlna [Old]
- libextractor [Unknown]
- libopenshot [Maintained] #67642
- libpiano [Maintained]
- libquicktime-devel [Old]
- libVLC2 [Old]
- mat2 [Maintained]
- mediatomb [Old]
- MP4Joiner [Old]
- musikcube Supported #67621
- netgen Supported
- notcurses [Maintained]
- octave-video [Maintained]
- opencv3 Supported #69924
- opencv3-devel Supported #69924
- opencv4 Supported
- opencv4-devel Supported
- Pangolin Supported #67644
- paraview [Maintained]
- pHash [Maintained]
- pianobar Supported
- py-imageio-ffmpeg [Maintained]
- qt5-qtwebengine [Old]
- qt6-qtmultimedia [Maintained]
- qt6-qtwebengine [Maintained]
- qt513-qtwebengine [Old]
- ReadyMedia [Supported]
- scrcpy [Maintained]
- SDRangel [Maintained]
- synfig Pending release
- transcode [Old]
- tumbler [Maintained]
- unpaper Supported
- vapoursynth [Maintained]
- VLC2 [Old]
- wxsvg [Maintained]
- xine-lib [Maintained]
- yorick-av Supported
No maintainer:
- aubio Pending release
- dosbox-x Supported
- dvbcut [Maintained]
- ffmpegthumbs Supported
- geeqie [Maintained]
- kdemultimedia4 [Old]
- kfilemetadata [Maintained]
- libquicktime [Old]
- libvideogfx [Old]
- moc [Old]
- nepomuk-core [Old]
- OpenSceneGraph Broken
- OpenSceneGraph-devel Broken
- streamlink [CLI use] #67645
- strigi [Old]
- tovid [Old]
- xmms2 Supported
Run Dependencies, likely work:
- beets
- beets-devel
- freac
- get_iplayer
- impressive
- reddsaver
- shenidam
- vcs
- vhs
- youtube-dl
- yt-dlp
Ports using ffmpeg6:
- audacious-plugins
- av1an
- FreeRDP
- gpac
- mlt
- mpv
- openimageio
- gutils-suite-extra
comment:13 Changed 18 months ago by mohd-akram (Mohamed Akram)
Cc: | mohd-akram added |
---|
comment:14 follow-up: 15 Changed 17 months ago by mohd-akram (Mohamed Akram)
I've updated the list. Most ports are likely to build. Other package managers have also moved to updated FFmpeg versions, so it should be doable at this point. I've created some tickets for ports that require an update, so we can likely start with updating those.
comment:15 Changed 17 months ago by mascguy (Christopher Nielsen)
Replying to mohd-akram:
I've updated the list. Most ports are likely to build. Other package managers have also moved to updated FFmpeg versions, so it should be doable at this point. I've created some tickets for ports that require an update, so we can likely start with updating those.
If you'd like folks to also migrate to ffmpeg6
, you'll want to explicitly mention that in each ticket.
comment:16 follow-up: 17 Changed 17 months ago by mohd-akram (Mohamed Akram)
My hope is that we can update ffmpeg to 6.0 directly, and make broken ports use ffmpeg4. How would one use ffmpeg6 or (the eventual) ffmpeg4 in a port? Is it a matter of updating configure.cppflags
and configure.ldflags
?
comment:17 follow-up: 18 Changed 17 months ago by mascguy (Christopher Nielsen)
Replying to mohd-akram:
My hope is that we can update ffmpeg to 6.0 directly, and make broken ports use ffmpeg4.
I don't think that's feasible at this point, as there's far too great a chance that we'll cause significant breakage somewhere. Perhaps in the future, but I'm certainly not prepared to tackle that at this point. Simply too much potential mayhem, without much upside.
How would one use ffmpeg6 or (the eventual) ffmpeg4 in a port? Is it a matter of updating
configure.cppflags
andconfigure.ldflags
?
Hopefully most can be updated to include the pkgconfig
path for the desired version of ffmpeg
, via logic similar to the following:
set ffmpeg_ver 6 configure.pkg_config_path ${prefix}/libexec/ffmpeg${ffmpeg_ver}/lib/pkgconfig
We'll also want to segregate ffmpeg
too, via a new port ffmpeg4
. Otherwise we'll have to deal with reversing the header and lib search order, which can be a royal pain.
Ultimately we'll get there, but it's going to be a big undertaking. (And a gradual migration will be far less painful to our users and members.) So your patience is appreciated!
comment:18 Changed 17 months ago by mascguy (Christopher Nielsen)
Replying to mascguy:
How would one use ffmpeg6 or (the eventual) ffmpeg4 in a port? Is it a matter of updating
configure.cppflags
andconfigure.ldflags
?Hopefully most can be updated to include the
pkgconfig
path for the desired version offfmpeg
, via logic similar to the following:set ffmpeg_ver 6 configure.pkg_config_path ${prefix}/libexec/ffmpeg${ffmpeg_ver}/lib/pkgconfig
p.s. To reduce the maintenance pain, I'm also planning to introduce a new ffmpeg
portgroup - similar to our pg for boost
- to ease the pain. That will also take time, but again, we'll get there.
comment:19 Changed 12 months ago by Tobias Pyndt Steinmann <tps@…>
comment:20 follow-up: 21 Changed 12 months ago by badger200
@tobias : 6.1 breaks videotoolboxenc.c due to
libavcodec/videotoolboxenc.c:1185:40: error: use of undeclared identifier 'kVTCompressionPropertyKey_EncoderID';
Which is 10.13 specific. I’m building on 10.9. 6.0 is built and installed currently.
comment:21 follow-up: 24 Changed 12 months ago by janngobble
Replying to badger200:
@tobias : 6.1 breaks videotoolboxenc.c due to
libavcodec/videotoolboxenc.c:1185:40: error: use of undeclared identifier 'kVTCompressionPropertyKey_EncoderID';
Which is 10.13 specific. I’m building on 10.9. 6.0 is built and installed currently.
see: https://trac.macports.org/ticket/68720
In essence, kVTCompressionPropertyKey_EncoderID was introduced in 10.13. So, if there's no version test when using using kVTCompressionPropertyKey_EncoderID then it will break.
comment:22 Changed 11 months ago by rectalogic (Andrew Wason)
Cc: | rectalogic added |
---|
comment:23 Changed 7 months ago by mohd-akram (Mohamed Akram)
Any update on this? FFmpeg 7 has been released.
comment:24 Changed 7 months ago by mascguy (Christopher Nielsen)
Replying to janngobble:
Replying to badger200:
@tobias : 6.1 breaks videotoolboxenc.c due to
libavcodec/videotoolboxenc.c:1185:40: error: use of undeclared identifier 'kVTCompressionPropertyKey_EncoderID';
Which is 10.13 specific. I’m building on 10.9. 6.0 is built and installed currently.
see: https://trac.macports.org/ticket/68720
In essence, kVTCompressionPropertyKey_EncoderID was introduced in 10.13. So, if there's no version test when using using kVTCompressionPropertyKey_EncoderID then it will break.
FYI, this was fixed a few days ago, per the following: comment:10:issue:68720
comment:25 Changed 7 months ago by i0ntempest
Cc: | i0ntempest added |
---|
comment:26 Changed 7 months ago by i0ntempest
I already migrated two of my ports (av1an and mpv) to link with ffmpeg v6. mpv would crash in certain cases if linked with ffmpeg v4, which I think could be a sign of devs ditching old versions of ffmpeg (at least not explicily targeting/testing).
I know this will be a huge undertaking but I really would like to see this migration process starts soon, especially now v7 is released.
comment:27 Changed 7 months ago by andlabs (Pietro Gagliardi)
FWIW I recently ran across an issue where some YouTube videos download in a format not supported by ffmpeg 4. The yt-dlp maintainers are expecting everyone to be on 6.1.1 at least. Perhaps that port can be moved to depend on ffmpeg 6? https://github.com/yt-dlp/yt-dlp/issues/8641
In the meantime you can use --ffmpeg-location /opt/local/bin/ffmpeg6
. Unfortunately 6.1.1 also doesn't work for the video I'm trying, though; will report upstream if ffmpeg 7 can't either... EDIT The video I'm trying *does* work in ffmpeg 7, so I will repeat the request to bump ffmpeg6. I did have to patch libavdevice/avfoundation.m due to conflicting type names on 10.12 with Xcode 9 (change the parameter of getDevicesWithMediaType()
on line 765 to be of type NSString *
).
comment:28 Changed 6 months ago by andlabs (Pietro Gagliardi)
Cc: | andlabs added |
---|
Livecheck works fine here, FWIW: