当前位置: 首页 > news >正文

Raspbian简易RTSP服务

Raspbian简易RTSP服务

  • 1. 源由
  • 2. 搭建简易RTSP服务器
    • 2.1 系统安装
    • 2.2 软件安装
    • 2.3 命令介绍
      • 2.3.1 libcamera-hello
      • 2.3.2 libcamera-vid
      • 2.3.3 cvlc
  • 3. 实测
  • 4. 参考资料

1. 源由

鉴于前期的一些准备工作:

  • 《ArduPilot开源飞控之Companion Computers简单分析》
  • 《ArduPilot开源代码之CompanionComputer上天计划》

以及手头可用的资源RaspberryPi(PiZero/Pi3B+),选择rpanion-server这个想对容易上手的伴机电脑。

在使用过程中确实也遇到一些问题:

  1. Can’t set “Maximum Bitrate” beyond 10MB on Raspberry Pi3B+ #191
  2. Re-install process will fail due to the existence of binary(node/npm) links #194
  3. Feature Request: pan-tilt gimbal controls #196
  4. Is there any way to save configuration locally on Rpanion? #197
  5. 720P@20FPS latency is obviously there, any idea? #204
  6. No video feed thru UDP with RTP #175
  7. Feature Request: send VIDEO_STREAM_INFO mavlink messages to GCS #169

整个过程中也得到了stephendade的大力支持和帮助。

当然,整理这份资料,主要目的是

  1. 记录一下其他方式搭建简易RTSP服务器
  2. 了解最简系统下的RTSP服务性能
  3. 同时,和Rpanion做一个对比

期望:用最简单的命令或者环境来做对比测试。

2. 搭建简易RTSP服务器

  • 最简单的环境:rpi-rtsp-gstreamer 对应的资料:《Streaming Raspberry Pi Video via RTSP with GStreamer and Video4Linux》

  • 最简单的命令:libcamera-vid + cvlc 对应的资料:《How to use libcamera-vid to stream rtsp on raspberry pi? #3097》

注:最终结合了上面两份资料,选择了最简单命令来搭建环境。

2.1 系统安装

略,详见《Raspbian镜像无头烧录》

2.2 软件安装

$ sudo apt-get install gstreamer1.0-tools -y
$ sudo apt-get install libgstrtspserver-1.0-dev gstreamer1.0-rtsp -y
$ sudo apt-get install vlc -y

2.3 命令介绍

$ libcamera-hello --list-camera
Available cameras
-----------------
0 : ov5647 [2592x1944] (/base/soc/i2c0mux/i2c@1/ov5647@36)Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16, 0)/2560x1920 crop]1296x972 [43.25 fps - (0, 0)/2592x1944 crop]1920x1080 [30.62 fps - (348, 434)/1928x1080 crop]2592x1944 [15.63 fps - (0, 0)/2592x1944 crop]$ libcamera-vid --codec h264 --profile main --level 4 -b 150000000 --framerate 30 --width 1920 --height 1080 -t 0 --inline -o - | cvlc stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/stream1}' :demux=h264

2.3.1 libcamera-hello

OV5647摄像头CSI模块,支持以下模式:

  • 640x480 [58.92 fps - (16, 0)/2560x1920 crop]
  • 1296x972 [43.25 fps - (0, 0)/2592x1944 crop]
  • 1920x1080 [30.62 fps - (348, 434)/1928x1080 crop]
  • 2592x1944 [15.63 fps - (0, 0)/2592x1944 crop]
