CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: orangepi-xunlong/orangepi-build
Path: blob/next/external/packages/bsp/rk3588/etc/profile.d/gst.sh
Views: 3963
1
export GST_GL_API=gles2
2
export GST_GL_PLATFORM=egl
3
4
export GST_DEBUG_NO_COLOR=1
5
export GST_INSPECT_NO_COLORS=1
6
7
# Skip vstride aligning, which is not required when using RKVENC.
8
# export GST_MPP_ENC_UNALIGNED_VSTRIDE=1
9
10
# Convert to NV12(using RGA) when output format is NV12_10.
11
# export GST_MPP_DEC_DISABLE_NV12_10=1
12
13
# Convert to NV12(using RGA) when output format is not NV12.
14
# export GST_MPP_VIDEODEC_DEFAULT_FORMAT=NV12
15
16
# Try to use ARM AFBC to get better performance, but not work for all sinks.
17
# export GST_MPP_VIDEODEC_DEFAULT_ARM_AFBC=1
18
19
# Use below env variables to configure kmssink plane ZPOS.
20
# export KMSSINK_PLANE_ZPOS=0
21
# export KMSSINK_PLANE_ON_TOP=1
22
# export KMSSINK_PLANE_ON_BOTTOM=1
23
24
# There's an extra vsync waiting in kmssink, which is only needed for BSP 4.4
25
# kernel(due to ecac2033831e FROMLIST: drm: skip wait on vblank for set plane).
26
# Skip it would bring better performance with frame dropping.
27
# export KMSSINK_DISABLE_VSYNC=1
28
29
# The waylandsink is async by default, which allows frame dropping.
30
# export WAYLANDSINK_SYNC_FRAME=1
31
32
# Put video surface above UI window in waylandsink.
33
# export WAYLANDSINK_PLACE_ABOVE=1
34
35
# Preferred formats for V4L2
36
export GST_V4L2_PREFERRED_FOURCC=NV12:YU12:NV16:YUY2
37
38
# Preferred formats for videoconvert
39
export GST_VIDEO_CONVERT_PREFERRED_FORMAT=NV12:NV16:I420:YUY2
40
41
# Using libv4l2 for V4L2
42
export GST_V4L2_USE_LIBV4L2=1
43
44
# Default device for v4l2src
45
export GST_V4L2SRC_DEFAULT_DEVICE=/dev/video-camera0
46
47
# Available RK devices for v4l2src
48
export GST_V4L2SRC_RK_DEVICES=_mainpath:_selfpath:_bypass:_scale
49
50
# Max resolution for v4l2src
51
export GST_V4L2SRC_MAX_RESOLUTION=3840x2160
52
53
# Preferred sinks for playbin3(autoaudiosink/autovideosink) and playbin.
54
# export AUTOAUDIOSINK_PREFERRED=alsasink
55
# export AUTOVIDEOSINK_PREFERRED=waylandsink
56
# export PLAYBIN2_PREFERRED_AUDIOSINK=alsasink
57
# export PLAYBIN2_PREFERRED_VIDEOSINK=waylandsink
58
59
# Try RGA 2D accel in videoconvert, videoscale and videoflip.
60
# NOTE: Might not success, and might behave different from the official plugin.
61
# export GST_VIDEO_CONVERT_USE_RGA=1
62
# export GST_VIDEO_FLIP_USE_RGA=1
63
export GST_MPP_NO_RGA=1
64
65
# Default rotation for camerabin2:
66
# clockwise(90)|rotate-180|counterclockwise(270)|horizontal-flip|vertical-flip
67
# export CAMERA_FLIP=clockwise
68
if [ $CAMERA_FLIP ]; then
69
CAMERA_FILTER="videoflip method=$CAMERA_FLIP"
70
export CAMERABIN2_PREVIEW_FILTER=$CAMERA_FILTER
71
export CAMERABIN2_IMAGE_FILTER=$CAMERA_FILTER
72
export CAMERABIN2_VIDEO_FILTER=$CAMERA_FILTER
73
export CAMERABIN2_VIEWFINDER_FILTER=$CAMERA_FILTER
74
fi
75
76