# ffmpeg -s 640x480 -pix_fmt yuv420p -i rawvideoA.yuv -vcodec mjpeg outputA.mov
ffmpeg version 3.4.5 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.4.0 (Buildroot 2019.02.2)
configuration: --enable-cross-compile --cross-prefix=/opt/f1c100s/buildroot-2019.02.2/output/host/bin/arm-buildroot-linux-gnueabi- --sysroot=/opt/f1c100s/buildroot-2019.02.2/output/host/arm-buildroot-linux-gnueabi/sysroot --host-cc=/usr/bin/gcc --arch=arm --target-os=linux --disable-stripping --pkg-config=/opt/f1c100s/buildroot-2019.02.2/output/host/bin/pkg-config --disable-static --enable-shared --prefix=/usr --enable-avfilter --disable-version3 --enable-logging --enable-optimizations --disable-extra-warnings --enable-avdevice --enable-avcodec --enable-avformat --enable-network --disable-gray --enable-swscale-alpha --disable-small --enable-dct --enable-fft --enable-mdct --enable-rdft --disable-crystalhd --disable-dxva2 --enable-runtime-cpudetect --disable-hardcoded-tables --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-hwaccels --disable-cuda --disable-cuvid --disable-nvenc --disable-avisynth --disable-frei0r --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libdc1394 --disable-libgsm --disable-libilbc --disable-libvo-amrwbenc --disable-symver --disable-doc --enable-gpl --enable-nonfree --enable-ffmpeg --enable-ffplay --enable-ffserver --enable-avresample --enable-ffprobe --enable-postproc --enable-swscale --enable-indevs --disable-alsa --enable-outdevs --enable-pthreads --enable-zlib --disable-bzlib --disable-libfdk-aac --disable-libcdio --disable-gnutls --enable-openssl --disable-libdrm --disable-libopenh264 --disable-vaapi --disable-vdpau --disable-mmal --disable-omx --disable-omx-rpi --disable-libopencv --disable-libopus --disable-libvpx --disable-libass --disable-libbluray --disable-librtmp --disable-libmp3lame --disable-libmodplug --disable-libspeex --disable-libtheora --disable-libwavpack --disable-iconv --enable-libfreetype --disable-fontconfig --disable-libopenjpeg --disable-libx264 --disable-libx265 --disable-x86asm --disable-mmx --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-avx2 --disable-armv6 --disable-armv6t2 --disable-vfp --disable-neon --disable-altivec --extra-libs=-latomic --enable-pic --cpu=arm926ej-s
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[rawvideo @ 0x6e370] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'rawvideoA.yuv':
Duration: 00:00:02.44, start: 0.000000, bitrate: 92160 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 92160 kb/s, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x7fcf0] deprecated pixel format used, make sure you did set range correctly
Output #0, mov, to 'outputA.mov':
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Video: mjpeg (jpeg / 0x6765706A), yuvj420p(pc), 640x480, q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc57.107.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 61 fps=6.2 q=24.8 Lsize= 504kB time=00:00:02.40 bitrate=1718.8kbits/s speed=0.243x
video:503kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.188468%
离线
ffplay@ubuntu:/mnt/hgfs/D/newfiles$ ffmpeg -s 640x480 -pix_fmt yuv420p -i /tmp/rawvideoA.yuv -vcodec mjpeg /tmp/outputA.mov
ffmpeg version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers
built on Mar 30 2013 22:20:06 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[rawvideo @ 0x2244360] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from '/tmp/rawvideoA.yuv':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0: Video: rawvideo, yuv420p, 640x480, 25 tbr, 25 tbn, 25 tbc
File '/tmp/outputA.mov' already exists. Overwrite ? [y/N] y
Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yuvj420p'
[buffer @ 0x224cec0] w:640 h:480 pixfmt:yuv420p
[avsink @ 0x2243d00] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x2245600] w:640 h:480 fmt:yuv420p -> w:640 h:480 fmt:yuvj420p flags:0x4
Output #0, mov, to '/tmp/outputA.mov':
Metadata:
encoder : Lavf53.21.1
Stream #0.0: Video: mjpeg, yuvj420p, 640x480, q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
frame= 275 fps=210 q=24.8 Lsize= 2538kB time=11.00 bitrate=1890.5kbits/s
video:2536kB audio:0kB global headers:0kB muxing overhead 0.110687%
用 辣鸡电脑Ubuntu 试了一下, 同样的品质, 电脑可以达到 200fps 以上。
离线
# ffmpeg -s 640x480 -pix_fmt yuv420p -i rawvideoA.yuv -vcodec mjpeg -qscale 3 outputA.mov
ffmpeg version 3.4.5 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.4.0 (Buildroot 2019.02.2)
configuration: --enable-cross-compile --cross-prefix=/opt/f1c100s/buildroot-2019.02.2/output/host/bin/arm-buildroot-linux-gnueabi- --sysroot=/opt/f1c100s/buildroot-2019.02.2/output/host/arm-buildroot-linux-gnueabi/sysroot --host-cc=/usr/bin/gcc --arch=arm --target-os=linux --disable-stripping --pkg-config=/opt/f1c100s/buildroot-2019.02.2/output/host/bin/pkg-config --disable-static --enable-shared --prefix=/usr --enable-avfilter --disable-version3 --enable-logging --enable-optimizations --disable-extra-warnings --enable-avdevice --enable-avcodec --enable-avformat --enable-network --disable-gray --enable-swscale-alpha --disable-small --enable-dct --enable-fft --enable-mdct --enable-rdft --disable-crystalhd --disable-dxva2 --enable-runtime-cpudetect --disable-hardcoded-tables --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-hwaccels --disable-cuda --disable-cuvid --disable-nvenc --disable-avisynth --disable-frei0r --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libdc1394 --disable-libgsm --disable-libilbc --disable-libvo-amrwbenc --disable-symver --disable-doc --enable-gpl --enable-nonfree --enable-ffmpeg --enable-ffplay --enable-ffserver --enable-avresample --enable-ffprobe --enable-postproc --enable-swscale --enable-indevs --disable-alsa --enable-outdevs --enable-pthreads --enable-zlib --disable-bzlib --disable-libfdk-aac --disable-libcdio --disable-gnutls --enable-openssl --disable-libdrm --disable-libopenh264 --disable-vaapi --disable-vdpau --disable-mmal --disable-omx --disable-omx-rpi --disable-libopencv --disable-libopus --disable-libvpx --disable-libass --disable-libbluray --disable-librtmp --disable-libmp3lame --disable-libmodplug --disable-libspeex --disable-libtheora --disable-libwavpack --disable-iconv --enable-libfreetype --disable-fontconfig --disable-libopenjpeg --disable-libx264 --disable-libx265 --disable-x86asm --disable-mmx --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-avx2 --disable-armv6 --disable-armv6t2 --disable-vfp --disable-neon --disable-altivec --extra-libs=-latomic --enable-pic --cpu=arm926ej-s
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[rawvideo @ 0x6e380] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'rawvideoA.yuv':
Duration: 00:00:02.44, start: 0.000000, bitrate: 92160 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 92160 kb/s, 25 tbr, 25 tbn, 25 tbc
Please use -q:a or -q:v, -qscale is ambiguous
File 'outputA.mov' already exists. Overwrite ? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x809d0] deprecated pixel format used, make sure you did set range correctly
Output #0, mov, to 'outputA.mov':
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Video: mjpeg (jpeg / 0x6765706A), yuvj420p(pc), 640x480, q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc57.107.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 61 fps=5.9 q=3.0 Lsize= 1257kB time=00:00:02.40 bitrate=4289.1kbits/s speed=0.232x
video:1256kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.076685%
品质各种调整 3 (2 - 31) 帧率也没什么变化。
离线
# ffmpeg -s 320x240 -pix_fmt yuv420p -i rawvideoA.yuv -vcodec mjpeg -qscale 31 -vb 100k outputA.mov
ffmpeg version 3.4.5 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.4.0 (Buildroot 2019.02.2)
configuration: --enable-cross-compile --cross-prefix=/opt/f1c100s/buildroot-2019.02.2/output/host/bin/arm-buildroot-linux-gnueabi- --sysroot=/opt/f1c100s/buildroot-2019.02.2/output/host/arm-buildroot-linux-gnueabi/sysroot --host-cc=/usr/bin/gcc --arch=arm --target-os=linux --disable-stripping --pkg-config=/opt/f1c100s/buildroot-2019.02.2/output/host/bin/pkg-config --disable-static --enable-shared --prefix=/usr --enable-avfilter --disable-version3 --enable-logging --enable-optimizations --disable-extra-warnings --enable-avdevice --enable-avcodec --enable-avformat --enable-network --disable-gray --enable-swscale-alpha --disable-small --enable-dct --enable-fft --enable-mdct --enable-rdft --disable-crystalhd --disable-dxva2 --enable-runtime-cpudetect --disable-hardcoded-tables --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-hwaccels --disable-cuda --disable-cuvid --disable-nvenc --disable-avisynth --disable-frei0r --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libdc1394 --disable-libgsm --disable-libilbc --disable-libvo-amrwbenc --disable-symver --disable-doc --enable-gpl --enable-nonfree --enable-ffmpeg --enable-ffplay --enable-ffserver --enable-avresample --enable-ffprobe --enable-postproc --enable-swscale --enable-indevs --disable-alsa --enable-outdevs --enable-pthreads --enable-zlib --disable-bzlib --disable-libfdk-aac --disable-libcdio --disable-gnutls --enable-openssl --disable-libdrm --disable-libopenh264 --disable-vaapi --disable-vdpau --disable-mmal --disable-omx --disable-omx-rpi --disable-libopencv --disable-libopus --disable-libvpx --disable-libass --disable-libbluray --disable-librtmp --disable-libmp3lame --disable-libmodplug --disable-libspeex --disable-libtheora --disable-libwavpack --disable-iconv --enable-libfreetype --disable-fontconfig --disable-libopenjpeg --disable-libx264 --disable-libx265 --disable-x86asm --disable-mmx --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-avx2 --disable-armv6 --disable-armv6t2 --disable-vfp --disable-neon --disable-altivec --extra-libs=-latomic --enable-pic --cpu=arm926ej-s
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[rawvideo @ 0x6e400] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'rawvideoA.yuv':
Duration: 00:00:09.76, start: 0.000000, bitrate: 23040 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240, 23040 kb/s, 25 tbr, 25 tbn, 25 tbc
Please use -q:a or -q:v, -qscale is ambiguous
File 'outputA.mov' already exists. Overwrite ? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x9cf80] deprecated pixel format used, make sure you did set range correctly
Output #0, mov, to 'outputA.mov':
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Video: mjpeg (jpeg / 0x6765706A), yuvj420p(pc), 320x240, q=2-31, 100 kb/s, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc57.107.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/100000 buffer size: 0 vbv_delay: -1
frame= 244 fps= 27 q=31.0 Lsize= 673kB time=00:00:09.72 bitrate= 567.2kbits/s speed=1.09x
video:671kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.247602%
320x240 分辨率可以接近 30fps
离线
不是的, 就是把一个 YUV420P 格式的纯像素文件 rawvideoA.yuv 编码成 jpeg格式的文件,
用于测试 f1c100s 的编码能力。
离线
那不就是软件编码么?
对, 就是测试软编码, 哎,太耗CPU了。
离线
1、效果就是看转换的帧数?
2、为什么不用硬件的编码?
1. 一楼红色圈圈那一行可以看帧率,总帧数等
2. 因为还不会,只能先软件搞搞
离线
感谢楼上朋友耐心指教,请问默认情况下 ff_simple_idct_arm 这个函数是汇编优化的吗?我还有优化的空间吗?目前就是因为摄像头驱动没有搞定,我猜想着先用文件测试,确定编码器速率没有问题才去弄摄像头驱动程序。
看来是不是应该用 f1c200s, 用内存做文件存储,先排除问题。
离线
多谢楼上朋友指教!
离线
有弄硬编么?
公司正在申请 tina 的 sdk, 要过些时间才会开始.
离线
Linux默认开了cache,软解吗速度就是酱紫的
离线