Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Trying to compile with FFMPEG support fails #5717

Closed
BoxingOctopus opened this issue Nov 19, 2017 · 6 comments
Closed

Trying to compile with FFMPEG support fails #5717

BoxingOctopus opened this issue Nov 19, 2017 · 6 comments

Comments

@BoxingOctopus
Copy link

BoxingOctopus commented Nov 19, 2017

I'm trying to build RetroArch from source to add FFMPEG support based on Mark Mruss' how-to. It compiles most of the way, but eventually bombs out when trying to compile record/drivers/record_ffmpeg.c with the following error:

CC record/drivers/record_ffmpeg.c
record/drivers/record_ffmpeg.c: In function 'ffmpeg_init_audio':
record/drivers/record_ffmpeg.c:351:30: error: 'CODEC_FLAG_QSCALE' undeclared (first use in this function)
       audio->codec->flags |= CODEC_FLAG_QSCALE;
                              ^
record/drivers/record_ffmpeg.c:351:30: note: each undeclared identifier is reported only once for each function it appears in
record/drivers/record_ffmpeg.c:361:30: error: 'CODEC_FLAG_GLOBAL_HEADER' undeclared (first use in this function)
       audio->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
                              ^
record/drivers/record_ffmpeg.c:381:25: error: 'FF_MIN_BUFFER_SIZE' undeclared (first use in this function)
    audio->outbuf_size = FF_MIN_BUFFER_SIZE;
                         ^
record/drivers/record_ffmpeg.c: In function 'ffmpeg_init_video':
record/drivers/record_ffmpeg.c:493:30: error: 'CODEC_FLAG_QSCALE' undeclared (first use in this function)
       video->codec->flags |= CODEC_FLAG_QSCALE;
                              ^
record/drivers/record_ffmpeg.c:500:30: error: 'CODEC_FLAG_GLOBAL_HEADER' undeclared (first use in this function)
       video->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
                              ^
Makefile:155: recipe for target 'obj-unix/record/drivers/record_ffmpeg.o' failed
make: *** [obj-unix/record/drivers/record_ffmpeg.o] Error 1
make: *** Waiting for unfinished jobs....
/home/pi/RetroPie-Setup
Could not successfully build retroarch - RetroArch - frontend to the libretro emulator cores - required by all lr-* emulators (/home/pi/RetroPie-Setup/tmp/build/retroarch/retroarch not found).

FWIW, I'm pulling from the 1.6.7 tag.

@orbea
Copy link
Contributor

orbea commented Nov 19, 2017

Can you try the latest git master? What ffmpeg version are you building with?

@BoxingOctopus
Copy link
Author

I'm definitely on the latest git master. As for the ffmpeg version, I'm using the snapshot build, which I assumed to be the latest.

@orbea
Copy link
Contributor

orbea commented Nov 20, 2017

When you said you were pulling from the 1.6.7 tag I thought meant an rather old tag, but if this is happening with a recent ffmpeg nightly and the RetroArch master than I suppose maybe a change in ffmpeg broke RetroArch?

@orbea
Copy link
Contributor

orbea commented Nov 20, 2017

Seems that is indeed the case.

CC deps/miniupnpc/minisoap.c
CC record/drivers/record_ffmpeg.c
CC cores/libretro-ffmpeg/ffmpeg_core.c
CC tasks/task_decompress.c
record/drivers/record_ffmpeg.c: In function ‘ffmpeg_init_audio’:
record/drivers/record_ffmpeg.c:351:30: error: ‘CODEC_FLAG_QSCALE’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_QSCALE’?
       audio->codec->flags |= CODEC_FLAG_QSCALE;
                              ^~~~~~~~~~~~~~~~~
                              AV_CODEC_FLAG_QSCALE
record/drivers/record_ffmpeg.c:351:30: note: each undeclared identifier is reported only once for each function it appears in
record/drivers/record_ffmpeg.c:361:30: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_GLOBAL_HEADER’?
       audio->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
                              ^~~~~~~~~~~~~~~~~~~~~~~~
                              AV_CODEC_FLAG_GLOBAL_HEADER
record/drivers/record_ffmpeg.c:381:25: error: ‘FF_MIN_BUFFER_SIZE’ undeclared (first use in this function); did you mean ‘FF_DEBUG_BUFFERS’?
    audio->outbuf_size = FF_MIN_BUFFER_SIZE;
                         ^~~~~~~~~~~~~~~~~~
                         FF_DEBUG_BUFFERS
record/drivers/record_ffmpeg.c: In function ‘ffmpeg_init_video’:
record/drivers/record_ffmpeg.c:493:30: error: ‘CODEC_FLAG_QSCALE’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_QSCALE’?
       video->codec->flags |= CODEC_FLAG_QSCALE;
                              ^~~~~~~~~~~~~~~~~
                              AV_CODEC_FLAG_QSCALE
record/drivers/record_ffmpeg.c:500:30: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_GLOBAL_HEADER’?
       video->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
                              ^~~~~~~~~~~~~~~~~~~~~~~~
                              AV_CODEC_FLAG_GLOBAL_HEADER
make: *** [Makefile:151: obj-unix/record/drivers/record_ffmpeg.o] Error 1
make: *** Waiting for unfinished jobs....

Would you be willing to bisect ffmpeg to find out when this started? Otherwise you can work around this by using the latest ffmpeg-3.4 stable or by using --disable-ffmpeg when building RetroArch.

@orbea
Copy link
Contributor

orbea commented Nov 20, 2017

I submitted a PR that should hopefully help.

@rickycodes
Copy link

rickycodes commented Jan 14, 2018

confirmed this is working now 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants