You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On RHEL9 the ffmpeg package from rpmfusion has version 5.1.4. The build gives errors
../ffmpegServerApp/src/ffmpegCommon.cpp: In function ‘void ffmpegInitialise()’:
../ffmpegServerApp/src/ffmpegCommon.cpp:12:5: error: ‘avcodec_register_all’ was not declared in this scope
12 | avcodec_register_all();
| ^~~~~~~~~~~~~~~~~~~~
../ffmpegServerApp/src/ffmpegCommon.cpp:15:5: error: ‘av_register_all’ was not declared in this scope
15 | av_register_all();
| ^~~~~~~~~~~~~~~
../ffmpegServerApp/src/ffmpegFile.cpp: In member function ‘virtual asynStatus ffmpegFile::openFile(const char*, NDFileOpenMode_t, NDArray*)’:
../ffmpegServerApp/src/ffmpegFile.cpp:50:15: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
50 | fmt = oc->oformat;
| ~~~~^~~~~~~
| |
| const AVOutputFormat*
../ffmpegServerApp/src/ffmpegFile.cpp:71:33: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
71 | codec = avcodec_find_encoder(codec_id);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
| |
| const AVCodec*
../ffmpegServerApp/src/ffmpegFile.cpp:88:23: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
88 | c = video_st->codec;
| ^~~~~
../ffmpegServerApp/src/ffmpegFile.cpp:97:9: error: ‘avcodec_get_context_defaults3’ was not declared in this scope
97 | avcodec_get_context_defaults3(c, codec);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../ffmpegServerApp/src/ffmpegFile.cpp:150:23: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
150 | c = video_st->codec;
| ^~~~~
../ffmpegServerApp/src/ffmpegFile.cpp:214:25: error: ‘AVPicture’ was not declared in this scope; did you mean ‘inPicture’?
214 | avpicture_fill((AVPicture *)scPicture,(uint8_t *)scArray->pData,c->pix_fmt,c->width,c->height);
| ^~~~~~~~~
| inPicture
../ffmpegServerApp/src/ffmpegFile.cpp:214:36: error: expected primary-expression before ‘)’ token
214 | avpicture_fill((AVPicture *)scPicture,(uint8_t *)scArray->pData,c->pix_fmt,c->width,c->height);
| ^
../ffmpegServerApp/src/ffmpegFile.cpp:214:9: error: ‘avpicture_fill’ was not declared in this scope
214 | avpicture_fill((AVPicture *)scPicture,(uint8_t *)scArray->pData,c->pix_fmt,c->width,c->height);
| ^~~~~~~~~~~~~~
../ffmpegServerApp/src/ffmpegFile.cpp: In member function ‘virtual asynStatus ffmpegFile::writeFile(NDArray*)’:
../ffmpegServerApp/src/ffmpegFile.cpp:251:19: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
251 | av_init_packet(&pkt);
| ~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/ffmpeg/libavcodec/avcodec.h:45,
from ../ffmpegServerApp/src/ffmpegCommon.h:10,
from ../ffmpegServerApp/src/ffmpegFile.cpp:2:
/usr/include/ffmpeg/libavcodec/packet.h:512:6: note: declared here
512 | void av_init_packet(AVPacket *pkt);
| ^~~~~~~~~~~~~~
../ffmpegServerApp/src/ffmpegFile.cpp:255:11: error: ‘avcodec_encode_video2’ was not declared in this scope; did you mean ‘avcodec_encode_subtitle’?
255 | ret = avcodec_encode_video2(c, &pkt, this->scPicture, &got_output);
| ^~~~~~~~~~~~~~~~~~~~~
| avcodec_encode_subtitle
../ffmpegServerApp/src/ffmpegFile.cpp:263:16: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘coded_frame’
263 | if (c->coded_frame->key_frame)
| ^~~~~~~~~~~
../ffmpegServerApp/src/ffmpegFile.cpp:274:49: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
274 | scPicture->pts += av_rescale_q(1, video_st->codec->time_base, video_st->time_base);
| ^~~~~
../ffmpegServerApp/src/ffmpegFile.cpp: In member function ‘virtual asynStatus ffmpegFile::closeFile()’:
../ffmpegServerApp/src/ffmpegFile.cpp:312:37: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
312 | avcodec_close(video_st->codec);
| ^~~~~
../ffmpegServerApp/src/ffmpegFile.cpp:317:35: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
317 | av_freep(&oc->streams[i]->codec);
| ^~~~~
It seems these functions are deprecated since ffmpeg 4 and now removed in ffmpeg 5.
The text was updated successfully, but these errors were encountered:
xiaoqiangwang
added a commit
to xiaoqiangwang/ffmpegServer
that referenced
this issue
Oct 1, 2024
On RHEL9 the ffmpeg package from rpmfusion has version 5.1.4. The build gives errors
According to https://github.com/FFmpeg/FFmpeg/blob/9fb6f024c3db2c19aca7f5f93c6843b7e5d1eecf/doc/APIchanges#L1131, these functions have been deprecated and removed later. After removing these two, there are further errors,
It seems these functions are deprecated since ffmpeg 4 and now removed in ffmpeg 5.
The text was updated successfully, but these errors were encountered: