Building tips for dual x264 (8-bit/10-bit) and building ffmpeg against these (dual ffmpeg bins)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Building tips for dual x264 (8-bit/10-bit) and building ffmpeg against these (dual ffmpeg bins)

Douglas Marsh
I am posting this (initially) to ffmpeg-user as the developers list is
busy with ffmpeg and not sure if this question should be posted there.

I went through the process of building x264 with 10-bit into
/usr/local/x264 and tried to (quickly/briefly) build with suffixes (like
in FFMPEG), but will have to hack it elsewhere:

~git/x264$ ./configure --prefix=/usr/local/x264-10
--extra-version=dx9s-x264-10 --build-suffix=-dx9s-x264-10 --bit-depth=10
--enable-static --enable-shared

Will have to review this more.

Want to keep the vendor (Ubuntu) 8-bit x264 intact and install a custom
version of ffmpeg against it for 10-bit support as well, will make
ffmpeg10 or something like that as well.

Does anybody have steps on ways (plural) to do this and keep a dual
8-bit/10-bit x264 with dual ffmpeg versions against those libraries?

--Doug (dx9s)

P.S.> wouldn't it be easier to simply add an interface/option inside
x264 to support both in one library somehow?!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Building tips for dual x264 (8-bit/10-bit) and building ffmpeg against these (dual ffmpeg bins)

Douglas Marsh
On 2017-10-03 11:08, Douglas Marsh wrote:
-enable-shared
>
> Will have to review this more.
>
> Want to keep the vendor (Ubuntu) 8-bit x264 intact and install a
> custom version of ffmpeg against it for 10-bit support as well, will
> make ffmpeg10 or something like that as well.

Downloaded the deb source and noticed, they already build a 10-bit
version of everything x264 related:

*** Contents:
./usr/lib/x86_64-linux-gnu/x264-10bit/libx264.so.148
./usr/lib/x86_64-linux-gnu/libx264.so.148
[...]

so I guess the real question is how to compile ffmpeg with alternate
library for libx264.so.148 in the said directory...

--Doug (dx9s)
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Building tips for dual x264 (8-bit/10-bit) and building ffmpeg against these (dual ffmpeg bins)

Carl Eugen Hoyos-2
2017-10-03 21:21 GMT+02:00 Douglas Marsh <[hidden email]>:
> On 2017-10-03 11:08, Douglas Marsh wrote:

> Downloaded the deb source and noticed, they already build a
> 10-bit version of everything x264 related:
>
> *** Contents:
> ./usr/lib/x86_64-linux-gnu/x264-10bit/libx264.so.148
> ./usr/lib/x86_64-linux-gnu/libx264.so.148
> [...]
>
> so I guess the real question is how to compile ffmpeg with
> alternate library for libx264.so.148 in the said directory...

Either use pkg-config or pass (--extra-cflags and) --extra-ldflags
to configure so it can find the intended installation.
(I don't know if there is an extra header, so ldflags may be
sufficient)

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Building tips for dual x264 (8-bit/10-bit) and building ffmpeg against these (dual ffmpeg bins)

Douglas Marsh
On 2017-10-03 14:09, Carl Eugen Hoyos wrote:

> Either use pkg-config or pass (--extra-cflags and) --extra-ldflags
> to configure so it can find the intended installation.
> (I don't know if there is an extra header, so ldflags may be
> sufficient)
>

Found a way to do it entirely package maintainer way:

$ export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/x264-10bit/libx264.so.148
$ ffmpeg -h encoder=libx264

Encoder libx264 [libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]:
     General capabilities: delay threads
     Threading capabilities: auto
     Supported pixel formats: yuv420p10le yuv422p10le yuv444p10le nv20le
libx264 AVOptions:
[...]

Where normally it reads:

Encoder libx264 [libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]:
     General capabilities: delay threads
     Threading capabilities: auto
     Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p
yuvj444p nv12 nv16 nv21

This is with the distro-built x264 (which has both 8/10-bit versions, 10
has to be explicitly loaded). So a shell script wrapper around ffmpeg or
other programs that use the x264 library SHOULD be good enough for most
programs.

Gonna try on a few other programs and see what works or breaks.

--Doug (dx9s)
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Building tips for dual x264 (8-bit/10-bit) and building ffmpeg against these (dual ffmpeg bins)

Douglas Marsh
> Found a way to do it entirely package maintainer way:

FWIW: a short hand for ffmpeg would be to make a script in your ~/bin
directory:

~/bin$ cat ffmpeg10
#!/bin/bash

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/x264-10bit/libx264.so.148 ffmpeg
"$@"


--Doug (dx9s)


_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".