输出文件为空,在Docker容器中的ubuntu16.04中未进行任何编码(检查-ss / -t / -frames参数(如果使用))

时间:2018-09-03 07:13:34

标签: python-3.x docker computer-vision intel openvino

我正在使用安装了Ubuntu 16.04的Docker容器。我试图设置基于IOT的people_counter项目,因此我安装了OpenVINO Toolkit,安装后运行命令,最后在构建并启动使用深度学习推理进行人员计数的主应用程序时出现以下错误。

我运行程序:

./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)

我该怎么办?

编辑: Peter Cordes建议

之后

删除-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)

1 个答案:

答案 0 :(得分:0)

删除-v warning选项,以便从ffmpeg获得更多输出。 (默认值为-v info。使用ffmpeg -v help查看可用的不同日志级别。)


(edit:这是在更新之前编写的,当时我们没有显示出http://localhost:8090/fac.ffm的ffmpeg输出,实际上确实使它进入ffmpeg命令行。因此,也许ffmpeg的输入为空。用hexdump -C十六进制转储它


在这里看起来像您的问题是您在后面的行的末尾省略了\行继续,因此这些是单独的shell命令,而不是{{1 }}。您应该已经收到诸如ffmpeg之类的错误消息。


如果您使用的是bash(而不是-f: command not found),则可以使用bash数组变量让您在参数列表中将换行符用作空格。

sh