#22011 closed enhancement (fixed)
ffmpeg-8.0
| Reported by: | Bruce Dubbs | Owned by: | Rahul Chandra |
|---|---|---|---|
| Priority: | normal | Milestone: | 13.0 |
| Component: | BOOK | Version: | git |
| Severity: | medium | Keywords: | |
| Cc: |
Description
New major version.
Attachments (2)
Change History (41)
by , 13 months ago
| Attachment: | qtwebengine-6.9.1-ffmpeg_8.0-1.patch added |
|---|
comment:1 by , 13 months ago
This being a major version they can and do change the API. Symbols beginning with FF_PROFILE_ have changed to AV_PROFILE_. This is not the first time they have changed FF_ to AV_. I've attached a patch to make qtwebengine 6.9.1 build, which is the only ffmpeg user I have other than the media player that I wrote. You could expect other ffmpeg users to need similar repairs.
comment:2 by , 13 months ago
Someone reported mpv also FTBFS. And note that whenever we upgrade ffmpeg to a new major version we need to test video playback in Firefox (i.e. just test if Firefox builds fine is not enough).
follow-up: 35 comment:3 by , 13 months ago
Fix for mpv:
sed -i 's/FF_PROFILE_/AV_PROFILE_/' demux/demux_mkv.c
Thanks for the heads-up marty.
Firefox builds fine and I didn't notice any issue playing videos.
gegl bombs:
../operations/external/ff-load.c: In function 'decode_frame':
../operations/external/ff-load.c:352:61: error: 'AVCodecContext' has no member named 'ticks_per_frame'
352 | , AV_TIME_BASE_Q, p->video_stream->time_base) / p->video_ctx->ticks_per_frame;
| ^~
../operations/external/ff-load.c:406:57: error: 'AVFrame' has no member named 'key_frame'
406 | if ((pkt.dts == pkt.pts) || (p->lavc_frame->key_frame!=0))
| ^~
It's only needed for gimp so I haven't dug into it.
comment:4 by , 13 months ago
The gegl is due to removed deprecations. Upstream says the fix is "easy" and if you are targeting 12.5 it should be committed well before that opens up.
https://gitlab.gnome.org/GNOME/gegl/-/issues
comment:5 by , 13 months ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:6 by , 13 months ago
version 8.0:
- Whisper filter
- Drop support for OpenSSL < 1.1.0
- Enable TLS peer certificate verification by default (on next major version bump)
- yasm support dropped, users need to use nasm
- VVC VAAPI decoder
- RealVideo 6.0 decoder
- OpenMAX encoders deprecated
- libx265 alpha layer encoding
- ADPCM IMA Xbox decoder
- Enhanced FLV v2: Multitrack audio/video, modern codec support
- Animated JPEG XL encoding (via libjxl)
- VVC in Matroska
- CENC AV1 support in MP4 muxer
- pngenc: set default prediction method to PAETH
- APV decoder and APV raw bitstream muxing and demuxing
- APV parser
- APV encoding support through a libopenapv wrapper
- VVC decoder supports all content of SCC (Screen Content Coding): IBC (Inter Block Copy), Palette Mode and ACT (Adaptive Color Transform
- G.728 decoder
- pad_cuda filter
- Sanyo LD-ADPCM decoder
- APV in MP4/ISOBMFF muxing and demuxing
- OpenHarmony hardware decoder/encoder
- Colordetect filter
- Add vf_scale_d3d11 filter
- No longer disabling GCC autovectorization, on X86, ARM and AArch64
- VP9 Vulkan hwaccel
- AV1 Vulkan encoder
- ProRes RAW decoder
- ProRes RAW Vulkan hwaccel
follow-up: 11 comment:9 by , 13 months ago
Replying to Rahul Chandra:
hmm can't play live-streams in firefox anymore...
I received the same report from the testers of another distro, so I asked in comment:2 :(.
comment:10 by , 13 months ago
Updated @ d5bb095979d695a81455e794c67a50edd5c7299a MPV Fixed @ be3ee2f4243eeb11e2748204df38ea42df8bbdf3
Leaving open to investigate Firefox issues
comment:11 by , 13 months ago
Replying to Xi Ruoyao:
I received the same report from the testers of another distro, so I asked in comment:2 :(.
I think I've mentioned this before but firefox will happily play Youtube and other streaming site videos without a functional FFMpeg (links directly to libvpx and others), live streams are where it breaks for me
comment:12 by , 13 months ago
gegl patch: https://gitlab.gnome.org/GNOME/gegl/-/commit/eda8ba51786f197b72265eafcdab407d91ec9c70.patch, going to try and figure out a sed, I'll upload to the patches repo if not
follow-up: 17 comment:13 by , 13 months ago
Firefox upstream bug is https://bugzilla.mozilla.org/show_bug.cgi?id=1962139.
comment:14 by , 13 months ago
Qtwebengine Fixed @ 0b5b49c822d156e7eb8d786977466ce5c9a2472f
Thanks for the patch MartyJ added it to the patches Repo
follow-up: 18 comment:17 by , 13 months ago
Replying to Xi Ruoyao:
Firefox upstream bug is https://bugzilla.mozilla.org/show_bug.cgi?id=1962139.
AFAICS this seems like a user who doesn't understand that you have to rebuild when the library version name changes. Seems more like noise then an actual bug report I'll try a firefox rebuild
follow-up: 20 comment:18 by , 13 months ago
Replying to Rahul Chandra:
Replying to Xi Ruoyao:
Firefox upstream bug is https://bugzilla.mozilla.org/show_bug.cgi?id=1962139.
AFAICS this seems like a user who doesn't understand that you have to rebuild when the library version name changes. Seems more like noise then an actual bug report I'll try a firefox rebuild
No, the firefox thing is different from the general cases of a library version change.
Firefox don't use the system headers of ffmpeg, but use several internal copies of ffmpeg headers to be compatible with different ffmpeg versions on different distros (because their official build must support many distros):
$ echo dom/media/platforms/ffmpeg/*[0-9] dom/media/platforms/ffmpeg/ffmpeg57 dom/media/platforms/ffmpeg/ffmpeg58 dom/media/platforms/ffmpeg/ffmpeg59 dom/media/platforms/ffmpeg/ffmpeg60 dom/media/platforms/ffmpeg/ffmpeg61 dom/media/platforms/ffmpeg/libav53 dom/media/platforms/ffmpeg/libav54 dom/media/platforms/ffmpeg/libav55
All these are copies of ffmpeg headers of different ffmpeg versions. To make firefox support ffmpeg 8, we need to add a ffmpeg62 directory (62 is the version of the libavcodec SONAME of ffmpeg 8) and wire it into firefox code.
See https://www.linuxfromscratch.org/patches/downloads/firefox/firefox-102.9.0-ffmpeg_6-2.patch as an example. This is not so simple as a rebuild.
comment:19 by , 13 months ago
ah I didn't know that... anyways rebuild didn't fix it guess we have to wait for upstream or make our own patch
follow-up: 21 comment:20 by , 13 months ago
Replying to Xi Ruoyao:
All these are copies of ffmpeg headers of different ffmpeg versions. To make firefox support ffmpeg 8, we need to add a ffmpeg62 directory (62 is the version of the libavcodec SONAME of ffmpeg 8) and wire it into firefox code.
This will add ffmpeg-8 support to firefox:
sed -e '/ffmpeg61/a\ "ffmpeg62",' -i dom/media/platforms/ffmpeg/moz.build
mkdir -p dom/media/platforms/ffmpeg/ffmpeg62/include
cp dom/media/platforms/ffmpeg/ffmpeg61/moz.build dom/media/platforms/ffmpeg/ffmpeg62/
cp -a /usr/include/libav{codec,util} dom/media/platforms/ffmpeg/ffmpeg62/
All of the headers from those dirs are not needed but makes the cp easier.
I get these errors when building:
14:19.41 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1208:38: error: no member named 'pkt_pos' in 'AVFrame'
14:19.41 1208 | rv = CreateImageV4L2(mFrame->pkt_pos, GetFramePts(mFrame),
14:19.41 | ~~~~~~ ^
14:19.41 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1211:39: error: no member named 'pkt_pos' in 'AVFrame'
14:19.41 1211 | rv = CreateImageVAAPI(mFrame->pkt_pos, GetFramePts(mFrame),
14:19.41 | ~~~~~~ ^
14:19.41 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1233:32: error: no member named 'pkt_pos' in 'AVFrame'
14:19.41 1233 | rv = CreateImage(mFrame->pkt_pos, GetFramePts(mFrame), Duration(mFrame),
14:19.41 | ~~~~~~ ^
14:19.44 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1578:19: error: no member named 'key_frame' in 'AVFrame'
14:19.44 1578 | !!mFrame->key_frame, TimeUnit::FromMicroseconds(-1));
14:19.44 | ~~~~~~ ^
14:19.45 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1605:23: error: no member named 'key_frame' in 'AVFrame'
14:19.45 1605 | !!mFrame->key_frame, TimeUnit::FromMicroseconds(-1));
14:19.45 | ~~~~~~ ^
14:19.45 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1618:65: error: no member named 'key_frame' in 'AVFrame'
14:19.46 1618 | TimeUnit::FromMicroseconds(aDuration), b, !!mFrame->key_frame,
14:19.46 | ~~~~~~ ^
14:19.46 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1691:17: error: no member named 'key_frame' in 'AVFrame'
14:19.47 1691 | !!mFrame->key_frame, TimeUnit::FromMicroseconds(-1));
14:19.47 | ~~~~~~ ^
14:19.47 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1740:17: error: no member named 'key_frame' in 'AVFrame'
14:19.47 1740 | !!mFrame->key_frame, TimeUnit::FromMicroseconds(-1));
14:19.47 | ~~~~~~ ^
14:20.74 In file included from Unified_cpp_ffmpeg_ffmpeg620.cpp:65:
14:20.74 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoEncoder.cpp:122:6: error: use of undeclared identifier 'FF_PROFILE_H264_BASELINE'
14:20.74 122 | {FF_PROFILE_H264_BASELINE, "baseline"_ns},
14:20.74 | ^~~~~~~~~~~~~~~~~~~~~~~~
14:20.90 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoEncoder.cpp:123:6: error: use of undeclared identifier 'FF_PROFILE_H264_MAIN'
14:20.90 123 | {FF_PROFILE_H264_MAIN, "main"_ns},
14:20.90 | ^~~~~~~~~~~~~~~~~~~~
14:21.06 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoEncoder.cpp:124:6: error: use of undeclared identifier 'FF_PROFILE_H264_EXTENDED'
14:21.06 124 | {FF_PROFILE_H264_EXTENDED, ""_ns},
14:21.06 | ^~~~~~~~~~~~~~~~~~~~~~~~
14:21.21 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoEncoder.cpp:125:6: error: use of undeclared identifier 'FF_PROFILE_H264_HIGH'
14:21.21 125 | {FF_PROFILE_H264_HIGH, "high"_ns}};
14:21.21 | ^~~~~~~~~~~~~~~~~~~~
comment:21 by , 13 months ago
Replying to Joe Locash:
Replying to Xi Ruoyao:
All these are copies of ffmpeg headers of different ffmpeg versions. To make firefox support ffmpeg 8, we need to add a ffmpeg62 directory (62 is the version of the libavcodec SONAME of ffmpeg 8) and wire it into firefox code.
This will add ffmpeg-8 support to firefox:
sed -e '/ffmpeg61/a\ "ffmpeg62",' -i dom/media/platforms/ffmpeg/moz.build mkdir -p dom/media/platforms/ffmpeg/ffmpeg62/include cp dom/media/platforms/ffmpeg/ffmpeg61/moz.build dom/media/platforms/ffmpeg/ffmpeg62/ cp -a /usr/include/libav{codec,util} dom/media/platforms/ffmpeg/ffmpeg62/All of the headers from those dirs are not needed but makes the cp easier.
I get these errors when building:
14:19.41 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1208:38: error: no member named 'pkt_pos' in 'AVFrame' 14:19.41 1208 | rv = CreateImageV4L2(mFrame->pkt_pos, GetFramePts(mFrame), 14:19.41 | ~~~~~~ ^ 14:19.41 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1211:39: error: no member named 'pkt_pos' in 'AVFrame' 14:19.41 1211 | rv = CreateImageVAAPI(mFrame->pkt_pos, GetFramePts(mFrame), 14:19.41 | ~~~~~~ ^ 14:19.41 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1233:32: error: no member named 'pkt_pos' in 'AVFrame' 14:19.41 1233 | rv = CreateImage(mFrame->pkt_pos, GetFramePts(mFrame), Duration(mFrame), 14:19.41 | ~~~~~~ ^ 14:19.44 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1578:19: error: no member named 'key_frame' in 'AVFrame' 14:19.44 1578 | !!mFrame->key_frame, TimeUnit::FromMicroseconds(-1)); 14:19.44 | ~~~~~~ ^ 14:19.45 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1605:23: error: no member named 'key_frame' in 'AVFrame' 14:19.45 1605 | !!mFrame->key_frame, TimeUnit::FromMicroseconds(-1)); 14:19.45 | ~~~~~~ ^ 14:19.45 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1618:65: error: no member named 'key_frame' in 'AVFrame' 14:19.46 1618 | TimeUnit::FromMicroseconds(aDuration), b, !!mFrame->key_frame, 14:19.46 | ~~~~~~ ^ 14:19.46 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1691:17: error: no member named 'key_frame' in 'AVFrame' 14:19.47 1691 | !!mFrame->key_frame, TimeUnit::FromMicroseconds(-1)); 14:19.47 | ~~~~~~ ^ 14:19.47 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1740:17: error: no member named 'key_frame' in 'AVFrame' 14:19.47 1740 | !!mFrame->key_frame, TimeUnit::FromMicroseconds(-1)); 14:19.47 | ~~~~~~ ^ 14:20.74 In file included from Unified_cpp_ffmpeg_ffmpeg620.cpp:65: 14:20.74 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoEncoder.cpp:122:6: error: use of undeclared identifier 'FF_PROFILE_H264_BASELINE' 14:20.74 122 | {FF_PROFILE_H264_BASELINE, "baseline"_ns}, 14:20.74 | ^~~~~~~~~~~~~~~~~~~~~~~~ 14:20.90 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoEncoder.cpp:123:6: error: use of undeclared identifier 'FF_PROFILE_H264_MAIN' 14:20.90 123 | {FF_PROFILE_H264_MAIN, "main"_ns}, 14:20.90 | ^~~~~~~~~~~~~~~~~~~~ 14:21.06 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoEncoder.cpp:124:6: error: use of undeclared identifier 'FF_PROFILE_H264_EXTENDED' 14:21.06 124 | {FF_PROFILE_H264_EXTENDED, ""_ns}, 14:21.06 | ^~~~~~~~~~~~~~~~~~~~~~~~ 14:21.21 /tmp/build/firefox-140.2.0/dom/media/platforms/ffmpeg/FFmpegVideoEncoder.cpp:125:6: error: use of undeclared identifier 'FF_PROFILE_H264_HIGH' 14:21.21 125 | {FF_PROFILE_H264_HIGH, "high"_ns}}; 14:21.21 | ^~~~~~~~~~~~~~~~~~~~
I didn't realize it was that trivial to add support. The other errors are things that other applications have been patched. The profiles changing names to start with AV instead of FF and some other profile changes. I don't have the time today but if it's not upstreamed by tomorrow I'll look into making the patch. Thanks Joe!
comment:22 by , 13 months ago
just bumped upstream bug with Joe's info https://bugzilla.mozilla.org/show_bug.cgi?id=1962139
comment:23 by , 12 months ago
| Owner: | changed from to |
|---|---|
| Status: | assigned → new |
comment:24 by , 12 months ago
| Status: | new → assigned |
|---|
comment:25 by , 12 months ago
| Milestone: | 12.5 → 99-Waiting |
|---|---|
| Owner: | changed from to |
| Status: | assigned → new |
| Summary: | ffmpeg-8.0 → ffmpeg-8.0 (Wait until other packages can use this version.) |
Moving to waiting and reassigning to blfs-book. We need to wait until dependent packages can use this new major version.
comment:26 by , 12 months ago
I commented out the package fixes that we put in for now, so they can be uncommented when ffmpeg-8 is put back in the future.
by , 12 months ago
| Attachment: | firefox-140.3.1-ffmpeg8.patch added |
|---|
comment:27 by , 12 months ago
Since Firefox seems to be holding this up I attached a patch I wrote for firefox-140.3.1esr that allows it to work with ffmpeg8. I tested various streams on youtube.com/live and test.spotme.com and they work. Please test and let me know of any issues.
follow-up: 29 comment:28 by , 11 months ago
| Milestone: | 99-Waiting → 12.5 |
|---|---|
| Summary: | ffmpeg-8.0 (Wait until other packages can use this version.) → ffmpeg-8.0 |
Taking this off of 99-Waiting. I've been running firefox with my ffmpeg-8.0 patch for a month now and have not seen a single issue. gentoo has also tested my patches and they don't see any issues but are waiting on upstream. For my firefox-144 patch see the upstream ticket.
follow-ups: 30 31 comment:29 by , 11 months ago
Replying to Joe Locash:
Taking this off of 99-Waiting. I've been running firefox with my ffmpeg-8.0 patch for a month now and have not seen a single issue. gentoo has also tested my patches and they don't see any issues but are waiting on upstream. For my firefox-144 patch see the upstream ticket.
Does your patch apply to ESR? If not can you backport it? I'll take the ticket and reinstate the patches for packages that need them once we have a working patch for ESR
comment:30 by , 11 months ago
Replying to Rahul Chandra:
Replying to Joe Locash:
Taking this off of 99-Waiting. I've been running firefox with my ffmpeg-8.0 patch for a month now and have not seen a single issue. gentoo has also tested my patches and they don't see any issues but are waiting on upstream. For my firefox-144 patch see the upstream ticket.
Does your patch apply to ESR? If not can you backport it? I'll take the ticket and reinstate the patches for packages that need them once we have a working patch for ESR
Patch applied for me, going to try building ESR to make sure it works (I also run stable not esr on stable the patch has been working fine for about a month here)
comment:31 by , 11 months ago
Replying to Rahul Chandra:
Does your patch apply to ESR? If not can you backport it? I'll take the ticket and reinstate the patches for packages that need them once we have a working patch for ESR
Yes. The 140.3.1 patch in this ticket also applies to 140.4.0esr.
comment:33 by , 11 months ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:35 by , 10 months ago
Replying to Joe Locash:
gegl bombs:
../operations/external/ff-load.c: In function 'decode_frame': ../operations/external/ff-load.c:352:61: error: 'AVCodecContext' has no member named 'ticks_per_frame' 352 | , AV_TIME_BASE_Q, p->video_stream->time_base) / p->video_ctx->ticks_per_frame; | ^~ ../operations/external/ff-load.c:406:57: error: 'AVFrame' has no member named 'key_frame' 406 | if ((pkt.dts == pkt.pts) || (p->lavc_frame->key_frame!=0)) | ^~
gegl-0.4.64 builds OK for me with the test errors already documented.
comment:36 by , 10 months ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fixed at commit 4d14ef18f2.
comment:38 by , 10 months ago
Has QtWebEngine been tested? There is a new version coming out on Tuesday, 6.10.1

Adjust qtwebengine for ffmpeg 8.0