我正在使用 shell_exec() 从 php 脚本执行 ffmpeg。由于它不起作用,我临时更改了 /etc/passwd 以允许使用 Apache 用户 (www-data) 登录。如果我运行该命令,它会显示此错误:
[dash @ 0x563dc823b040] Opening '/dev/shm/mpeg-dash/init-stream0.m4s' for writing
和:
[dash @ 0x563dc823b040] Opening '/dev/shm/mpeg-dash/.tmp' for writing
请在此处查找控制台中显示的所有输出:
www-data@joaquin2:/dev/shm$ ffmpeg -i rtsp://user:[email protected]:21102 -an -c:v copy -b:v 2000k -f dash -window_size 4 -extra_window_size 0 -min_seg_duration 2000000 -remove_at_exit 1 /dev/shm/mpeg-dash/
ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 1 packets
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 2 packets
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 3 packets
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 1 packets
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 2 packets
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 1 packets
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 3 packets
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 9 packets
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 2 packets
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 6 packets
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 7 packets
[rtsp @ 0x563dc81f8100] max delay reached. need to consume packet
[rtsp @ 0x563dc81f8100] RTP: missed 7 packets
[h264 @ 0x563dc81fb420] out of range intra chroma pred mode
[h264 @ 0x563dc81fb420] error while decoding MB 128 28
[h264 @ 0x563dc81fb420] concealing 27313 DC, 27313 AC, 27313 MV errors in I frame
Input #0, rtsp, from 'rtsp://user:[email protected]:21102':
Metadata:
title : Media Presentation
Duration: N/A, start: 0.240000, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuvj420p(pc, bt709, progressive), 4096x2160, 25 fps, 25 tbr, 90k tbn, 50 tbc
[dash @ 0x563dc823b040] Opening '/dev/shm/mpeg-dash/init-stream0.m4s' for writing
Output #0, dash, to '/dev/shm/mpeg-dash/':
Metadata:
title : Media Presentation
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (Baseline) ([33][0][0][0] / 0x0021), yuvj420p(pc, bt709, progressive), 4096x2160, q=2-31, 2000 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[dash @ 0x563dc823b040] Opening '/dev/shm/mpeg-dash/.tmp' for writing
av_interleaved_write_frame(): Not a directory
Error writing trailer of /dev/shm/mpeg-dash/: Not a directoryframe= 1 fps=0.0 q=-1.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=0.232x
video:275kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!
我正在使用“/dev/shm/mpeg-dash”文件夹,因为建议每 2 秒覆盖一次文件。
提前致谢。