我正在使用安装了 Ubuntu 16.04 的 Docker 容器。 我尝试设置基于 IOT 的项目people_counter所以我安装了 OpenVINO 工具包,安装后我运行了该命令,最后当我构建并启动使用深度学习推理进行人数统计的主应用程序时,我遇到了以下错误。
我运行该程序:
./obj_recognition
-i Pedestrain_Detect_2_1_1.mp4
-m /opt/intel/computer_vision_sdk/deployment_tools/intel_models/person-detection-retail-0012/FP16/person-detection-retail-0012.xml
-l /opt/intel/computer_vision_sdk/deployment_tools/intel_models/person-detection-retail-0012/FP16/person-detection-retail-0012.bin
-d GPU
-t SSD
-thresh 0.7 0
2>/dev/null
| ffmpeg
-v warning
-f rawvideo
-pixel_format bgr24
-video_size 544x320
-i -
http://localhost:8090/fac.ffm
我得到了这个:
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
我能做什么?
编辑: 彼得·科德斯之后
删除 -v 警告我运行命令并得到这个:
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, rawvideo, from 'pipe:':
Duration: N/A, bitrate: 104448 kb/s
Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 544x320, 104448 kb/s, 25 tbr, 25 tbn, 25 tbc
Output #0, ffm, to 'http://localhost:8090/fac.ffm':
Metadata:
creation_time : 2018-09-05 06:55:30
encoder : Lavf56.40.101
Stream #0:0: Video: mjpeg, yuv420p, 852x480, q=2-31, 8192 kb/s, 25 fps, 1000k tbn, 25 tbc
Metadata:
encoder : Lavc56.60.100 mjpeg
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
frame= 0 fps=0.0 q=0.0 Lsize= 4kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
删除-v warning
选项,以便从 ffmpeg 获得更多输出。 (默认值为-v info
。 使用ffmpeg -v help
查看可用的不同日志级别。
(编辑:这是在更新之前编写的,当时我们没有 FFMPEG 输出显示http://localhost:8090/fac.ffm
等确实进入了 FFMPEG 命令行。 所以也许 ffmpeg 的输入是空的。 用hexdump -C
(
看起来您的问题是您在后面的行末尾省略了行延续,因此这些是单独的 shell 命令而不是要
ffmpeg
的 args . 您应该收到错误消息,例如-f: command not found
.
如果您使用的是 bash(而不是sh
(,则可以使用 bash 数组变量来允许您在参数列表中使用换行符作为空格。
ffmpeg_args = (
-v warning
-f rawvideo
-pixel_format bgr24
-video_size 544x320
-i -
http://localhost:8090/fac.ffm
)
blah blah | ffmpeg "${ffmpeg_args[@]}"