Reputation: 101
I ran the following command.
ffmpeg -i test.mp4 -threads 2 -codec:v libx264 -s:v 1280x720 -aspect:v 16:9 -b:v 256k -map 0 -f segment -segment_format mpegts -segment_time 10 -segment_list stream.m3u8 streamfiles/stream%03d.ts
Execution result
ffmpeg version N-75926-gce0834b Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.6 (Debian 4.6.3-14+rpi1)
configuration: --arch=armel --target-os=linux --enable-shared --enable-gpl --enable-libx264 --enable-nonfree
libavutil 55. 3.100 / 55. 3.100
libavcodec 57. 5.100 / 57. 5.100
libavformat 57. 3.100 / 57. 3.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 11.100 / 6. 11.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.100
Duration: 00:00:03.28, start: 0.000000, bitrate: 10159 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 10156 kb/s, 25 fps, 25 tbr, 1200k tbn, 2400k tbc (default)
Metadata:
handler_name : VideoHandler
Illegal instruction
The result is that an error occurred.
Someone told me that it's an error if you do not put the option to ./configure
of libx264
. That option is the --extra-cflags='-march=armv6' --extra-ldflags='-march=armv6'
. Otherwise it would use the instruction of unsupported.
So I ran ./configure
with the option, then I ran the make and now I'm getting an error message:
common/arm/quant-a.S: Assembler messages:
common/arm/quant-a.S:362: Error: selected processor does not support ARM mode `rbit r1,r1'
common/arm/quant-a.S:363: Error: selected processor does not support ARM mode `rbit r1,r1'
Makefile:217: recipe for target 'common/arm/quant-a.o' failed
make: *** [common/arm/quant-a.o] Error 1
I do not know the meaning of this error. How should you deal me this error?
I use the machine is Raspberry PI B+ and my OS is Raspbian. I want to use ffmpeg
and libx264
.
Any advice and suggestions will be greatly appreciated.
Upvotes: 0
Views: 480
Reputation: 381
I had the same error building libx264, but I got an older version to compile. It seems some recent changes to the library have broken building for armv6 processors (or there's a required compilation switch I don't know about).
My solution:
git clone git://git.videolan.org/x264
cd x264
git checkout 3902ae02a0edede5d6c44cb3ee9e24e618c66e6a
then ./configure with required options, make, make install etc.
I'm trying to cross-compile ffmpeg on my desktop machine, following instructions here. I don't know if my solution works though, because I got stuck at the next step (alsa-lib seems to require python)!
Upvotes: 2