有興趣寫程式之人,還是需要親自動手作呦☆
這裡列出 github 上的兩個派生三 python3 參考︰
/pysdk-live
rtsp-server for python, dependecy live555
pysdk-live
rtsp server based on live555 in python3
dependecy
sudo apt-get install liblivemedia-dev sudo apt-get install libasound2-dev sudo apt-get install liblog4cpp5-dev
refer to
https://github.com/mpromonet/v4l2rtspserver
https://github.com/yxteagle/pysdk-uvc
───
/pysdk-uvc
cam for python
pysdk-uvc
Linux摄像头UVC驱动的Python3封装
dependecy
sudo apt-get installlibv4l-dev
容易安裝︰
python3 setup.py build
sudo python3 setup.py install
略作修改︰
pi@raspberrypi:~/pysdk-live/tests python3 tests.py Start capture: /dev/video0 PYUVC version: 0.3 frame size: 1280*720 frame rate: 30 fmt type: 875967048 Driver: "bm2835 mmal" Card: "mmal service 16.1" Bus: "platform:bcm2835-v4l2" Version: 1.0 Capabilities: 85200005 Input: 0 V4L2 pixel formats: 0: [0x32315559] 'YU12' (Planar YUV 4:2:0) 1: [0x56595559] 'YUYV' (YUYV 4:2:2) 2: [0x33424752] 'RGB3' (24-bit RGB 8-8-8) 3: [0x4745504A] 'JPEG' (JFIF JPEG) 4: [0x34363248] 'H264' (H.264) 5: [0x47504A4D] 'MJPG' (Motion-JPEG) 6: [0x55595659] 'YVYU' (YVYU 4:2:2) 7: [0x59555956] 'VYUY' (VYUY 4:2:2) 8: [0x59565955] 'UYVY' (UYVY 4:2:2) 9: [0x3231564E] 'NV12' (Y/CbCr 4:2:0) 10: [0x33524742] 'BGR3' (24-bit BGR 8-8-8) 11: [0x32315659] 'YV12' (Planar YVU 4:2:0) 12: [0x3132564E] 'NV21' (Y/CrCb 4:2:0) 13: [0x34524742] 'BGR4' (32-bit BGRA/X 8-8-8-8) PYLIVE version: 0.3 unicast url: unicast Number of frame queue(queueSize): 10 rtspPort: 8554 rtspOverHTTPPort: 0 verbose(0,1,2): 0 RTCP expiration timeout in seconds(timeout): 65 repeat config before IDR frame(repeatConfig): 1 audioFreq: 44100 audioNbChannels: 2 audioFmt(default S16_BE): 2018-12-09 17:57:46,166 [NOTICE] - pylive/LibLive.cpp:229 Create ALSA Source...default 2018-12-09 17:57:46,166 [NOTICE] - pylive/DeviceSource.cpp:63 begin thread 2018-12-09 17:57:46,166 [NOTICE] - pylive/ALSACapture.cpp:27 Open ALSA device: "default" 2018-12-09 17:57:46,166 [NOTICE] - pylive/H264_V4l2DeviceSource.cpp:48 profile-level-id=640028;sprop-parameter-sets=J2QAKKwrQCgC3QDxImo=,KO4CXLA= 2018-12-09 17:57:46,177 [ERROR ] - pylive/ALSACapture.cpp:34 cannot open audio device: default error:No such file or directory 2018-12-09 17:57:46,177 [NOTICE] - pylive/ALSACapture.cpp:83 ALSA device: "default" buffer_size:0 period_size:0 rate:44100 2018-12-09 17:57:46,177 [NOTICE] - pylive/LibLive.cpp:98 Play this stream using the URL "rtsp://192.168.11.12:8554/unicast" RTCPInstance::RTCPInstance error: totSessionBW parameter should not be zero! 2018-12-09 18:01:17,861 [NOTICE] - pylive/DeviceSource.cpp:110 V4L2DeviceSource::doStopGettingFrames 2018-12-09 18:01:17,861 [NOTICE] - pylive/DeviceSource.cpp:110 V4L2DeviceSource::doStopGettingFrames
可以判讀結果乎◎