ccextractor
ccextractor copied to clipboard
[BUG] CCExtractor incompatible with ffmpeg 5.0
CCExtractor version: 0.94 / master
Necessary information
- Is this a regression (i.e. did it work before)? YES
- What platform did you use? Linux
- What were the used arguments? N/A
Additional information
When building the AUR package for CCExtractor, building fails when the installed ffmpeg version on the system is 5.0.
==> Starting build()...
Running pre-build script...
Obtaining Git commit
Storing variables in file
Commit: b7beb3d202a9bcb77a426ef324282ca7114bcdf4
Date: 2022-03-01
Stored all in compile_info_real.h
Done.
Trying to compile...
Checking for cargo...
rustc >= MSRV(1.54.0)
Building rust files...
Updating crates.io index
Downloading crates ...
Downloaded aho-corasick v0.7.18
...
Compiling ccx_rust v0.1.0 (/tmp/bauh@me/arch/build_1646139098/ccextractor/src/ccextractor/src/rust)
Finished dev [unoptimized + debuginfo] target(s) in 51.58s
Building ccextractor
Compiled with errors
../src/lib_ccx/hardsubx.c: In function 'hardsubx_process_data':
../src/lib_ccx/hardsubx.c:16:9: warning: implicit declaration of function 'av_register_all' [-Wimplicit-function-declaration]
16 | av_register_all();
| ^~~~~~~~~~~~~~~
../src/lib_ccx/hardsubx.c:35:48: error: 'AVStream' has no member named 'codec'
35 | if (ctx->format_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
| ^~
../src/lib_ccx/hardsubx.c:46:72: error: 'AVStream' has no member named 'codec'
46 | ctx->codec_ctx = ctx->format_ctx->streams[ctx->video_stream_id]->codec;
| ^~
../src/lib_ccx/hardsubx.c:47:20: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
47 | ctx->codec = avcodec_find_decoder(ctx->codec_ctx->codec_id);
| ^
../src/lib_ccx/hardsubx.c: In function '_init_hardsubx':
../src/lib_ccx/hardsubx.c:224:22: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
224 | char *lang = options->ocrlang;
| ^~~~~~~
../src/lib_ccx/hardsubx_decoder.c: In function 'hardsubx_process_frames_tickertext':
../src/lib_ccx/hardsubx_decoder.c:385:25: warning: implicit declaration of function 'avcodec_decode_video2'; did you mean 'avcodec_decode_subtitle2'? [-Wimplicit-function-declaration]
385 | avcodec_decode_video2(ctx->codec_ctx, ctx->frame, &got_frame, &ctx->packet);
| ^~~~~~~~~~~~~~~~~~~~~
| avcodec_decode_subtitle2
==> ERROR: A failure occurred in build().
$ ffmpeg -version
ffmpeg version n5.0 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
FFmpeg released 5.0 January 17th, 2022 and seems to have quite some breaking changes.
This should probably be a short GSoC project. Indeed FFmpeg changed their API a lot (to the better, I must say), so this is not going to be something we can fix in one evening.
Just ran into that issue. Came here.
The av_register_all()
function has been listed as deprecated since ffmpeg 4.0 in the official changelog, avcodec_decode_video2()
seems to as well, later on.
Hi, is there any plan to address this? Most distributions are busy to organize the switch to ffmpeg 5 and if ccextractor doesn't keep up, the package will end up removed. :-(
Thank you for your work on maintaining ccextractor!
I think it's happening or will happen as part of the hardsubx rewrite effort by @PunitLodha and @shashwat1002.
I've seen references to FFmpeg 5 there.
Yes, this will be a part of the HardsubX rewrite. While we are working on it, a short term solution would be to compile CCExtractor without HardsubX support.
Yes, this will be a part of the HardsubX rewrite. While we are working on it, a short term solution would be to compile CCExtractor without HardsubX support.
Thanks @PunitLodha for the tip! Any idea / rough guess of when the HardsubX rewrite will be ready?
It should be ready before October
Hi @PunitLodha,
It should be ready before October
No rush or anything. Just a friendly ping asking about the ETA. :)
@utkarsh2102 Progress has been made on this. But the GSoC project was extended recently. So this will take a bit more time. Do you build from the master branch, or will you have to wait for a new release?
Hello @PunitLodha,
Do you build from the master branch, or will you have to wait for a new release?
Concerning Arch Linux, the AUR package is build from release versions.
Hi @PunitLodha,
Do you build from the master branch, or will you have to wait for a new release?
Concerning Debian, the Debian package is built (and which is what we generally want to stick to) from a new release.
Any progress on ffmpeg5 compatibility? Debian's bookworm freezes are starting soon, and if ccextractor isn't in testing by early February it won't be part of bookworm.
Any update on the hardsub/ffmpeg5 front?
@PriamX @gibmat We have it as a qualification task for GSoC 2023, let's see what happens.
Looking at this issue now. Will update soon.
Created a PR with a fix for this: #1479