x265 not found using pkg-config
getting "x265 not found using pkg-config" error when enable libx265 with ffmpeg.
i have successfully compile libx265 in ffmpeg , but getting this error .
kindly help me please
Comments (37)
-
-
Account Deleted can you suggest me what should i do now ? where to check pkg-config ? ffmpeg is fully updated and othere compile are working fine, but i am unable to enable this
-
The issue is that in order for x265 to work with ffmpeg, it needs to be statically compiled, similar to the other libraries mentioned in the compilation guide: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
It's definitely not a "bug" with x265—certainly it can be compiled any way you want—but a lack of documentation on FFmpeg's side on how to integrate it. Or a lack of documentation on x265 side.
It's not entirely clear what specific steps need to be done to compile x265 so that it can be statically linked to ffmpeg.
-
Account Deleted i had follow https://trac.ffmpeg.org/wiki/CompilationGuide/Centos guide as i am using centaOS and compile all others codec but failed to compile x265 , there are no guide for this codec on ffmpeg , even here https://trac.ffmpeg.org/wiki/Encode/H.265 they tell to do it yourself ,,so i have no idea how to fix this problem , i had followed and try to compile x265 like other codec but not luck , so any help will be good for me
-
You may want to change this issue and
- set its priority to "normal"; it's certainly not critical
- ask how to statically compile x265 to link it with ffmpeg
This is as far as I got:
cd ~/ffmpeg_sources hg clone https://bitbucket.org/multicoreware/x265 cd x265 cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME/ffmpeg_build source make make install
But it does not create a static build.
-
Account Deleted This is not a FFmpeg bug, this is a PEBKAC. You can read the corresponding thread on ffmpeg-user: [http://ffmpeg.org/pipermail/ffmpeg-user/2015-April/026026.html]: no make install, no --prefix (or the equivalent for cmake), no ldconfig, no LD_LIBRARY_PATH, etc.
-
Account Deleted @Cigaes : yes this is same my problem , but still didn't find how to fix this any help ?
-
Account Deleted @Werner Robitza : thank you for suggestion , but its not normal issue , i am trying to solve this from sunday but no luck yet so this is begin critical for me , and is there any guide about "how to statically compile x265" with ffmpeg ?
-
Account Deleted Learn how to administrate a Unix system and try again in two years. Sorry if this is harsh, but you have to understand that building software from source is inherently a complex task, you can not expect to get it working in a few minutes. Sometimes, you are lucky and someone already did exactly what you need, with step-by-step explanations. When you are not, you have to make efforts of your own. Or... I am sure you can find plenty of people that will make the effort for you... for a fee.
-
Account Deleted hahaha ,, you are blogging on a free codec forum and asking for a fee ? lol grow up man better open another blog where you ask to user for a fee to help them ,, SORRY IF THIS WAS HARSH FOR YOU yes that was :D
-
Account Deleted and yes if you known to fix it do it for me ,, i will pay you $100 for this or $200 will be better ,, think you are smart ?
-
Account Deleted I am not asking for a fee. I do not volonteer to do the work for you, be it for free or not. I am writing on this issue tracker to tell the x265 guys what kind of “issue” it is and that they can close it without remorse. Then I was sidetracked by trolling, but I will stop now. But you, you need to learn how Free Software works. It does not involve Free Software developers being at the beck and call of any user that does not want to make any effort learning. Free Software is an exchange: the developers provide the software at no financial cost in the hope that users will contribute useful patches, or at least smart bug reports. Users that do not want to play that game can hire a consultant.
-
Account Deleted This is a bug ! and i am reporting about this , if not i will be only guy to report about this but yes it is a bug with both ffmpeg and x265 because "[http://ffmpeg.org/pipermail/ffmpeg-user/2015-April/026026.html" guy also got this problem ,
and if you want effort , i will come back with solution for this ,, and if you don't know how to help user on any topic just shut your mouth and watch this.
-
My ffmpeg builds on Launchpad are all linked against the libx265 shared library. And I didn't patch the x265 or ffmpeg sources. You can try to override the PKG_CONFIG_PATH environment variable (see man pkg-config for details) or you can try to hack ffmpeg's configure script.
-
- Reported by someone else != it's a bug. It could mean that there's another guy who has no idea how to compile this correctly.
- After you compile x265 and install it (
cmake -DCMAKE_INSTALL_PREFIX=somewhere_to_install ../../source
andmake
andmake install
), make sure there's a libx265.a file inside the directory, and a libx265.so file not be there. This forces ffmpeg to link to the static version.
You can have a try and report back whether it works or not. We can then sort out what's going wrong.
-
-
assigned issue to
- marked as trivial
you would probably get more useful help at #ffmpeg on IRC, from people accustomed to building ffmpeg from source.
So far I've seen zero indication x265 is doing anything wrong. On Linux, the libx265 static library is always compiled and installed. This problem is between you, pkg-config, and ffmpeg. pkg-config most likely needs x265 installed in the standard install locations in order to find it.
-
assigned issue to
-
Account Deleted @msg7086: i had already followed that steps ,but no luck
-
Account Deleted @Steve Borho i am working on this , would update if any luck
there is a file already libx265.a in ffmpeg_build/lib and a file x265.pc under pkgconfig
-
that does not mean that pkg-config, as run by ffmpeg's configure scripts, will find them there
-
Account Deleted @Steve Borho : i followed these steps :
#hg clone https://bitbucket.org/multicoreware/x265 #cd x265/build/linux #./make-Makefiles.bash i set --prefix="/root/ffmpeg_build and shared OFF #make #make install
all above task done by super user on server in /root/ffmpeg_sources/ffmpeg directory
there after i run this command to enable this : PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
and error : x265 not found using pkg-config
may you tell am i wrong ?
-
If you can show a file listing and the output of the ffmpeg
configure.log
, then please ask that on the FFmpeg mailing list.As others have stated, this is not a bug with x265.
-
Try this:
cd ~/ffmpeg_sources hg clone https://bitbucket.org/multicoreware/x265 cd ~/ffmpeg_sources/x265/build/linux PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source make make install
Then, for ffmpeg itself (assuming you have all the other libs installed according to the guide):
cd ~/ffmpeg_sources/ffmpeg PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \ --prefix="$HOME/ffmpeg_build" \ --extra-cflags="-I$HOME/ffmpeg_build/include" \ --extra-ldflags="-L$HOME/ffmpeg_build/lib" \ --bindir="$HOME/bin" \ --pkg-config-flags="--static" \ --enable-gpl \ --enable-libass \ --enable-libfdk-aac \ --enable-libfreetype \ --enable-libmp3lame \ --enable-libopus \ --enable-libtheora \ --enable-libvorbis \ --enable-libvpx \ --enable-libx264 \ --enable-libx265 \ --enable-nonfree
Then
PATH="$HOME/bin:$PATH" make make install
Worked for me on Linux Mint 17. Say thank you to Lou from FFmpeg for figuring this out.
The
-DENABLE_SHARED:bool=off
part in particular is something that may be useful to mention on the x265 wiki. -
Account Deleted Instead of
-DENABLE_SHARED:bool=off
, RTFMld.so
would have been more helpful for the long run.http://ffmpeg.org/pipermail/ffmpeg-user/2015-April/026040.html
-
Can you please elaborate?
All other libs are built statically in the ffmpeg guide; I don't see why x265 would necessarily have to be a shared library, or why that'd be more helpful in the long run. (In fact, having a static build makes it much more portable… at least for my use cases.)
-
Account Deleted @Werner Robitza : thank You mate !! its work like a charm , thank you for your effort also thank to Lou from FFmpeg you are the real guy who change the world
@Cigaes : don't make this complicated keep this simple ,all are not smart as you LOL
-
Thanks everyone.
x265 Devs
-
- changed status to resolved
-
I got a same issue to configure ffmpeg on Ubuntu 14.04 w/gcc4.9, but my case was not resolved with any suggested solution. After one day's try-and-error, I found a hint from config.log said: /home/thomas/ffmpeg_build/include/x265.h:103:5: error: unknown type name 'bool' bool bScenecut; So the culprit is 'bool', hahaha... To resolve above error, I just add following heder file at x265_config.h: #include <stdbool.h>
And configure again, it works!! hope this help anybody facing the same problem.
-
Account Deleted @thomas_ahn Second that, following the compilation guide at https://trac.ffmpeg.org/wiki/CompilationGuide/Centos and including stdbool.h in x265.h allowed me to complete compilation.
-
Account Deleted Thomas Ahn: No, it is not the same issue.
The problem with bool is a new one, introduced less than a week ago in x265.h by using the bool type without the corresponding error. It has nothing to do with the initial reported problem except it ends up with the same error message from FFmpeg's configure.
-
Reporting same issue for me in Mint 17.2. Including <stdbool.h> in the header solved the problem.
Love the incredibly rudeness of some member btw. Experience doesn't matter when asking for help. If you never get going with Linux because people refuse to help due to "lol inexperienced noob", then you'll just end up with fewer people using it enough to get good at it to begin with.
-
x265: remove bool due to portability issues (fixes
#125)→ <<cset b80087c9bf25>>
-
@nandaku2 This has nothing to do with the original issue. People just reported it here because the final error message was the same.
-
I know :), the original issue was fixed long ago.
Usually, we insist on separate issue threads, but well - just not in the mood to do so now.
-
@slhck Weiner Robtza thanks a lot for the solution! it works like a charm!
But I didn't expect that I saw some incredibly marvelous comments here btw, new experience LOL
-
In my case, ffmpeg's 'configure' script was looking for x265.pc in a different directory from the one in which x265 put it.
You could:
-
cd /
-
find . -name "x265.pc"
-
cp [path]/x265.pc [PKG_CONFIG_PATH that you're using in your ffmpeg 'configure' command]
-
-
Account Deactivated Or just
export PKG_CONFIG_PATH=/path/with/x265.pc/:$PKG_CONFIG_PATH
and then configure ffmpeg. Works for me every time. - Log in to comment
Cmake will produce a pkg-config file. I think this is an ffmpeg related bug.