Packaging ccextractor

Hello, so I’ve been at this for a while, trying to package ccextractor but I can never seem to get it to build without errors… I’ve exhausted quite a few attempts, but I can’t pin down what the issue is. Could someone please help me understand what I’m doing wrong here? Btw I built in mock with rpm-fusion-free repo and built without rust.

SPEC: ccextractor/ccextractor.spec at main · siliconwaffle/ccextractor · GitHub
build.log: ccextractor/build.log at main · siliconwaffle/ccextractor · GitHub

The code in src/lib_ccx/hardsubx.c was written for an older version of ffmpeg. The first error is that av_register_all is not declared. That function was deprecated in ffmpeg 4.0 and has since been removed altogether. The next error is that AVStream has no member named codec. That member was also deprecated in 4.0 and subsequently removed. We are currently on ffmpeg 6.x, and this code isn’t even ready for 5.x.

Did you miss these errors?

../src/lib_ccx/hardsubx.c: In function ‘hardsubx_process_data’:
../src/lib_ccx/hardsubx.c:16:9: error: 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;
      |                                                                        ^~

Embarrassingly, I did actually miss those while skimming the log. Nonetheless I wouldn’t have understood these errors without an explanation or some research. Thank you for pointing that out, I should be more mindful of what’s actually in the logs.

That makes sense, thank you for the explanation. It is a 3 year old version, hopefully they release 0.95 relatively soon, they have some notes in the changelog for it and it’s marked as “to be released” without much of a timeline. Until then I think I’ll play around with ccextractor at the most recent commit instead of the older version.