$ libcamera-hello --help
Valid options are:-h [ --help ] [=arg(=1)] (=0)         Print this help message--version [=arg(=1)] (=0)             Displays the build version number--list-cameras [=arg(=1)] (=0)        Lists the available cameras attached to the system.--camera arg (=0)                     Chooses the camera to use. To list the available indexes, use the--list-cameras option.-v [ --verbose ] [=arg(=2)] (=1)      Set verbosity level. Level 0 is no output, 1 is default, 2 is verbose.-c [ --config ] [=arg(=config.txt)]   Read the options from a file. If no filename is specified, default toconfig.txt. In case of duplicate options, the ones provided on the command linewill be used. Note that the config file must only contain the long formoptions.--info-text arg (=#%frame (%fps fps) exp %exp ag %ag dg %dg)Sets the information string on the titlebar. Available values:%frame (frame number)%fps (framerate)%exp (shutter speed)%ag (analogue gain)%dg (digital gain)%rg (red colour gain)%bg (blue colour gain)%focus (focus FoM value)%aelock (AE locked status)%lp (lens position, if known)%afstate (AF state, if supported)--width arg (=0)                      Set the output image width (0 = use default value)--height arg (=0)                     Set the output image height (0 = use default value)-t [ --timeout ] arg (=5000)          Time (in ms) for which program runs-o [ --output ] arg                   Set the output file name--post-process-file arg               Set the file name for configuring the post-processing--rawfull [=arg(=1)] (=0)             Force use of full resolution raw frames-n [ --nopreview ] [=arg(=1)] (=0)    Do not show a preview window-p [ --preview ] arg (=0,0,0,0)       Set the preview window dimensions, given as x,y,width,height e.g. 0,0,640,480-f [ --fullscreen ] [=arg(=1)] (=0)   Use a fullscreen preview window--qt-preview [=arg(=1)] (=0)          Use Qt-based preview window (WARNING: causes heavy CPU load, fullscreen notsupported)--hflip [=arg(=1)] (=0)               Request a horizontal flip transform--vflip [=arg(=1)] (=0)               Request a vertical flip transform--rotation arg (=0)                   Request an image rotation, 0 or 180--roi arg (=0,0,0,0)                  Set region of interest (digital zoom) e.g. 0.25,0.25,0.5,0.5--shutter arg (=0)                    Set a fixed shutter speed in microseconds--analoggain arg (=0)                 Set a fixed gain value (synonym for 'gain' option)--gain arg                            Set a fixed gain value--metering arg (=centre)              Set the metering mode (centre, spot, average, custom)--exposure arg (=normal)              Set the exposure mode (normal, sport)--ev arg (=0)                         Set the EV exposure compensation, where 0 = no change--awb arg (=auto)                     Set the AWB mode (auto, incandescent, tungsten, fluorescent, indoor, daylight,cloudy, custom)--awbgains arg (=0,0)                 Set explict red and blue gains (disable the automatic AWB algorithm)--flush [=arg(=1)] (=0)               Flush output data as soon as possible--wrap arg (=0)                       When writing multiple output files, reset the counter when it reaches thisnumber--brightness arg (=0)                 Adjust the brightness of the output images, in the range -1.0 to 1.0--contrast arg (=1)                   Adjust the contrast of the output image, where 1.0 = normal contrast--saturation arg (=1)                 Adjust the colour saturation of the output, where 1.0 = normal and 0.0 =greyscale--sharpness arg (=1)                  Adjust the sharpness of the output image, where 1.0 = normal sharpening--framerate arg (=-1)                 Set the fixed framerate for preview and video modes--denoise arg (=auto)                 Sets the Denoise operating mode: auto, off, cdn_off, cdn_fast, cdn_hq--viewfinder-width arg (=0)           Width of viewfinder frames from the camera (distinct from the preview windowsize--viewfinder-height arg (=0)          Height of viewfinder frames from the camera (distinct from the preview windowsize)--tuning-file arg (=-)                Name of camera tuning file to use, omit this option for libcamera defaultbehaviour--lores-width arg (=0)                Width of low resolution frames (use 0 to omit low resolution stream--lores-height arg (=0)               Height of low resolution frames (use 0 to omit low resolution stream--mode arg                            Camera mode as W:H:bit-depth:packing, where packing is P (packed) or U(unpacked)--viewfinder-mode arg                 Camera mode for preview as W:H:bit-depth:packing, where packing is P (packed)or U (unpacked)--buffer-count arg (=0)               Number of in-flight requests (and buffers) configured for video, raw, andstill.--viewfinder-buffer-count arg (=0)    Number of in-flight requests (and buffers) configured for preview window.--autofocus-mode arg (=default)       Control to set the mode of the AF (autofocus) algorithm.(manual, auto,continuous)--autofocus-range arg (=normal)       Set the range of focus distances that is scanned.(normal, macro, full)--autofocus-speed arg (=normal)       Control that determines whether the AF algorithm is to move the lens as quicklyas possible or more steadily.(normal, fast)--autofocus-window arg (=0,0,0,0)     Sets AfMetering to  AfMeteringWindows an set region used, e.g.0.25,0.25,0.5,0.5--lens-position arg                   Set the lens to a particular focus position, expressed as a reciprocal distance(0 moves the lens to infinity), or "default" for the hyperfocal distance--hdr [=arg(=1)] (=0)                 Enable (1) or disable (0) High Dynamic Range, where supported--metadata arg                        Save captured image metadata to a file or "-" for stdout--metadata-format arg (=json)         Format to save the metadata in, either txt or json (requires --metadata)

2.3.2 libcamera-vid

视频采集

  • 编码:--codec h264
  • 配置:--profile main
  • 级别:--level 4
  • 码流:-b 150000000
  • 帧率:--framerate 30
  • 宽高:--width 1920 --height 1080
  • 延时:-t 0
  • 强制:--inline
  • 输出:-o -
$ libcamera-vid --help
Valid options are:-h [ --help ] [=arg(=1)] (=0)         Print this help message--version [=arg(=1)] (=0)             Displays the build version number--list-cameras [=arg(=1)] (=0)        Lists the available cameras attached to the system.--camera arg (=0)                     Chooses the camera to use. To list the available indexes, use the--list-cameras option.-v [ --verbose ] [=arg(=2)] (=1)      Set verbosity level. Level 0 is no output, 1 is default, 2 is verbose.-c [ --config ] [=arg(=config.txt)]   Read the options from a file. If no filename is specified, default toconfig.txt. In case of duplicate options, the ones provided on the command linewill be used. Note that the config file must only contain the long formoptions.--info-text arg (=#%frame (%fps fps) exp %exp ag %ag dg %dg)Sets the information string on the titlebar. Available values:%frame (frame number)%fps (framerate)%exp (shutter speed)%ag (analogue gain)%dg (digital gain)%rg (red colour gain)%bg (blue colour gain)%focus (focus FoM value)%aelock (AE locked status)%lp (lens position, if known)%afstate (AF state, if supported)--width arg (=0)                      Set the output image width (0 = use default value)--height arg (=0)                     Set the output image height (0 = use default value)-t [ --timeout ] arg (=5000)          Time (in ms) for which program runs-o [ --output ] arg                   Set the output file name--post-process-file arg               Set the file name for configuring the post-processing--rawfull [=arg(=1)] (=0)             Force use of full resolution raw frames-n [ --nopreview ] [=arg(=1)] (=0)    Do not show a preview window-p [ --preview ] arg (=0,0,0,0)       Set the preview window dimensions, given as x,y,width,height e.g. 0,0,640,480-f [ --fullscreen ] [=arg(=1)] (=0)   Use a fullscreen preview window--qt-preview [=arg(=1)] (=0)          Use Qt-based preview window (WARNING: causes heavy CPU load, fullscreen notsupported)--hflip [=arg(=1)] (=0)               Request a horizontal flip transform--vflip [=arg(=1)] (=0)               Request a vertical flip transform--rotation arg (=0)                   Request an image rotation, 0 or 180--roi arg (=0,0,0,0)                  Set region of interest (digital zoom) e.g. 0.25,0.25,0.5,0.5--shutter arg (=0)                    Set a fixed shutter speed in microseconds--analoggain arg (=0)                 Set a fixed gain value (synonym for 'gain' option)--gain arg                            Set a fixed gain value--metering arg (=centre)              Set the metering mode (centre, spot, average, custom)--exposure arg (=normal)              Set the exposure mode (normal, sport)--ev arg (=0)                         Set the EV exposure compensation, where 0 = no change--awb arg (=auto)                     Set the AWB mode (auto, incandescent, tungsten, fluorescent, indoor, daylight,cloudy, custom)--awbgains arg (=0,0)                 Set explict red and blue gains (disable the automatic AWB algorithm)--flush [=arg(=1)] (=0)               Flush output data as soon as possible--wrap arg (=0)                       When writing multiple output files, reset the counter when it reaches thisnumber--brightness arg (=0)                 Adjust the brightness of the output images, in the range -1.0 to 1.0--contrast arg (=1)                   Adjust the contrast of the output image, where 1.0 = normal contrast--saturation arg (=1)                 Adjust the colour saturation of the output, where 1.0 = normal and 0.0 =greyscale--sharpness arg (=1)                  Adjust the sharpness of the output image, where 1.0 = normal sharpening--framerate arg (=-1)                 Set the fixed framerate for preview and video modes--denoise arg (=auto)                 Sets the Denoise operating mode: auto, off, cdn_off, cdn_fast, cdn_hq--viewfinder-width arg (=0)           Width of viewfinder frames from the camera (distinct from the preview windowsize--viewfinder-height arg (=0)          Height of viewfinder frames from the camera (distinct from the preview windowsize)--tuning-file arg (=-)                Name of camera tuning file to use, omit this option for libcamera defaultbehaviour--lores-width arg (=0)                Width of low resolution frames (use 0 to omit low resolution stream--lores-height arg (=0)               Height of low resolution frames (use 0 to omit low resolution stream--mode arg                            Camera mode as W:H:bit-depth:packing, where packing is P (packed) or U(unpacked)--viewfinder-mode arg                 Camera mode for preview as W:H:bit-depth:packing, where packing is P (packed)or U (unpacked)--buffer-count arg (=0)               Number of in-flight requests (and buffers) configured for video, raw, andstill.--viewfinder-buffer-count arg (=0)    Number of in-flight requests (and buffers) configured for preview window.--autofocus-mode arg (=default)       Control to set the mode of the AF (autofocus) algorithm.(manual, auto,continuous)--autofocus-range arg (=normal)       Set the range of focus distances that is scanned.(normal, macro, full)--autofocus-speed arg (=normal)       Control that determines whether the AF algorithm is to move the lens as quicklyas possible or more steadily.(normal, fast)--autofocus-window arg (=0,0,0,0)     Sets AfMetering to  AfMeteringWindows an set region used, e.g.0.25,0.25,0.5,0.5--lens-position arg                   Set the lens to a particular focus position, expressed as a reciprocal distance(0 moves the lens to infinity), or "default" for the hyperfocal distance--hdr [=arg(=1)] (=0)                 Enable (1) or disable (0) High Dynamic Range, where supported--metadata arg                        Save captured image metadata to a file or "-" for stdout--metadata-format arg (=json)         Format to save the metadata in, either txt or json (requires --metadata)-b [ --bitrate ] arg (=0)             Set the video bitrate for encoding, in bits/second (h264 only)--profile arg                         Set the encoding profile (h264 only)--level arg                           Set the encoding level (h264 only)-g [ --intra ] arg (=0)               Set the intra frame period (h264 only)--inline [=arg(=1)] (=0)              Force PPS/SPS header with every I frame (h264 only)--codec arg (=h264)                   Set the codec to use, either h264, mjpeg or yuv420--save-pts arg                        Save a timestamp file with this name-q [ --quality ] arg (=50)            Set the MJPEG quality parameter (mjpeg only)-l [ --listen ] [=arg(=1)] (=0)       Listen for an incoming client network connection before sending data to theclient-k [ --keypress ] [=arg(=1)] (=0)     Pause or resume video recording when ENTER pressed-s [ --signal ] [=arg(=1)] (=0)       Pause or resume video recording when signal received-i [ --initial ] arg (=record)        Use 'pause' to pause the recording at startup, otherwise 'record' (the default)--split [=arg(=1)] (=0)               Create a new output file every time recording is paused and then resumed--segment arg (=0)                    Break the recording into files of approximately this many milliseconds--circular [=arg(=4)] (=0)            Write output to a circular buffer of the given size (in MB) which is saved onexit--frames arg (=0)                     Run for the exact number of frames specified. This will override any timeoutset.

2.3.3 cvlc

cvlc stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/stream1}' :demux=h264 这里需要仔细的阅读以下文档:

  • RTP (I): Intro to RTP and SDP
  • RTP (II): Streaming with FFmpeg

还不太熟悉这个命令,不过个人理解如下:

  • 输入输出:stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/stream1}'
  • H264编码::demux=h264
