File: interlaced_w

package info (click to toggle)
v4l2loopback 0.15.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 556 kB
  • sloc: ansic: 6,564; sh: 301; makefile: 200
file content (43 lines) | stat: -rwxr-xr-x 742 bytes parent folder | download | duplicates (7)
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
#!/bin/sh

DEVICE=$1
WIDTH=320
HEIGHT=240
#WIDTH=1920
#HEIGHT=1080


## uncomment the 'progressive' line to switch to non-interlaced
INTERLACED=interlaced
#INTERLACED=progressive
INTERLACED=mixed

error() {
 echo "$@" 1>&2
}
debug() {
 error "$@"
 $@
}

if [ "x${GSTLAUNCH}" = "x" ]; then
 GSTLAUNCH=$(which gst-launch-1.0)
fi
if [ "x${GSTLAUNCH}" = "x" ]; then
  error "need gst-launch-1.0"
  exit 1
fi
if [ "x${DEVICE}" = "x" ]; then
 DEVICE=/dev/video0
fi

if [ -c "${DEVICE}" ]; then
 :
else
 error "illegal device ${DEVICE}"
 exit 1
fi

debug ${GSTLAUNCH} videotestsrc horizontal-speed=16 \
	! video/x-raw, format=UYVY, width=${WIDTH}, height=${HEIGHT}, frame-rate=30000/1001, interlace-mode=${INTERLACED} \
	! v4l2sink device=${DEVICE}