[SEMI-SOLVED] Building libx264 from source fails (for ffmpeg from source)

Issues related to applications and software problems
Post Reply
scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

[SEMI-SOLVED] Building libx264 from source fails (for ffmpeg from source)

Post by scottro » 2018/06/05 12:02:23

While the version of ffmpeg from the nux repos meets most of my needs, sometimes, with newer videos, I need a few features provided by newer versions of ffmpeg. For a couple of years now, I have been building from source, following the instructions on ffmpeg's trac page.

https://trac.ffmpeg.org/wiki/CompilationGuide/Centos

However, when I went to do a fresh build, it failed when building libx264. After getting the source from git, and following their configuration instructions before running make, when I ran make, it failed with the error

Code: Select all

filters/video/resize.c: In function ‘pick_closest_supported_csp’:
filters/video/resize.c:215:30: error: ‘AVComponentDescriptor’ has no member named ‘depth’
         if( pix_desc->comp[i].depth > 8 )
                              ^
make: *** [filters/video/resize.o] Error 1
Googling the error, it seems that a few people have had the same error--one person apparently fixed it by using an older version of x264, but using that version didn't work for me either. I'm wondering if anyone else has run into this and found a solution. My hope is that the failure is in my google skills. :)
New users should check the FAQ and Read Me First pages

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: Building libx264 from source fails (for ffmpeg from source)

Post by stevemowbray » 2018/06/05 14:42:39

You can get a static build of a current version of ffmpeg from here:
https://johnvansickle.com/ffmpeg/

Stick it in your home directory or anywhere you like and add it to your path before the nux version.

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: [SEMI-SOLVED] Building libx264 from source fails (for ffmpeg from source)

Post by scottro » 2018/06/05 15:03:48

Thank you! That works for my needs, so I'm marking it semi-solved. (As I still can't build recent x264 I won't mark it solved, but it does fix the issue with the files that were giving me trouble.
New users should check the FAQ and Read Me First pages

mghe
Posts: 766
Joined: 2015/11/24 12:04:43
Location: Katowice, Poland

Re: [SEMI-SOLVED] Building libx264 from source fails (for ffmpeg from source)

Post by mghe » 2018/06/05 15:44:08

I had make build form source ffmpeg step by step according above instruction.
I had add some newest libs than instruction are.

There aren't problems.

Base on CentOS 7.4 with last update made 2017-12-31

You have to give us more info for reproduce.

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: [SEMI-SOLVED] Building libx264 from source fails (for ffmpeg from source)

Post by scottro » 2018/06/05 16:42:32

Running CentOS Linux release 7.5.1804 (Core) last updated yesterday. Used the instructions in the link posted earlier. What newer libraries did you use? I used the versions in the link.
New users should check the FAQ and Read Me First pages

mghe
Posts: 766
Joined: 2015/11/24 12:04:43
Location: Katowice, Poland

Re: [SEMI-SOLVED] Building libx264 from source fails (for ffmpeg from source)

Post by mghe » 2018/06/05 17:13:06

I mean 'new libs' mean 'nasm-2.13.03.tar.bz2' against nasm-2.13.02.tar.bz2 for make ffmpeg from source.

I had updated my test vm machine to CentOS 7.5 and tried make libx264 from source.

Now, during make libx264 from source I had a problem with 'Found no assembler. Minimum version is nasm-2.13'

I resolved it by add repo with nasm from 'https://www.nasm.us/nasm.repo' and update to 2.13.

After update nasm I made libx264 from source without problem.

I didn't try to make whole ffmpeg on CentOS 7.5.


Update:

New libs also: 'nasm-2.13.03.tar.bz2', 'libvorbis-1.3.6.tar.gz',

ps. In 1 step of instruction You can add newest nasm for libx264 build against install it from repo, I blind :)


Update 2

I had make exactly as instructions say, and made libx264 without problem. So, it is hard to reproduce.

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: [SEMI-SOLVED] Building libx264 from source fails (for ffmpeg from source)

Post by scottro » 2018/06/05 20:19:31

I tried updating nasm to the 2.13.03-0 from the nasm repo, but still get my error with libx264. For the moment, though, the static build is working fine for me.
New users should check the FAQ and Read Me First pages

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: [SEMI-SOLVED] Building libx264 from source fails (for ffmpeg from source)

Post by scottro » 2018/06/06 11:59:48

@mghe, I forgot to say Thank you very much for going to the trouble of testing it for me. That was kind of you, and I do appreciate it.
New users should check the FAQ and Read Me First pages

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: [SEMI-SOLVED] Building libx264 from source fails (for ffmpeg from source)

Post by scottro » 2018/06/08 12:41:00

After mghe had reported success on a VM, I also tried on a minimal install and X added, VirtualBox install of CentOS-7. On that machine, building x264 worked. So it seems that on my main workstation-cum-server at home, there's some oddity that prevents libx264 from building properly. I'll leave this at semi-solved, as I don't know what the problem is on my main machine, but at any rate, the trac ffmpeg instructions do seem to work--just not on my machine. <shrug>.

Another working solution is from http://tutorialspots.com/how-to-fix-err ... -4187.html. They suggest using an older ffmpeg snapshot ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20180224-2245-stable.tar.bz2 then following the steps on the ffmpeg page. This also worked for me.
New users should check the FAQ and Read Me First pages

Post Reply