red5+ffmpeg
来源:互联网 发布:网络人肉违法 编辑:程序博客网 时间:2024/04/30 21:01
1. download and install jdk-1.7
2. download and install jre-1.7
3. download and install apache-ant-1.9
4. set home environment variable
insert these into /etc/profile
JAVA_HOME=/usr/local/jdk1.7.0_11
JRE_HOME=/usr/local/jre1.7.0_11
ANT_HOME=/usr/local/ant
export JAVA_HOME
export JRE_HOME
export ANT_HOME
5. download and install red5-1.0.0
mv red5-1.0.0 /usr/local/red5
6. run red5
/usr/local/red5/red5.sh
7. install red5 demo
http://192.168.137.66:5080/
click install
choose oflaDemo and click install
8. change webapps/oflaDemo/index.html file
<script type='text/javascript'>^M
jwplayer('mediaspace').setup({^M
'flashplayer': 'player.swf',^M
'file': 'hobbit_vp6.flv',^M
'streamer': 'rtmp://192.168.137.66/oflaDemo',^M
'controlbar': 'bottom',^M
'width': '848',^M
'height': '360'^M
});^M
</script>^M
<script type='text/javascript'>^M
jwplayer('mediaspace2').setup({^M
'flashplayer': 'player.swf',^M
'file': 'hobbit_vp6.flv',^M
'streamer': 'rtmpt://192.168.137.66:5080/oflaDemo',^M
'controlbar': 'bottom',^M
'width': '848',^M
'height': '360'^M
});^M
</script>^M
9. web player
http://192.168.137.66:5080/oflaDemo/index.html
A. ffmpeg + red5
A.1 streaming ffmpeg rtmp output to red5
ffmpeg -re -f mpegts -i film.ts -c:a libfaac -ac 1 -c:v libx264 -s 352x288 -aspect 4:3 -b:v 300k -f flv 'rtmp://localhost/live/sss1 live=1'
A.2 setup live player
cd webapps/live
cp ../oflaDemo/index.html .
cp ../oflaDemo/jwplayer.js .
cp ../oflaDemo/player.swf .
A.3 edit live/index.html
<script type='text/javascript'>^M
jwplayer('mediaspace').setup({^M
'flashplayer': 'player.swf',^M
'file': 'sss1.flv',^M
'streamer': 'rtmp://192.168.137.66/live',^M
'controlbar': 'bottom',^M
'width': '848',^M
'height': '360'^M
});^M
</script>^M
<script type='text/javascript'>^M
jwplayer('mediaspace2').setup({^M
'flashplayer': 'player.swf',^M
'file': 'sss1.flv',^M
'streamer': 'rtmpt://192.168.137.66:5080/live',^M
'controlbar': 'bottom',^M
'width': '848',^M
'height': '360'^M
});^M
</script>^M
A.4 web player
http://192.168.137.66:5080/live/index.html
A.5 ffmpeg decode rtmp stream from red5
ffmpeg -re -i 'rtmp://192.168.137.66/live/sss1 live=1' -an -c:v rawvideo -s 352x288 -f rawvideo tt.yuv
Notes:
Above, the live=1 is a must, or ffmpeg will fail on connect red5 rtmp stream server.
the live stream should be packeted with audio and video, or if only with video data,
above command will hung long time, or delay long time.
for example:
stream only video to red5
ffmpeg -re -f mpegts -i film.ts -an -c:v libx264 -s 352x288 -aspect 4:3 -b:v 300k -f flv 'rtmp://localhost/live/sss1 live=1'
decode stream from red5
ffmpeg -re -i 'rtmp://192.168.137.66/live/sss1 live=1' -an -c:v rawvideo -s 352x288 -f rawvideo tt.yuv
ffmpeg will hung long time or delay long time.
but.
ffmpeg -re -f mpegts -i film.ts -c:a libfaac -ac 1 -c:v libx264 -s 352x288 -aspect 4:3 -b:v 300k -f flv 'rtmp://localhost/live/sss1 live=1'
ffmpeg -re -i 'rtmp://192.168.137.66/live/sss1 live=1' -an -c:v rawvideo -s 352x288 -f rawvideo tt.yuv
this will be ok.
- red5+ffmpeg
- red5 ffmpeg operation not permitted 问题解决
- red5+java6+ffmpeg 实现rtsp转rtmp
- jwplayer +ffmpeg+red5 实现摄像头的直播
- red5
- red5
- Red5
- red5
- 使用Red5和FFMpeg搭建在线Flash流媒体分享平台
- 用Red5、librtmp和ffmpeg搭建网络直播系统
- 利用FFmpeg将RTSP转码成RTMP发布在RED5
- 利用FFmpeg将RTSP转码成RTMP发布在RED5
- red5 ffmpeg flowplayer 大华监控摄像头在web页面播放
- 测试ffmpeg推流到RED5(永远的雷神)
- Tomcat+red5+ffmpeg实现流媒体资源管理和在线直播
- (转)使用Red5和FFMpeg搭建在线Flash流媒体分享平台
- 利用FFmpeg将 IPCamera 的RTSP转码成RTMP发布在RED5
- 利用FFmpeg将 IPCamera 的RTSP转码成RTMP发布在RED5
- 分布式RMI多IP紊乱问题
- hdu_1565_方格取数(1)
- 32寄存器大全
- KMP算法详解
- KMP算法实现
- red5+ffmpeg
- Redis源码分析之事务
- OCM 考试说明
- poj 3070 Fibonacci
- zoj1665-Transport Goods
- 由于无法安装KB2670838导致无法安装IE10的原因及解决方法
- 课程设计--PCB板的设计
- 3好书1
- [Oracle] 谈谈Lock和Latch