I need to stream video from a capture device. The original video is 1920x1080, and the image isn't very "dynamic", so my needs are:
- 10 fps
- no audio
- h264 encoding
- no B-frames
- one I-frame every 5 secs. (I have to record the stream, and this setting helps the seek...)
- no peak when the I-frames are streamed
Therefore when I set VLC I use the following settings:
MRL:
Code: Select all
v4l2:///dev/video0
Input options:
Code: Select all
:v4l2-aspect-ratio=16\:9 :v4l2-audio-input=-1 :v4l2-width=1920 :v4l2-height=1080 :live-caching=1000
sout string:
Code: Select all
:sout=#transcode{venc=x264{keyint=50,qp=0,bframes=0,b-bias=-100,bpyramid=none,ref=1},vcodec=h264,fps=10,vb=0,scale=0,acodec=none}:rtp{dst=192.168.0.150,port=50040,mux=ts{shaping=6000,use-key-frames}}
All seems work correctly, the video is showed on the destination workstation (received with VLC), but if I capture the stream with Wireshark I see a burst of packets every 5 secs, and no traffic in the meantime. This is exactly the opposite of what is described in the "VLC command-line help" about the "--sout-ts-shaping" and "--sout-ts-use-key-frames" options...
You can find a pcap file here:
https://drive.google.com/drive/folders/ ... sp=sharing
With the same sout string, but without "shaping" and "use-key-frames" options, I obtain a "smooth" stream, with peaks every 5 secs (the I-frames) and several packets in the meantime.
What is wrong in the settings I'm using?
I'm using "VLC 2.2.2 Weatherwax" on an "Ubuntu server 16.04" pc (with Lubuntu desktop).
The same settings works ok on a Windows 7 pc with "VLC 2.0.0 Twoflower".
Thanks a lot in advance for the answers!!