-
Notifications
You must be signed in to change notification settings - Fork 23
/
vlc-screencast
executable file
·71 lines (54 loc) · 1.17 KB
/
vlc-screencast
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
set -e
if [ ! $(which vlc) ] ; then
echo "Vlc is not installed"
exit 2
fi
##Options
##Video size
height="480"
width="640"
##Encoder
#video_encoder="ffmpeg"
#video_encoder="x264"
video_encoder="theora"
##Video Codec
#video_codec="h264"
video_codec="vorb"
#Input
input="screen://"
#input="v4l2://"
fps=10
#Output access
access="http"
## file
## udp
## rtp
## http
## https
## mmsh : mms over http
filename="stream.ogg"
#Multiplexer
mux="ogg"
#mux="ts"
#mux="ps"
video_bitrate="500"
port="8090"
desktop_ip="192.168.1.11"
laptop_ip="192.168.1.10"
universal_ip="0.0.0.0"
ip=$universal_ip
#VLC Parameters
screen_options=
if [ $input="screen://" ]; then
screen_options=" --screen-fps 10 --screen-mouse-image --screen-follow-mouse --screen-width $width --screen-height $height"
fi
if [ $access="http" ]; then
dst=$ip:$port/$filename
fi
transcode_options="vcodec=$video_codec,venc=$video_encoder,fps=$fps,vb=$video_bitrate,width=$width,heigth=$height"
std_options="access=http,mux=$mux,dst=$dst"
sout="#transcode{$transcode_options}:std{$std_options}"
vlc_options="$input $screen_options --sout \"$sout\""
echo "vlc $vlc_options"
cvlc "$vlc_options" 2>/dev/null