$ cvlc --help
VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b)
Usage: vlc [options] [stream] ...
You can specify multiple streams on the commandline.
They will be enqueued in the playlist.
The first item specified will be played first.Options-styles:--option  A global option that is set for the duration of the program.-option  A single letter version of a global --option.:option  An option that only applies to the stream directly before itand that overrides previous settings.Stream MRL syntax:[[access][/demux]://]URL[#[title][:chapter][-[title][:chapter]]][:option=value ...]Many of the global --options can also be used as MRL specific :options.Multiple :option=value pairs can be specified.URL syntax:file:///path/file              Plain media filehttp://host[:port]/file        HTTP URLftp://host[:port]/file         FTP URLmms://host[:port]/file         MMS URLscreen://                      Screen capturedvd://[device]                 DVD devicevcd://[device]                 VCD devicecdda://[device]                Audio CD deviceudp://[[<source address>]@[<bind address>][:<bind port>]]UDP stream sent by a streaming servervlc://pause:<seconds>          Pause the playlist for a certain timevlc://quit                     Special item to quit VLCcore program (core)Audio--audio, --no-audio        Enable audio(default enabled)--force-dolby-surround {0 (Auto), 1 (On), 2 (Off)}Force detection of Dolby Surround--audio-replay-gain-mode {none,track,album}Replay gain mode--audio-replay-gain-preamp <float>Replay preamp--audio-replay-gain-default <float>Default replay gain--audio-time-stretch, --no-audio-time-stretchEnable time stretching audio(default enabled)--audio-filter <string>    Audio filters--audio-visual {any,visual,glspectrum,none}Audio visualisationsVideo-f, --fullscreen, --no-fullscreenFullscreen video output(default disabled)--video-on-top, --no-video-on-topAlways on top(default disabled)--video-wallpaper, --no-video-wallpaperEnable wallpaper mode(default disabled)--video-title-show, --no-video-title-showShow media title on video(default enabled)--video-title-timeout <integer>Show video title for x milliseconds--video-title-position {0 (Centre), 1 (Left), 2 (Right), 4 (Top), 8 (Bottom), 5 (Top-Left), 6 (Top-Right), 9 (Bottom-Left), 10 (Bottom-Right)}Position of video title--mouse-hide-timeout <integer>Hide cursor and fullscreen controller after x millisecondsSnapshot:--snapshot-path <string>   Video snapshot directory (or filename)--snapshot-prefix <string> Video snapshot file prefix--snapshot-format {png,jpg,tiff}Video snapshot format--snapshot-preview, --no-snapshot-previewDisplay video snapshot preview(default enabled)--snapshot-sequential, --no-snapshot-sequentialUse sequential numbers instead of timestamps(default disabled)Window properties:--crop <string>            Video cropping--custom-crop-ratios <string>Custom crop ratios list--aspect-ratio <string>    Source aspect ratio--autoscale, --no-autoscaleVideo Auto Scaling(default enabled)--custom-aspect-ratios <string>Custom aspect ratios list--deinterlace {0 (Off), -1 (Automatic), 1 (On)}Deinterlace--deinterlace-mode {auto,discard,blend,mean,bob,linear,x,yadif,yadif2x,phosphor,ivtc}Deinterlace mode--video-filter <string>    Video filter module--video-splitter <string>  Video splitter moduleSubpicturesOn Screen Display:--spu, --no-spu            Enable sub-pictures(default enabled)--osd, --no-osd            On Screen Display(default enabled)Subtitles:--sub-file <string>        Use subtitle file--sub-autodetect-file, --no-sub-autodetect-fileAutodetect subtitle files(default enabled)--sub-text-scale <integer [10 .. 500]>Subtitles text scaling factorOverlays:--sub-source <string>      Subpictures source module--sub-filter <string>      Subpictures filter moduleTrack settings:--audio-language <string>  Audio language--sub-language <string>    Subtitle language--menu-language <string>   Menu language--preferred-resolution {-1 (Best available), 1080 (Full HD (1080p)), 720 (HD (720p)), 576 (Standard Definition (576 or 480 lines)), 360 (Low Definition (360 lines)), 240 (Very Low Definition (240 lines))}Preferred video resolutionPlayback control:--input-repeat <integer [0 .. 65535]>Input repetitions--input-fast-seek, --no-input-fast-seekFast seek(default disabled)--rate <float>             Playback speedDefault devices:--dvd <string>             DVD device--vcd <string>             VCD deviceAdvanced:--input-title-format <string>Change title according to current mediaInput--stream-filter <string>   Stream filter modulePlaylistPerformance options:-Z, --random, --no-random      Play files randomly forever(default disabled)-L, --loop, --no-loop          Repeat all(default disabled)-R, --repeat, --no-repeat      Repeat current item(default disabled)--play-and-exit, --no-play-and-exitPlay and exit(default disabled)--play-and-stop, --no-play-and-stopPlay and stop(default disabled)--start-paused, --no-start-pausedStart paused(default disabled)--playlist-autostart, --no-playlist-autostartAuto start(default enabled)--playlist-cork, --no-playlist-corkPause on audio communication(default enabled)--media-library, --no-media-libraryUse media library(default disabled)--playlist-tree, --no-playlist-treeDisplay playlist tree(default disabled)--open <string>            Default stream--auto-preparse, --no-auto-preparseAutomatically preparse items(default enabled)--preparse-timeout <integer>Preparsing timeout--metadata-network-access, --no-metadata-network-accessAllow metadata network access(default disabled)--recursive {none,collapse,expand}Subdirectory behaviour--ignore-filetypes <string>Ignored extensions--show-hiddenfiles, --no-show-hiddenfilesShow hidden files(default disabled)-v, --verbose <integer>        Verbosity (0,1,2)--pidfile <string>         Write process id to file--advanced, --no-advanced  Show advanced options(default disabled)--interact, --no-interact  Interface interaction(default enabled)-I, --intf <string>            Interface module--extraintf <string>       Extra interface modules--control <string>         Control interfacesHot keys--hotkeys-y-wheel-mode {-1 (Ignore), 0 (Volume control), 2 (Position control), 3 (Position control reversed)}Mouse wheel vertical axis control--hotkeys-x-wheel-mode {-1 (Ignore), 0 (Volume control), 2 (Position control), 3 (Position control reversed)}Mouse wheel horizontal axis control--global-key-toggle-fullscreen <string>Fullscreen--key-toggle-fullscreen <string>Fullscreen--global-key-leave-fullscreen <string>Exit fullscreen--key-leave-fullscreen <string>Exit fullscreen--global-key-play-pause <string>Play/Pause--key-play-pause <string>  Play/Pause--global-key-faster <string>Faster--key-faster <string>      Faster--global-key-slower <string>Slower--key-slower <string>      Slower--global-key-rate-normal <string>Normal rate--key-rate-normal <string> Normal rate--global-key-rate-faster-fine <string>Faster (fine)--key-rate-faster-fine <string>Faster (fine)--global-key-rate-slower-fine <string>Slower (fine)--key-rate-slower-fine <string>Slower (fine)--global-key-next <string> Next--key-next <string>        Next--global-key-prev <string> Previous--key-prev <string>        Previous--global-key-stop <string> Stop--key-stop <string>        Stop--global-key-jump-extrashort <string>Very short backwards jump--key-jump-extrashort <string>Very short backwards jump--global-key-jump+extrashort <string>Very short forward jump--key-jump+extrashort <string>Very short forward jump--global-key-jump-short <string>Short backwards jump--key-jump-short <string>  Short backwards jump--global-key-jump+short <string>Short forward jump--key-jump+short <string>  Short forward jump--global-key-jump-medium <string>Medium backwards jump--key-jump-medium <string> Medium backwards jump--global-key-jump+medium <string>Medium forward jump--key-jump+medium <string> Medium forward jump--global-key-jump-long <string>Long backwards jump--key-jump-long <string>   Long backwards jump--global-key-jump+long <string>Long forward jump--key-jump+long <string>   Long forward jump--global-key-frame-next <string>Next frame--key-frame-next <string>  Next frame--global-key-quit <string> Quit--key-quit <string>        Quit--global-key-vol-up <string>Volume up--key-vol-up <string>      Volume up--global-key-vol-down <string>Volume down--key-vol-down <string>    Volume down--global-key-vol-mute <string>Mute--key-vol-mute <string>    Mute--global-key-audio-track <string>Cycle audio track--key-audio-track <string> Cycle audio track--global-key-audiodevice-cycle <string>Cycle through audio devices--key-audiodevice-cycle <string>Cycle through audio devices--global-key-subtitle-revtrack <string>Cycle subtitle track in reverse order--key-subtitle-revtrack <string>Cycle subtitle track in reverse order--global-key-subtitle-track <string>Cycle subtitle track--key-subtitle-track <string>Cycle subtitle track--global-key-subtitle-toggle <string>Toggle subtitles--key-subtitle-toggle <string>Toggle subtitles--global-key-program-sid-next <string>Cycle next program Service ID--key-program-sid-next <string>Cycle next program Service ID--global-key-program-sid-prev <string>Cycle previous program Service ID--key-program-sid-prev <string>Cycle previous program Service ID--global-key-aspect-ratio <string>Cycle source aspect ratio--key-aspect-ratio <string>Cycle source aspect ratio--global-key-crop <string> Cycle video crop--key-crop <string>        Cycle video crop--global-key-toggle-autoscale <string>Toggle autoscaling--key-toggle-autoscale <string>Toggle autoscaling--global-key-incr-scalefactor <string>Increase scale factor--key-incr-scalefactor <string>Increase scale factor--global-key-decr-scalefactor <string>Decrease scale factor--key-decr-scalefactor <string>Decrease scale factor--global-key-deinterlace <string>Toggle deinterlacing--key-deinterlace <string> Toggle deinterlacing--global-key-deinterlace-mode <string>Cycle deinterlace modes--key-deinterlace-mode <string>Cycle deinterlace modes--global-key-intf-show <string>Show controller in fullscreen--key-intf-show <string>   Show controller in fullscreen--global-key-wallpaper <string>Toggle wallpaper mode in video output--key-wallpaper <string>   Toggle wallpaper mode in video output--global-key-random <string>Random--key-random <string>      Random--global-key-loop <string> Normal/Loop/Repeat--key-loop <string>        Normal/Loop/Repeat--global-key-zoom-quarter <string>1:4 Quarter--key-zoom-quarter <string>1:4 Quarter--global-key-zoom-half <string>1:2 Half--key-zoom-half <string>   1:2 Half--global-key-zoom-original <string>1:1 Original--key-zoom-original <string>1:1 Original--global-key-zoom-double <string>2:1 Double--key-zoom-double <string> 2:1 DoubleJump sizes:--extrashort-jump-size <integer>Very short jump length--short-jump-size <integer>Short jump length--medium-jump-size <integer>Medium jump length--long-jump-size <integer> Long jump length--bookmark1 <string>       Playlist bookmark 1--bookmark2 <string>       Playlist bookmark 2--bookmark3 <string>       Playlist bookmark 3--bookmark4 <string>       Playlist bookmark 4--bookmark5 <string>       Playlist bookmark 5--bookmark6 <string>       Playlist bookmark 6--bookmark7 <string>       Playlist bookmark 7--bookmark8 <string>       Playlist bookmark 8--bookmark9 <string>       Playlist bookmark 9--bookmark10 <string>      Playlist bookmark 10-h, --help, --no-help          print help for VLC (can be combined with --advanced and --help-verbose)(default disabled)-H, --full-help, --no-full-helpExhaustive help for VLC and its modules(default disabled)--longhelp, --no-longhelp  print help for VLC and all its modules (can be combined with --advanced and --help-verbose)(default disabled)--help-verbose, --no-help-verboseask for extra verbosity when displaying help(default disabled)-l, --list, --no-list          print a list of available modules(default disabled)--list-verbose, --no-list-verboseprint a list of available modules with extra detail(default disabled)-p, --module <string>          print help on a specific module (can be combined with --advanced and --help-verbose). Prefix the module name with = for strict matches.--ignore-config, --no-ignore-configno configuration option will be loaded nor saved to config file(default enabled)--reset-config, --no-reset-configreset the current config to the default values(default disabled)--reset-plugins-cache, --no-reset-plugins-cacheresets the current plugins cache(default disabled)--version, --no-version    print version information(default disabled)--config <string>          use alternate config fileNote: add --advanced to your command line to see advanced options.To get exhaustive help, use '-H'.

3. 实测

注:链接视频是一个合集,有Rpanion/libcamera_ivd等视频,可以点开来看下效果。

总的来说:Rpi3B+ OV5647 CSI摄像模组,在640x480 @ 30/50FPS下实时的效果还是可以的。目前该摄像头驱动好像并不支持720P,所以高清的时候,会很卡顿。

$ libcamera-vid --codec h264 --profile main --level 4 --framerate 30 --width 1920 --height 1080 -t 0 --inline -o - | cvlc stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/stream1}' :demux=h264

  • OV5647_libcamera_cvlc_1920x1080x30FPS

