Posts

Showing posts from January, 2019

Webcam streaming throught VLC with YUY2 compatibility

If you try to stream your webcam throught VLC you probably will see the following issue: # vlc v4l2:///dev/video0 --sout '#rtp{mux=ts,sdp=rtsp://:8888/live.sdp}'  VLC media player 3.0.4 Vetinari (revision 3.0.4-0-gf615db6332) [000055c7620dd630] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. [00007ff730002fe0] main mux error: cannot add this stream [00007ff730001180] stream_out_rtp stream out error: cannot add this stream to the muxer [00007ff73000ff60] main decoder error: cannot create packetizer output (YUY2) [00007ff73000ff60] main decoder error: buffer deadlock prevented To fix it, you must enable the transcoding and run the following command: cvlc -vvv v4l2:///dev/video0:chroma=mp2v --v4l2-width 1280 --v4l2-height 720 --sout '#transcode{vcodec=mp2v,acodec=mpga,fps=30}:rtp{mux=ts,sdp=rtsp://:8888/live.sdp}' where chroma enables hardware video decoding. You can edit the resolution, codecs and frame

v4l2: open /dev/video0: Permission denied

If you try to stream using your webcam throught vlc or xawtv vlc v4l2:///dev/video0 or xawtv -c /dev/video0 probably you will have this issue. To solve it, you must add your user to the video group as follows: sudo adduser username video sudo usermod -a -G video username where username is your user (whoami) Now restart your computer Enjoy it!