Skip to content

ondevnull/RTSP-Streaming.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTSP Streaming.js

This package uses FFmpeg to convert a RTSP streaming to a stale JPEG image and with JavaScript this file is read at a frequency and sent through Socket.IO to the client so it read the <img> tag in the HTML as a <video> without needing a state-of-the-art browser.

Thanks to Socket.IO cross-browser and cross-platform compatibility this can be used even for mobile clients.

How to install?

Install Node.JS and NPM: # aptitude install nodejs npm

Then, install Socket.IO with NPM: # npm install socket.io

This package requires FFmpeg, but Debian ships FFmpeg's fork Libav, so you should follow instructions on http://github.com/ghostbar/FFmpeg.deb, normally it should be: $ git clone git://github.com/ghostbar/FFmpeg.deb.git $ cd FFmpeg.deb/ $ git checkout -t -b pristine-tar origin/pristine-tar $ git checkout -t -b upstream origin/upstream $ git checkout master $ git fetch --tags # aptitude install build-essential git-buildpackage libasound2-dev libbz2-dev libdc1394-22-dev libdirac-dev libfreetype6-dev libgsm1-dev libimlib2-dev libjack-dev libmp3lame-dev libopenjpeg-dev libraw1394-dev librtmp-dev libschroedinger-dev libsdl1.2-dev libspeex-dev libtheora-dev libtiff4-dev libva-dev libvdpau-dev libvorbis-dev libvpx-dev libx11-dev libx264-dev libxext-dev libxfixes-dev libxvidcore-dev libxvmc-dev texi2html yasm zlib1g-dev $ DEB_BUILD_OPTIONS=parallel=4 git-buildpackage

In DEB_BUILD_OPTIONS change 4 for the number of processors the system where you're compiling has, so it builds the package faster.

If you are using Debian testing instead of unstable then you should skip the last step and do the following: $ git checkout -t -b testing origin/testing $ git-buildpackage --git-debian-branch=testing

Alternatively, you can use dpkg-checkbuilddeps from devscripts debian package to check which build-dependencies are missing from your system, our just use a building chroot system like pbuilder or cowbuilder which should suffice the build-dependencies alone without filling your system with development libraries you may never need anymore.

After the building completes, you will have a lot of files on ../, you should install most of the files with a .deb extension, except the ones with source, dbg and dev on it's name.

How to use?

You need ffmpeg installed;

Run node server/server.js it will fire the web client on port 8081.

Sources at listed from line 141 on server/server.js and those are streamed to websockets. on channels 001, 002, 003, 004.

Author, Copyright & License

© 2011, Jose Luis Rivas <joseluis@eserre.com>, All Right Reserved.

This software is licensed under the MIT license.

Copyright © 2011 Jose Luis Rivas

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.