OV5647-1920x1080x30FPS

4. 参考资料

【1】Raspbian安装云台
【2】Raspbian安装摄像头
【3】Raspbian镜像无头烧录

相关文章:

Raspbian简易RTSP服务

Raspbian简易RTSP服务 1. 源由2. 搭建简易RTSP服务器2.1 系统安装2.2 软件安装2.3 命令介绍2.3.1 libcamera-hello2.3.2 libcamera-vid2.3.3 cvlc 3. 实测4. 参考资料 1. 源由 鉴于前期的一些准备工作&#xff1a; 《ArduPilot开源飞控之Companion Computers简单分析》《Ardu…...

【ASP.NET 6 Web Api 全栈开发实战】--前言

《ASP.NET 6 Web Api 实战》专栏通过一步一步的开发并完善一个记账软件项目&#xff0c;来引导大家学习相关的知识&#xff0c;其中的知识包括但不限于如下内容&#xff1a; Web Api 开发.NET 6 项目微服务架构的搭建身份认证移动端应用开发more。。。 专栏结构 专栏分为单体…...

跳过mysql8.0密码重置密码 Shell脚本

要在 MySQL 8.0 中通过 Shell 脚本跳过密码验证以重置密码&#xff0c;你可以遵循以下步骤&#xff1a;首先&#xff0c;确保你有足够的权限来编辑配置文件和重启 MySQL 服务。下面是一个简单的 Shell 脚本示例&#xff0c;该脚本展示了如何跳过密码验证以重置 MySQL 8.0 的 ro…...

