# JpegRtspCamera - RTSP server streaming MJPEG video from PC camera
###A server side demo project, using live555 and OpenCV library.
This project was originally written in 2015, making a basic framework for an intelligent camera running on Linux, developed and debugged first in Visual Studio 2013, then transferred to Linux. Haven't tested the Linux version yet but will test it later and make build files also for Linux. At least I updated the project files to Visual Studio 2015 and verified if everything works.
It is quite hard to start with any similar project as there are very few resources on the internet about it. So I decided to make this project available on GitHub to help other developers with quick start on a similar project.
You will need to download OpenCV library, preferably 2.4.13 and unpack it. The installer is available [here](https://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.13/opencv-2.4.13.exe/download). On my installation I unpacked it into folder "D:\OpenCV2.4.13" so if you will unpack somewhere else you'll need to update the project settings in Visual Studio (include and library paths). The project should work with any 2.4 OpenCV version, at least I used it with 2.4.9, 2.4.10 and 2.4.10 in the past without problems. I am not sure if it will work with OpenCV 3.0.X version or newer, but you can try and tell me.
OpenCV is used here as an image processing library. It's possible to use something else in your project for grabbing a video stream, some USB (or other) cameras will support jpeg and H.264 directly so maybe you can grab it using DirectShow (on Windows) or V4L2 (on Linux). Here the goal of the project is different, you can grab a raw image, do some manipulation (transformation, put a text or logo, etc.) on it with OpenCV, then compress with image encoder and send this out to the RTSP part. But if you need just to broadcast image directly without modification then DirectShow/V4L2 is a good option which will save you CPU time.
Other library used here is live555, known library for RTSP. Live555 is also used in VLC. You don't need to download as this is part of the project directly with source code.
After installing OpenCV you can compile the project and everything should work. Make sure you have a working camera device on your system, otherwise the program will fail. The program takes on parameter where you specify the frame rate (in units of frames per second).
```
JpegRtspCamera.exe <fps>
```
Currently the resolution for video is 640x480 but you can change it to something else (at least from the values which are supported by the camera or library).If the frames are too big make sure you will allocate bigger buffer in the source code (CameraJPEGDeviceSource.cpp, MAX_SIZE, currently 256kB).
### Testing
Run the program with desired frame rate. After starting it will print the current RTSP url, for example:
```
rtsp://192.168.1.1/jpeg
```
. You can open this URL in VLC, using Media, Open Network Stream... from the main menu. Enter url, press play. You can open more VLC clients, I tested it with 5 player session and it worked without problem.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
简易rtsp流媒体服务,实现了系列图片转为rtsp视频流,支持多路并发 (559个子文件)
config.macosx-before-version-10.4 422B
config.aix 433B
config.alpha 429B
config.armeb-uclibc 700B
config.armlinux 556B
config.avr32-linux 691B
config.bfin-linux-uclibc 653B
config.bfin-uclinux 651B
win32config.Borland 1KB
config.bsplinux 713B
inet.c 14KB
rtcp_from_spec.c 10KB
genWindowsMakefiles.cmd 857B
configure 377B
COPYING 24KB
COPYING 24KB
COPYING 24KB
COPYING 24KB
COPYING 24KB
COPYING 24KB
COPYING 24KB
COPYING 24KB
MP3InternalsHuffmanTable.cpp 108KB
RTSPServer.cpp 92KB
QuickTimeFileSink.cpp 80KB
RTSPClient.cpp 77KB
playCommon.cpp 52KB
MediaSession.cpp 51KB
MatroskaFileParser.cpp 51KB
H264or5VideoStreamFramer.cpp 45KB
RTCP.cpp 39KB
ProxyServerMediaSession.cpp 38KB
OggFileParser.cpp 37KB
H263plusVideoStreamParser.cpp 35KB
MatroskaFile.cpp 33KB
SIPClient.cpp 30KB
MP3InternalsHuffman.cpp 28KB
AVIFileSink.cpp 27KB
MP3Internals.cpp 26KB
GroupsockHelper.cpp 26KB
AMRAudioRTPSource.cpp 25KB
MPEG1or2Demux.cpp 25KB
MPEG2IndexFromTransportStream.cpp 24KB
RTPInterface.cpp 24KB
MPEG4VideoStreamFramer.cpp 23KB
OnDemandServerMediaSubsession.cpp 23KB
testRTSPClient.cpp 22KB
MultiFramedRTPSource.cpp 21KB
MP3ADU.cpp 20KB
Groupsock.cpp 19KB
MPEG2TransportStreamMultiplexor.cpp 18KB
testOnDemandRTSPServer.cpp 17KB
MP3ADUinterleaving.cpp 16KB
JPEGVideoRTPSource.cpp 16KB
QCELPAudioRTPSource.cpp 16KB
MultiFramedRTPSink.cpp 16KB
WindowsAudioInputDevice_mixer.cpp 16KB
MPEG1or2VideoStreamFramer.cpp 15KB
ServerMediaSession.cpp 15KB
uLawAudioFilter.cpp 14KB
StreamReplicator.cpp 14KB
MPEG2TransportFileServerMediaSubsession.cpp 14KB
MP3StreamState.cpp 13KB
CameraJPEGDeviceSource.cpp 13KB
RTPSource.cpp 13KB
RTSPCommon.cpp 13KB
DarwinInjector.cpp 12KB
WAVAudioFileSource.cpp 12KB
RTPSink.cpp 12KB
MPEG2TransportStreamIndexFile.cpp 12KB
H264or5VideoRTPSink.cpp 12KB
OggFileSink.cpp 11KB
RTSPServerSupportingHTTPStreaming.cpp 11KB
CameraThread.cpp 11KB
ourMD5.cpp 11KB
MPEG2TransportStreamFramer.cpp 11KB
MPEG2TransportStreamTrickModeFilter.cpp 11KB
VorbisAudioRTPSink.cpp 11KB
WindowsAudioInputDevice_common.cpp 11KB
OggFile.cpp 11KB
AC3AudioStreamFramer.cpp 10KB
DynamicRTSPServer.cpp 10KB
BasicTaskScheduler.cpp 10KB
testWAVAudioStreamer.cpp 10KB
vobStreamer.cpp 10KB
MJPEGVideoSource.cpp 10KB
QuickTimeGenericRTPSource.cpp 10KB
DVVideoStreamFramer.cpp 9KB
MPEG2TransportStreamFromESSource.cpp 9KB
MPEG1or2FileServerDemux.cpp 9KB
MPEG4VideoStreamDiscreteFramer.cpp 9KB
JpegFrameParser.cpp 9KB
NetAddress.cpp 9KB
WAVAudioFileServerMediaSubsession.cpp 8KB
PassiveServerMediaSubsession.cpp 8KB
MPEG1or2VideoStreamDiscreteFramer.cpp 8KB
live555ProxyServer.cpp 8KB
MPEG4LATMAudioRTPSource.cpp 8KB
MPEG4GenericRTPSource.cpp 8KB
BasicHashTable.cpp 7KB
共 559 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
- 回眸y笑2019-09-02下载后用不了
- nfteamo2018-12-11根本用不了,什么乱七八糟的
- 萧萧落木知秋2022-12-06既然想分享,又加密说明文档,搞啥呢? #毫无价值
- guogenbf2019-11-20实现了RTSP视频流。
yangang1899
- 粉丝: 4
- 资源: 24
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功