VLC Streaming: Difference between revisions

From Playing with linux...
Jump to navigation Jump to search
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 9: Line 9:
I have streamed to a site-local multicast address with transcoding, because the C920 gives a standard image format of yuy2, which isn't stream-able in a transport stream.
I have streamed to a site-local multicast address with transcoding, because the C920 gives a standard image format of yuy2, which isn't stream-able in a transport stream.
<pre>
<pre>
cvlc -vvvv --v4l2-width=1920 --v4l2-height=1080 --v4l2-aspect-ratio=16\:9 --v4l2-fps=30 --v4l2-sharpness=255 --v4l2-power-line-frequency=1 --v4l2-set-ctrls={"009A090C=0"}--live-caching=150 v4l2:///dev/video0 --sout '#transcode{vcodec=mp4v,acodec=none,vb=12000,ab=0}:rtp{mux=ts,dst=239.255.255.45,port=5004,sdp=sap,name="localstream"}' --ttl 1  
cvlc -vvvv --v4l2-width=1920 --v4l2-height=1080 --v4l2-aspect-ratio=16\:9 --v4l2-fps=30 --v4l2-sharpness=255 \
--v4l2-power-line-frequency=1 --v4l2-set-ctrls={"009A090C=0"}--live-caching=150 v4l2:///dev/video0 --sout \
'#transcode{vcodec=mp4v,acodec=none,vb=12000,ab=0}:rtp{mux=ts,dst=239.255.255.45,port=5004,sdp=sap,name="localstream"}' \
--ttl 1  
</pre>
</pre>


There's also the possibility to stream without transcoding, but the following doesn't work well, because the webcam just isn't fast enough while building the mjpeg frames.
There's also the possibility to stream without transcoding, but the following doesn't work well, because the webcam just isn't fast enough while building the mjpeg frames.
<pre>
<pre>
cvlc -vv --v4l2-chroma=MJPG --v4l2-width=1920 --v4l2-height=1080 --v4l2-aspect-ratio=16\:9 --v4l2-fps=30 --live-caching=100 v4l2:///dev/video0 --sout '#rtp{mux=ts,dst=239.255.255.45,port=5004,sdp=sap,name="localstream"}' --ttl 1
cvlc -vv --v4l2-chroma=MJPG --v4l2-width=1920 --v4l2-height=1080 --v4l2-aspect-ratio=16\:9 --v4l2-fps=30 \
--live-caching=100 v4l2:///dev/video0 --sout '#rtp{mux=ts,dst=239.255.255.45,port=5004,sdp=sap,name="localstream"}' \
--ttl 1
</pre>
</pre>


Line 20: Line 25:
The following has worked for years with a BT878-based capture card:
The following has worked for years with a BT878-based capture card:
<pre>
<pre>
vlc -vvv v4l2:///dev/video0:input=1:width=720:height=576 --sout '#transcode{vcodec=mp4v,acodec=none,vb=2000,ab=0}:rtp{mux=ts,dst=239.255.79.42,port=1234,sdp=sap,name="test"}' --ttl 1
vlc -vvv v4l2:///dev/video0:input=1:width=720:height=576 --sout \
'#transcode{vcodec=mp4v,acodec=none,vb=2000,ab=0}:rtp{mux=ts,dst=239.255.255.45,port=1234,sdp=sap,name="test"}' \
--ttl 1
</pre>
 
==Edit Windows Default Playback Device with FFplay==
You can change the default playback channel (in Windows 10) by using the following environment variable.
The default setting is "Default playback device"
<pre>
set SDL_AUDIO_DEVICE_NAME=AirliteUSB5 (3- USB AUDIO  CODEC)
FFplay 
</pre>
</pre>

Latest revision as of 16:51, 16 January 2020

Streaming with VLC from the command line

Logitech C910

I've tried the Logitech C910, but it won't focus to infinity without an extra lens.

Logitech C920

The Logitech C920 still doesn't focus fully to infinity, but the picture is clear enough.

I have streamed to a site-local multicast address with transcoding, because the C920 gives a standard image format of yuy2, which isn't stream-able in a transport stream.

cvlc -vvvv --v4l2-width=1920 --v4l2-height=1080 --v4l2-aspect-ratio=16\:9 --v4l2-fps=30 --v4l2-sharpness=255 \
--v4l2-power-line-frequency=1 --v4l2-set-ctrls={"009A090C=0"}--live-caching=150 v4l2:///dev/video0 --sout \ 
'#transcode{vcodec=mp4v,acodec=none,vb=12000,ab=0}:rtp{mux=ts,dst=239.255.255.45,port=5004,sdp=sap,name="localstream"}' \
--ttl 1 

There's also the possibility to stream without transcoding, but the following doesn't work well, because the webcam just isn't fast enough while building the mjpeg frames.

cvlc -vv --v4l2-chroma=MJPG --v4l2-width=1920 --v4l2-height=1080 --v4l2-aspect-ratio=16\:9 --v4l2-fps=30 \
--live-caching=100 v4l2:///dev/video0 --sout '#rtp{mux=ts,dst=239.255.255.45,port=5004,sdp=sap,name="localstream"}' \
--ttl 1

BT878

The following has worked for years with a BT878-based capture card:

vlc -vvv v4l2:///dev/video0:input=1:width=720:height=576 --sout \
'#transcode{vcodec=mp4v,acodec=none,vb=2000,ab=0}:rtp{mux=ts,dst=239.255.255.45,port=1234,sdp=sap,name="test"}' \
--ttl 1

Edit Windows Default Playback Device with FFplay

You can change the default playback channel (in Windows 10) by using the following environment variable. The default setting is "Default playback device"

set SDL_AUDIO_DEVICE_NAME=AirliteUSB5 (3- USB AUDIO  CODEC)
FFplay