Maven之安装自定义jar到本地Maven仓库中

Maven之安装自定义jar到本地Maven仓库中 文章目录 Maven之安装自定义jar到本地Maven仓库中1. 命令行窗口安装方式1. 常用参数说明2. 安装实例 2. IDEA中安装方式3. 使用 1. 命令行窗口安装方式 安装指定文件到本地仓库命令&#xff1a;mvn install:install-file; 在windows的cm…...

SPI控制8_8点阵屏

协议与硬件概述 SPI SPI是串行外设接口&#xff08;Serial Peripheral Interface&#xff09;的缩写。是一种高速的&#xff08;10Mbps&#xff09;的&#xff0c;全双工&#xff0c;同步的通信总线&#xff0c;并且在芯片的管脚上只占用四根线。 引脚介绍 SCLK&#xff1a;…...

2.10

头文件&#xff1a; #include <sqlite3.h> 编译时候要加上-lsqlite3 gcc a.c -lsqlite3 1&#xff09;sqlite3_open 打开一个数据库&#xff0c;如果数据库不存在&#xff0c;则创建一个数据库 2&#xff09;sqlite3_close 关闭数据库&#xff0c;断开句柄所拥有的资…...

计算机服务器中了360后缀勒索病毒怎么办?360后缀勒索病毒处理流程

