使用的板子是STM32MP157,已经烧好配置nginx的系统,
但是/etc/init.d/ 路径下没有教学视频里面的S50nginx文件,导致不能重启服务使用nginx.conf文件里面配置的RTMP协议来传输视频流。
推流会有这个问题:
[root@100ask:~]# ffmpeg -f v4l2 -framerate 10 -i /dev/video0 -q 10 -f flv rtmp://127.0.0.1/live/wei
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 8.4.0 (Buildroot 2020.02-g85b7ab8)
configuration: --enable-cross-compile --cross-prefix=/home/book/100ask_stm32mp157_pro-sdk/Buildroot_2020.02.x/output/host/bin/arm-buildroot-linux-gnueabihf- --sysroot=/home/book/100ask_stm32mp157_pro-sdk/Buildroot_2020.02.x/output/host/arm-buildroot-linux-gnueabihf/sysroot --host-cc=’/home/book/100ask_stm32mp157_pro-sdk/Buildroot_2020.02.x/output/host/bin/ccache /usr/bin/gcc’ --arch=arm --target-os=linux --disable-stripping --pkg-config=/home/book/100ask_stm32mp157_pro-sdk/Buildroot_2020.02.x/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 --disable-ffplay --enable-avresample --disable-ffprobe --disable-libxcb --disable-postproc --enable-swscale --enable-indevs --enable-alsa --enable-outdevs --enable-pthreads --enable-zlib --enable-bzlib --enable-libfdk-aac --disable-libcdio --disable-gnutls --enable-openssl --enable-libdrm --enable-libopenh264 --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis --enable-vaapi --disable-vdpau --disable-mmal --disable-omx --disable-omx-rpi --disable-libopencv --enable-libopus --enable-libvpx --enable-libass --disable-libbluray --disable-libmfx --enable-librtmp --enable-libmp3lame --disable-libmodplug --enable-libspeex --enable-libtheora --enable-libwavpack --disable-iconv --enable-libfreetype --enable-fontconfig --enable-libopenjpeg --enable-libx264 --disable-libx265 --disable-libdav1d --disable-x86asm --disable-mmx --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-avx2 --enable-armv6 --enable-vfp --enable-neon --disable-altivec --extra-libs=-latomic --enable-pic --cpu=cortex-a7
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
[video4linux2,v4l2 @ 0x72c90] The driver changed the time per frame from 1/10 to 1/5
Input #0, video4linux2,v4l2, from ‘/dev/video0’:
Duration: N/A, start: 2881.136767, bitrate: 165888 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
RTMP_ReadPacket, failed to read RTMP packet header
rtmp://127.0.0.1/live/wei: Unknown error occurred