Newest 'x264' Questions - Stack Overflow
Les articles publiés sur le site
-
Building x264 with YASM : failing the ASM check
11 janvier 2020, par radiofreemyourenjiMy question up front is, "I have new yasm, I think x264 is supposed to be cool with that, why is x264 not cool with that?"
For reasons, I am building a CentOS docker image (based on centos:latest) that contains a from-scratch ffmpeg build, following the guide here. It's a good guide, it's worked for me before, so I was feeling good about it.
Today I'm hitting a choke point on the libx264 build point: specifically, I say
PKG_CONFIG_PATH="/tmp/ffmpeg_build/lib/pkgconfig" \ ./configure \ --prefix="/tmp/ffmpeg_build" \ --bindir="/tmp/bin" \ --enable-static
And I get a reply back
Found no assembler
Minimum version is nasm-2.13
If you really want to compile without asm, configure with --disable-asm.
That's unexpected. I have yasm, which I understand to be 1) there to do the things nasm does but better, and 2) to be the daisy-fresh most modern version given that I pulled it from its repo about an hour ago, and built it about fifty-nine minutes ago. For what it's worth, nasm is on the box too since the instructions request it, but it's below their stated version (i.e. it's "NASM version 2.10.07 compiled on Jun 9 2014")
So it seems like yasm is not being found. There's another StackExchange question that mentions that problem, which came out to a pathing issue. So, I added yasm to my path like so:
PATH=/tmp/ffmpeg_sources/yasm:$PATH \ PKG_CONFIG_PATH="/tmp/ffmpeg_build/lib/pkgconfig" \ ./configure ...etc
That still gave the Found-no-assembler problem. As a last, confused resort, I told the script explicitly what I wanted to use for the variable $AS, because based on my quick look into configure, that looked like where yasm/nasm was meant to go. The command becomes:
AS=`which yasm` PKG_CONFIG_PATH="/tmp/ffmpeg_build/lib/pkgconfig" \ ./configure ...etc
That at least gave
Found yasm 1.3.0
Minimum version is nasm-2.13
If you really want to compile without asm, configure with --disable-asm.
Looking in the config.log I see the following:
checking whether /tmp/bin/yasm supports vmovdqa32 [eax]{k1}{z}, zmm0... no Failed commandline was: -------------------------------------------------- /tmp/bin/yasm conftest.asm -I. -I$(SRCPATH) -DARCH_X86_64=1 -I$(SRCPATH)/common/x86/ -f elf64 -o conftest.o conftest.asm:1: error: instruction expected after label conftest.asm:1: warning: ignoring unrecognized character `{' conftest.asm:1: warning: ignoring unrecognized character `}' conftest.asm:1: warning: ignoring unrecognized character `{' conftest.asm:1: warning: ignoring unrecognized character `}' -------------------------------------------------- Failed program was: -------------------------------------------------- vmovdqa32 [eax]{k1}{z}, zmm0 --------------------------------------------------
So: what's the deal here? Is my assumption that yasm drop-in replaces nasm bad? Is yasm good for this purpose, but I'm not providing the right information to ./configure? Are my instructions for building ffmpeg for CentOS simply out of date with respect to this prerequisite and I should just try harder to get a modern nasm?
-
How to deal ffplay being too slow playing iPhone's videos ?
8 janvier 2020, par Mikhail T.Trying to play a 3840x2160 video recorded by an iPhone 7 (@30fps), I get frequent pauses -- in the video, music keeps playing.
This happens both in firefox and when
ffplay
is invoked to play the file directly -- from command-line. The CPU is a dual E6700 @3.20GHz -- not super fast, but it should be able to play smoothly, shouldn't it? Video is Intel's "series 4" integrated chipset -- again, not a speed-daemon, but it should be adequate... Support for Intel's VA API is included.I build ffmpeg-4.1 from source using FreeBSD port. As you can see, the port has a maddening amount of options -- including several different ones for the 264-codec.
Any suggestions for improving the decoding speed to the point, where it is watchable by a human? Thank you!
-
ffmpeg x264 CPU core scaling
15 décembre 2019, par alex416Does anyone have any experence with this type of thing? Currently using a Ryzen 7 8c/16T CPU, and using a program called BES. Using 10% CPU, is almost no slower at transcoding from mkv to mp4 (both x264, i know i can just copy them) than using 100% cpu on all 16 threads. So, Since this is the case, What is the ideal core count for libx264? I mean, Does the same type of thing happen with 32 threads? Or 8 threads, etc.
-
Force x264 to encode all frames relative to the first (IDR) frame
12 décembre 2019, par cloudravenI want to generate a h.264 stream in which P-frames are using references exclusively using a long-term reference to the first frame (an IDR frame). This would also require the first frame to be an IDR frame.
This is an academic experiment to understand the encoding behavior of long-term references and the consequences of forcing frames to refer to a specific (single) frame rather than several.
It would be great if I could do this from the command line, but if not possible I am open to modifying x264 for this purpose.
Could anyone point me to where in the source code it is determined:
- the reference frame / macroblock / partition for the current macroblock
- changes made to the short term, long term reference frame list
- whether to use a short term reference frame or a long term reference frame.
Using another encoder like nvenc is also acceptable.
-
Force x264 to only use long term reference frames
12 décembre 2019, par cloudravenI want to generate a h.264 stream in which P-frames are using references exclusively using long-term references identifiers rather than defaulting to a short-term reference given by the previous frame.
At this point this is an academic experiment to understand the encoding behavior of long-term references and the consequences of forcing frames to refer to a specific frame rather than several.
It would be great if I could do this from the command line, but if not possible I am open to modifying x264 for this purpose.
Could anyone point me to where in the source code it is determined:
- the reference frame / macroblock / partition for the current macroblock
- changes made to the short term, long term reference frame list
- whether to use a short term reference frame or a long term reference frame.
Using another encoder like nvenc is also acceptable.