网络技术的不断应用与发展&#xff0c;为企业的生产运营提供了有利保障&#xff0c;越来越多的企业走向数字化办公模式&#xff0c;并且企业的发展离不开数据支撑&#xff0c;重视数据安全成为了众多企业关心的主要话题。春节前后&#xff0c;云天数据恢复中心接到很多企业的求…...

BigDecimal的常用API

BigDecimal用于解决浮点型运算时结果出现失真的问题。 这里0.20.1等于0.3就出现了失真 import java.math.BigDecimal; import java.math.RoundingMode;public class Test {public static void main(String[] args) {//BigDeciaml的使用&#xff1a;解决小数运算失真的问题doub…...

Android---Jetpack Compose学习005

动画 1. 简单值动画 示例&#xff1a;背景颜色在紫色和绿色之间&#xff0c;以动画形式切换。使用 animateColorAsState() val backgroundColor by animateColorAsState(if (tabPage TabPage.Home) Purple100 else Green300) 该句代码中&#xff0c;有一个 backgroundColo…...

安卓价值1-如何在电脑上运行ADB

ADB&#xff08;Android Debug Bridge&#xff09;是Android平台的调试工具&#xff0c;它是一个命令行工具&#xff0c;用于与连接到计算机的Android设备进行通信和控制。ADB提供了一系列命令&#xff0c;允许开发人员执行各种操作&#xff0c;包括但不限于&#xff1a; 1. 安…...

第三百四十七回

文章目录 1. 概念介绍2. 原理与方法2.1 知识对比2.2 使用方法 3. 示例代码4. 内容总结 我们在上一章回中介绍了"加密包crypto"相关的内容&#xff0c;本章回中将介绍characters包.闲话休提&#xff0c;让我们一起Talk Flutter吧。 1. 概念介绍 在项目中会遇到获取字…...

23种设计模式之原型模式

目录 什么是原型模式 为什么使用原型模式 原型模式的基本结构 原型模式的实现步骤 实现代码&#xff08;含注释&#xff09; 使用场景 什么是原型模式 原型模式是一种创建型设计模式&#xff0c;该模式的核心思想是基于现有的对象创建新的对象&#xff0c;而不是从头开…...

揭秘Angular世界的奥秘:全面提升你的前端开发技能!

介绍&#xff1a;Angular是一个由Google维护的开源JavaScript框架&#xff0c;专为构建Web应用程序而设计&#xff0c;特别适合开发大型单页应用&#xff08;SPA&#xff09;。以下是对Angular的详细介绍&#xff1a; 技术栈&#xff1a;Angular使用HTML作为模板语言&#xff0…...

【开源】SpringBoot框架开发企业项目合同信息系统

目录 一、摘要1.1 项目介绍1.2 项目录屏 二、功能模块2.1 数据中心模块2.2 合同审批模块2.3 合同签订模块2.4 合同预警模块2.5 数据可视化模块 三、系统设计3.1 用例设计3.2 数据库设计3.2.1 合同审批表3.2.2 合同签订表3.2.3 合同预警表 四、系统展示五、核心代码5.1 查询合同…...

高斯伪谱C++封装库开源!

Windows x64/86 C无依赖运行高斯伪谱法求解最优控制问题&#xff0c;你只需要ElegantGP! Author: Y. F. Zhang His Github: https://github.com/ZYunfeii 写在前面 这个库在你下载它的那一时刻起不再依赖任何其他代码&#xff0c;直接可用来构建C的最优控制问题并进行求解。…...

Spring + Tomcat项目中nacos配置中文乱码问题解决

实际工作的时候碰到了nacos中文乱码的问题&#xff0c;一顿排查最终还是调源码解决了。下面为具体的源码流程&#xff0c;有碰到的可以参考下。 对于nacos配置来说&#xff0c;初始主要源码就在NacosConfigService类中。里面有初始化获取配置content以及设置对应监听器的操作。…...

Unity SRP 管线【第十讲:SRP/URP 图形API】

Unity 封装的图形API 文章目录 Unity 封装的图形API一、 CommandBuffer 要执行的图形命令列表1. CommandBuffer 属性2. CommandBuffer 常用图形API&#xff08;方法&#xff09;(1)设置(2)获取临时纹理 GetTemporaryRT以及释放(3)设置纹理为渲染目标 SetRenderTarget(4)Command…...

使用playwright进行自动化端到端测试

项目希望能接入自动化端到端测试提高可靠性&#xff0c;发现微软的 playwright 还挺好用的&#xff0c;推荐一下&#xff0c;顺便说下遇到的一些难点以及最佳实践。 难点 登录 项目不能帐号密码登录&#xff0c;只能扫二维码 临时方案是先自己扫码保存 cookie 用于测试&#…...

ES实战-相关性搜索

ES打分机制 1.TF-IDF 词频-逆文档频率 2.Okapi BM25 3.随机性分歧- DFR相似度 4.基于信息 - IB相似度 5.LM Dirichlet 相似度 6.LM Jelinek Mercer相似度 解释一个查询的结果集 curl -XPOST localhost:9200/get-together/_search?pretty -H Content-Type: application/json -…...

MQTT的学习与应用

文章目录 一、什么是MQTT二、MQTT协议特点三、MQTT应用领域四、安装Mosquitto五、如何学习 MQTT 一、什么是MQTT MQTT&#xff08;Message Queuing Telemetry Transport&#xff09;是一种轻量级的消息传输协议&#xff0c;设计用于在低带宽、不稳定的网络环境中进行高效的通信…...

前端倒计时误差!

提示:记录工作中遇到的需求及解决办法 文章目录 前言一、误差从何而来?二、五大解决方案1. 动态校准法(基础版)2. Web Worker 计时3. 服务器时间同步4. Performance API 高精度计时5. 页面可见性API优化三、生产环境最佳实践四、终极解决方案架构前言 前几天听说公司某个项…...

使用分级同态加密防御梯度泄漏

抽象 联邦学习 &#xff08;FL&#xff09; 支持跨分布式客户端进行协作模型训练&#xff0c;而无需共享原始数据&#xff0c;这使其成为在互联和自动驾驶汽车 &#xff08;CAV&#xff09; 等领域保护隐私的机器学习的一种很有前途的方法。然而&#xff0c;最近的研究表明&…...

postgresql|数据库|只读用户的创建和删除(备忘)

CREATE USER read_only WITH PASSWORD 密码 -- 连接到xxx数据库 \c xxx -- 授予对xxx数据库的只读权限 GRANT CONNECT ON DATABASE xxx TO read_only; GRANT USAGE ON SCHEMA public TO read_only; GRANT SELECT ON ALL TABLES IN SCHEMA public TO read_only; GRANT EXECUTE O…...

Qt Http Server模块功能及架构

Qt Http Server 是 Qt 6.0 中引入的一个新模块&#xff0c;它提供了一个轻量级的 HTTP 服务器实现&#xff0c;主要用于构建基于 HTTP 的应用程序和服务。 功能介绍&#xff1a; 主要功能 HTTP服务器功能&#xff1a; 支持 HTTP/1.1 协议 简单的请求/响应处理模型 支持 GET…...

css的定位(position)详解:相对定位 绝对定位 固定定位

在 CSS 中&#xff0c;元素的定位通过 position 属性控制&#xff0c;共有 5 种定位模式&#xff1a;static&#xff08;静态定位&#xff09;、relative&#xff08;相对定位&#xff09;、absolute&#xff08;绝对定位&#xff09;、fixed&#xff08;固定定位&#xff09;和…...

EtherNet/IP转DeviceNet协议网关详解

一&#xff0c;设备主要功能 疆鸿智能JH-DVN-EIP本产品是自主研发的一款EtherNet/IP从站功能的通讯网关。该产品主要功能是连接DeviceNet总线和EtherNet/IP网络&#xff0c;本网关连接到EtherNet/IP总线中做为从站使用&#xff0c;连接到DeviceNet总线中做为从站使用。 在自动…...

安宝特案例丨Vuzix AR智能眼镜集成专业软件,助力卢森堡医院药房转型,赢得辉瑞创新奖

在Vuzix M400 AR智能眼镜的助力下&#xff0c;卢森堡罗伯特舒曼医院&#xff08;the Robert Schuman Hospitals, HRS&#xff09;凭借在无菌制剂生产流程中引入增强现实技术&#xff08;AR&#xff09;创新项目&#xff0c;荣获了2024年6月7日由卢森堡医院药剂师协会&#xff0…...

计算机基础知识解析:从应用到架构的全面拆解

目录 前言 1、 计算机的应用领域&#xff1a;无处不在的数字助手 2、 计算机的进化史&#xff1a;从算盘到量子计算 3、计算机的分类&#xff1a;不止 “台式机和笔记本” 4、计算机的组件&#xff1a;硬件与软件的协同 4.1 硬件&#xff1a;五大核心部件 4.2 软件&#…...

深度学习之模型压缩三驾马车:模型剪枝、模型量化、知识蒸馏

一、引言 在深度学习中&#xff0c;我们训练出的神经网络往往非常庞大&#xff08;比如像 ResNet、YOLOv8、Vision Transformer&#xff09;&#xff0c;虽然精度很高&#xff0c;但“太重”了&#xff0c;运行起来很慢&#xff0c;占用内存大&#xff0c;不适合部署到手机、摄…...

Xela矩阵三轴触觉传感器的工作原理解析与应用场景

Xela矩阵三轴触觉传感器通过先进技术模拟人类触觉感知&#xff0c;帮助设备实现精确的力测量与位移监测。其核心功能基于磁性三维力测量与空间位移测量&#xff0c;能够捕捉多维触觉信息。该传感器的设计不仅提升了触觉感知的精度&#xff0c;还为机器人、医疗设备和制造业的智…...