Difference between revisions of "Crtmpserver"
From Alessandro's Wiki
Line 3: | Line 3: | ||
= going ''"on-air"'' = | = going ''"on-air"'' = | ||
== Mac gui == | == Mac/Win gui == | ||
* FMLE (Flash Media Live Encoder) http://www.adobe.com/products/flash-media-encoder.html | |||
* Wirecast http://www.telestream.net/wire-cast/ | |||
== Linux gui == | == Linux gui == | ||
== old-style command line == | == old-style command line == | ||
Line 47: | Line 51: | ||
== Linux == | == Linux == | ||
* on CentOS: http://wiki.rtmpd.com/tutorial_full_centos_build | |||
* I choose '''/opt/crtmpserver''' as source directory | * I choose '''/opt/crtmpserver''' as source directory |
Revision as of 09:35, 2 June 2012
going "on-air"
Mac/Win gui
- FMLE (Flash Media Live Encoder) http://www.adobe.com/products/flash-media-encoder.html
- Wirecast http://www.telestream.net/wire-cast/
Linux gui
old-style command line
-f mpegts udp://127.0.0.1:10000?pkt_size=1316 -f flv rtmp://127.0.0.1/live/myStream
ffmpeg -i /home/mediacluster/mediaroot/video/269_5.mp4 -re -vcodec flv -b:v 500k -s 320x200 -strict experimental -g 25 -me_method zero -acodec aac -ab 128k -ar 48000 -ac 2 -f flv "rtmp://127.0.0.1/live/video_stream1"
The format of the RTMP URL portion is:
Code:
rtmp://[wowza-ip-address]/[application]/[streamName]
- Mplayer/Mencoder
video_stream1
mencoder -tv driver=v4l2:device=/dev/video$DEV:fps=30000/1001:chanlist=us-bcast:\ audiorate=32000:adevice=/dev/dsp$DEV:input=0:amode=1:normid=4:width=512:height=384 \ -ovc x264 -x264encopts threads=2:bitrate=800:subq=2:me=2:frameref=4:8x8dct \ -oac mp3lame -lameopts cbr:br=96 -endpos $TIM -o $DIR/$FIL.avi tv:// > /dev/null
- ffmpeg
Capture from composite or S-video
ffmpeg -async 12 -vd /dev/video -ad /dev/dsp -f avi -r 25 -s 720x576 -croptop 8 -cropbottom 8 -cropleft 8 \ -cropright 8 -sameq -aspect 4:3 -acodec mp2 -ac 2 -ab 224k -ar 48000 -y -t 04:30:00 outfile.avi
ffmpeg -threads 2 -vd /dev/video$DEV -r 29.97 -b 800 -s 640x480 -vcodec h264 -qmax 51 \ -me epzs -deinterlace -g 300 -async 1 -ac 2 -acodec mp3 -ab 96 -ar 32000 \ -ad /dev/dsp$DEV -t $TIM -f avi -y $DIR/$FIL.avi
installation
Linux
* on CentOS: http://wiki.rtmpd.com/tutorial_full_centos_build
- I choose /opt/crtmpserver as source directory
svn co --username anonymous https://svn.rtmpd.com/crtmpserver/branches/1.0 crtmpserver
- do compile the source specifying the prefix you want, /usr/local is a good choice to keep the file-system under control, but remember to check the $PATH variable afterwards:
cd builders/cmake cmake -DCRTMPSERVER_INSTALL_PREFIX=/usr/local . make install
- now let's go in /usr/local/etc/ and use crtmpserver.lua.sample to generate your crtmpserver.lua changing the rootDirectory=" variable in applications= { /usr/local/lib/crtmpserver/applications
- install the certificates:
cp /usr/src/crtmpserver-690/builders/cmake/applications/appselector/server.* /usr/local/lib/crtmpserver/applications/appselector/
- link your own media directory (in this case I'm linking the Videos directory located in my home) to the player application media foder:
ln -s ~/Videos /usr/local/lib/crtmpserver/applications/flvplayback/mediaFolder cp /usr/src/crtmpserver-690/builders/cmake/applications/flvplayback/users.lua /usr/local/lib/crtmpserver/applications/flvplayback/
- it should be possible now to execute the compiled and configured program
configuration
- /opt/crtpmserver/configs
all.debug.lua flvplayback.lua run.bat run.sh users.lua
apps
- flash streamer application
/opt/crtpmserver/configs/flvplayback.lua
applications
- application files:
/usr/local/lib64/crtmpserver/applications/admin /usr/local/lib64/crtmpserver/applications/applestreamingclient /usr/local/lib64/crtmpserver/applications/appselector /usr/local/lib64/crtmpserver/applications/flvplayback /usr/local/lib64/crtmpserver/applications/proxypublish /usr/local/lib64/crtmpserver/applications/samplefactory /usr/local/lib64/crtmpserver/applications/stresstest /usr/local/lib64/crtmpserver/applications/vptests /usr/local/lib64/crtmpserver/applications/admin/libadmin.so /usr/local/lib64/crtmpserver/applications/applestreamingclient/libapplestreamingclient.so /usr/local/lib64/crtmpserver/applications/appselector/libappselector.so /usr/local/lib64/crtmpserver/applications/appselector/server.crt /usr/local/lib64/crtmpserver/applications/appselector/server.key /usr/local/lib64/crtmpserver/applications/flvplayback/libflvplayback.so /usr/local/lib64/crtmpserver/applications/flvplayback/mediaFolder /usr/local/lib64/crtmpserver/applications/flvplayback/users.lua /usr/local/lib64/crtmpserver/applications/proxypublish/libproxypublish.so /usr/local/lib64/crtmpserver/applications/samplefactory/libsamplefactory.so /usr/local/lib64/crtmpserver/applications/stresstest/libstresstest.so /usr/local/lib64/crtmpserver/applications/vptests/libvptests.so
references
- installing on Gentoo
http://foxpa.ws/2011/10/26/installing-c-rtmp-server-rtmpd-crtmpdserver-on-gentoo/
- using it
http://wiki.rtmpd.com/tutorial_live_stream_file
- documentation