現今風行的『手機直播』,或可說是移動式『網路攝影機』耶?
Webcam
Typical low-cost webcam used with many personal computers
A webcam is a video camera that feeds or streams its image in real time to or through a computer to a computer network. When “captured” by the computer, the video stream may be saved, viewed or sent on to other networks travelling through systems such as the internet, and e-mailed as an attachment. When sent to a remote location, the video stream may be saved, viewed or on sent there. Unlike an IP camera (which connects using Ethernet orWi-Fi), a webcam is generally connected by a USB cable, or similar cable, or built into computer hardware, such as laptops.
The term “webcam” (a clipped compound) may also be used in its original sense of a video camera connected to the Web continuously for an indefinite time, rather than for a particular session, generally supplying a view for anyone who visits its web page over the Internet. Some of them, for example, those used as online traffic cameras, are expensive, rugged professional video cameras.
隨著科技快速發展之腳步, RTSP
Network Working Group H. Schulzrinne
Request for Comments: 2326 Columbia U.
Category: Standards Track A. Rao
Netscape
R. Lanphier
RealNetworks
April 1998
Real Time Streaming Protocol (RTSP)
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the “Internet
Official Protocol Standards” (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (1998). All Rights Reserved.
Abstract
The Real Time Streaming Protocol, or RTSP, is an application-level
protocol for control over the delivery of data with real-time
properties. RTSP provides an extensible framework to enable
controlled, on-demand delivery of real-time data, such as audio and
video. Sources of data can include both live data feeds and stored
clips. This protocol is intended to control multiple data delivery
sessions, provide a means for choosing delivery channels such as UDP,
multicast UDP and TCP, and provide a means for choosing delivery
mechanisms based upon RTP (RFC 1889).
V4L2 Full HD h264 串流,已然在樹莓派上實現也☆
/v4l2rtspserver
Setup on Pi
setup ====== Ref: http://c.wensheng.org/2017/05/18/stream-from-raspberrypi/ sudo apt-get install cmake liblog4cpp5-dev libv4l-dev wget www.live555.com/liveMedia/public/live555-latest.tar.gz tar xfz live555-latest.tar.gz cd live/ ./genMakefiles linux make CPPFLAGS=-DALLOW_RTSP_SERVER_PORT_REUSE=1 sudo make install cd git clone https://github.com/mpromonet/v4l2rtspserver.git cd v4l2rtspserver/ cmake . make sudo make install
Usage: ======= v4l2rtspserver -F15 -H 972 -W1296 -P 8555 /dev/video0
※ 註︰
此處直接引用 v4l2rtspserver 作者 Michel Promonet 先生文本。
且看
pi@raspberrypi:~ sudo modprobe bcm2835-v4l2 pi@raspberrypi:~ $ v4l2rtspserver -F30 -H 1080 -W 1920 -P 8555 /dev/video0 2018-12-08 15:45:46,873 [NOTICE] - /home/pi/v4l2rtspserver/src/main.cpp:623 Create V4L2 Source.../dev/video0 [NOTICE] src/V4l2Device.cpp:117 driver:bm2835 mmal capabilities:85200005 mandatory:4000001 [NOTICE] src/V4l2Device.cpp:120 /dev/video0 support capture [NOTICE] src/V4l2Device.cpp:122 /dev/video0 support read/write [NOTICE] src/V4l2Device.cpp:123 /dev/video0 support streaming [NOTICE] src/V4l2Device.cpp:147 /dev/video0:JPEG size:1024x768 [NOTICE] src/V4l2Device.cpp:208 /dev/video0:H264 size:1920x1080 bufferSize:2088960 [NOTICE] src/V4l2Device.cpp:229 fps:1/30 [NOTICE] src/V4l2Device.cpp:230 nbBuffer:1 [NOTICE] src/V4l2MmapDevice.cpp:71 2018-12-08 15:45:47,507 [NOTICE] - /home/pi/v4l2rtspserver/src/main.cpp:646 Create Source .../dev/video0 2018-12-08 15:45:47,507 [NOTICE] - /home/pi/v4l2rtspserver/src/main.cpp:165 Play this stream using the URL "rtsp://192.168.11.12:8555/unicast" 2018-12-08 15:45:47,507 [NOTICE] - /home/pi/v4l2rtspserver/src/DeviceSource.cpp:93 begin thread
3A+ 彷彿不費吹灰之力哩☺
影像清晰可期矣!?
難到不想更上一層樓乎?!
LIVE555 Streaming Media
This code forms a set of C++ libraries for multimedia streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). These libraries – which can be compiled for Unix (including Linux and Mac OS X), Windows, and QNX (and other POSIX-compliant systems) – can be used to build streaming applications. The libraries are already being used to implement applications such as the “LIVE555 Media Server” and “LIVE555 Proxy Server” (RTSP server applications), and “vobStreamer” (for streaming DVD content using RTP/RTCP/RTSP). The libraries can also be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or JPEG video, and several audio codecs. They can easily be extended to support additional (audio and/or video) codecs, and can also be used to build basic RTSP or SIP clients and servers, and have been used to add streaming support to existing media player applications, such as “VLC” and “MPlayer“. (For some specific examples of how these libraries can be used, see the test programs below.)
Source code
The project source code is available – as a “.tar.gz” file – here. See below for instructions on how to build it.
(Note: To use this software, you must be aware of how it is licensed, and your obligations under this license.)
Mailing list
There is a developers’ mailing list: “live-devel@lists.live555.com”. Users (or prospective users) of the libraries are encouraged to join this (low-volume) mailing list, and/or to review the mailing list’s archives. (You can also search these archives using Google, by adding “site:lists.live555.com” to your search query.)Before posting to the mailing list for the first time, please read the FAQ, to check if your question has already been answered.
Support
The primary means of support for these libraries is the “live-devel@lists.live555.com” mailing list described above. (Note that you must first subscribe to the mailing list before you can post to it.)
Are you planning to implement RTP (and/or RTSP)? Instead of writing your own implementation from scratch, consider using these libraries. They have already been used in many real-world RTP-based applications, and are well-suited for use within embedded systems. The code includes an implementation of RTCP, and can easily be extended (via subclassing) to support new RTP payload types.