Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am wondering whether it is possible to decode / encode x264 videos with ffmpeg without using automagically-detected cpu extensions. I am seeing a couple of issues which happen regardless of which versions of ffmpeg and libx264 that I use.
First example: I suspect that some of these instruction sets might only be accessible through microcode updates. When using the Libreboot BIOS replacement, I sometimes get MCE errors and the CPU apparently halts; no kernel panic, this is a fault well below the kernel. (Much the same also happens on an Acer laptop with closed bios and an AMD CPU.)
Second example: I built ffmpeg and numerous dependencies for an ARMv5 machine natively (as in built on ARMv5, not cross-compiled). Everything compiled without incident; however, when compiling x264 I noticed seeing some -mcpu flag set as cortex-a8 (!) So when I try running ffmpeg and doing anything with x264 I of course get "Illegal instruction."
Is there any way to use the x264 library in a cpu-agnostic way?
Ok, well rebuilding x264 with "--disable-asm" supposedly turns off detection of cpu capabilities. This makes it work on armv5, however it is wicked slow. I say it 'supposedly' disables this because the outputted files are not reproducible; they differ by a few hundred bytes at least. (Using the same version of ffmpeg and x264, the identical source file, and identical ffmpeg args, I get different file sizes on armv5, i686, and x86_64 all with "--disable-asm".) Likewise, without "--disable-asm" outputted files are reproducible on the same machine, but that's it.
I'd rather there be some way of specifying what cpu extensions to use rather than turning them off completely. Even on an x86_64 dual-core cpu with several gigabytes of RAM I'm not getting much more than 3 seconds per frame (yes, that's inverse frames per second).
Yeah filing a bug would make the most sense, though in this case it is almost impossible to document anything. Crashes happen with no warning, and very often there is no crash at all. So debugging just means converting videos and waiting for my main production laptop to crash, which isn't something I've been very willing to do.
This too typically happens whenever I try to read from videos recorded with a particular Sony camera, which seems to use a non-standard x264 implementation (AVCHD, whatever that exactly means), so who knows.
I guess I was looking for a more short-term approach like passing a particular argument to ffmpeg's x264 functions but it appears there aren't any. It looks like libx264 takes the approach that it knows best, except that it doesn't.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.