使用cvlc进行流媒体时出现问题。我目前正在使用Ubuntu 17.10和VLC 2.2.6,如下所示。我通过python子过程命令启动流。然后,将以下内容打印到终端。任何帮助表示赞赏。
VLC media player 2.2.6 Umbrella (revision 2.2.6-0-g1aae78981c)
[000055e7514d3d28] dbus interface error: Failed to connect to the D-Bus session daemon: Failed to connect to socket /tmp/dbus-1msq9as6ke: Connection refused
[000055e7514d3d28] core interface error: no suitable interface module
[000055e7513c5a88] core libvlc error: interface "dbus,none" initialization failed
[000055e7514d3d28] dummy interface: using the dummy interface module...
[00007fc8c0006c18] x264 encoder: using cpu capabilities: MMX2 SSE2Fast LZCNT
[00007fc8c0006c18] x264 encoder: profile High, level 3.0
[00007fc8c0006c18] x264 encoder: final ratefactor: 38.84
[00007fc8cc4ffbd8] stream_out_transcode stream out: input interval 33333 (base 1)
[00007fc8cc4ffbd8] stream_out_transcode stream out: output interval 66666 (base 1)
[00007fc8c0006c18] x264 encoder: using SAR=715/714
[00007fc8c0006c18] x264 encoder: using cpu capabilities: MMX2 SSE2Fast LZCNT
[00007fc8c0006c18] x264 encoder: profile High, level 3.0
[00007fc8c8000e08] core input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 312 ms)
[00007fc8c8000e08] core input error: ES_OUT_RESET_PCR called
[00007fc8c8000e08] core input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 323 ms)
[00007fc8c8000e08] core input error: ES_OUT_RESET_PCR called
...
这是我用来启动子流程的代码。 Opencv通过管道传递到子进程的stdin。
pipe_out = subprocess.Popen([ 'cvlc', "--demux=rawvideo", "--rawvid-fps=30",
"--rawvid-width=715",
"--rawvid-height=576",
"--rawvid-chroma=RV24",
"-",
"--sout",
"#transcode{vcodec=h264,vb=200,fps=15,width=715,height=576}:std{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=:5052/stream.flv}"],
stdin = subprocess.PIPE, stdout = subprocess.PIPE)