高通8053交叉编译x264
下载最新源码http://download.videolan.org/x264/snapshots/
Index of /x264/snapshots/
../
last_stable_x264.tar.bz2 21-Aug-2019 20:45 770875
last_x264.tar.bz2 21-Aug-2019 20:45 774055
x264-snapshot-20050824-2219.tar.bz2 24-Aug-2005 20:20 357963
x264-snapshot-20050824-2245.tar.bz2 24-Aug-2005 20:45 358307
x264-snapshot-20050825-2245.tar.bz2 25-Aug-2005 20:45 358217
x264-snapshot-20050826-2245.tar.bz2 26-Aug-2005 20:45 358206
x264-snapshot-20050827-2245.tar.bz2 27-Aug-2005 20:45 358680
第一个最新,
使用交叉编译三步走
--sysroot=/home/lid/gcc/sdk8053/sysroots/armv7a-vfp-neon-oe-linux-gnueabi
上述配置没问题,
make。
make install
将x264的bin和libx264.so拷贝到开发板。chmod 授权。
最新版的使用方式
x264 -o test.264 800x400.yuv
这里的yuv文件必须用这种名称表达,否则报错raw input requires a resolution.
yuv [info]: 800x400p 0:0 @ 25/1 fps (cfr)
x264 [info]: using cpu capabilities: none!
x264 [info]: profile High, level 3.0, 4:2:0, 8-bit
x264 [info]: frame I:1 Avg QP:32.98 size: 16016
x264 [info]: frame P:2 Avg QP:32.41 size: 16920
x264 [info]: mb I I16..4: 28.2% 0.0% 71.8%
x264 [info]: mb P I16..4: 14.5% 8.0% 77.0% P16..4: 0.4% 0.1% 0.1% 0.0% 0.0% skip: 0.0%
x264 [info]: 8x8 transform intra:5.4% inter:100.0%
x264 [info]: coded y,uvDC,uvAC intra: 85.8% 91.6% 85.4% inter: 100.0% 100.0% 100.0%
x264 [info]: i16 v,h,dc,p: 0% 100% 0% 0%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 16% 41% 5% 3% 2% 4% 2% 14%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 0% 99% 1% 0% 0% 0% 0% 0% 0%
x264 [info]: i8c dc,h,v,p: 29% 68% 3% 0%
x264 [info]: Weighted P-Frames: Y:50.0% UV:50.0%
x264 [info]: kb/s:3323.80
encoded 3 frames, 4.09 fps, 3323.80 kb/s
/data/misc/camera/yuv #
用x264编码的文件竟然不能用vlc打开,换了一个ffmplay,如下打开1280x960的h264,成功打开
PS E:\ffmpeg-20190813-8cd96e1-win64-static\ffmpeg-20190813-8cd96e1-win64-static\bin> .\ffplay.exe .\test.h264
ffplay version N-94530-g8cd96e13ee Copyright (c) 2003-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 33.100 / 56. 33.100
libavcodec 58. 55.100 / 58. 55.100
libavformat 58. 30.100 / 58. 30.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 58.100 / 7. 58.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, h264, from '.\test.h264':0KB vq= 0KB sq= 0B f=0/0
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x960, 25 tbr, 1200k tbn, 50 tbc
nan M-V: nan fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
PS E:\ffmpeg-20190813-8cd96e1-win64-static\ffmpeg-20190813-8cd96e1-win64-static\bin>
用ultraedit打开能找到 nalu 的头