raspivid -o - -t 0 -w 640 -h 480 -fps 25|cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8091}' :demux=h264
一直都是通過以上命令來創建樹莓派h264裸流,然后用VLC打開“http://樹莓派ip:8091”來觀看視頻流,但每隔30秒就出現一次卡頓,報錯ES_OUT_SET_(GROUP_)PCR is called too late 。
解決辦法:
raspivid -o - -t 0 w 640 -h 480 -fps 25| cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8091}' :demux=h264 --h264-fps=25
使用--h264 fps選項建議VLC輸入流的fps。
參考:https://raspberrypi.stackexchange.com/questions/95420/raspivid-es-out-set-group-pcr-is-called-too-late-stream-keeps-freezing