ffmpeg & red5 & obs

yfm12上
sudo yum install epel-release
sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

sudo yum install -y ffmpeg ffmpeg-devel
ffmpeg -version
将flv视频文件转换为mp4视频文件
ffmpeg -i beeen.flv -y -vcodec copy -acodec copy beeen.mp4

将mp4转为完整的ts
ffmpeg -i test.mp4 -c copy -bsf h264_mp4toannexb output.ts

将ts切片,并生成m3u8文件
ffmpeg -i output.ts -c copy -map 0 -f segment -segment_list playlist.m3u8 -segment_time 5 output%03d.ts

[root@yfm12 ffmpeg]# ll
total 11528
-rw-r--r-- 1 root root 1966480 May 19 15:05 output000.ts
-rw-r--r-- 1 root root 2016488 May 19 15:05 output001.ts
-rw-r--r-- 1 root root 3981840 May 19 15:04 output.ts
-rw-r--r-- 1 root root     173 May 19 15:05 playlist.m3u8
-rw-r--r-- 1 root root 3825533 May 19 15:02 test.mp4

red5

https://github.com/Red5/red5-server/releases
避免jdk11,我这里下载red5-server-1.1.1.tar.gz

tar -zxvf red5-server-1.1.1.tar.gz
cd red5-server
vi conf/red5.properties
# HTTP
http.host=192.168.199.112
http.port=5080

# RTMP
rtmp.host=192.168.199.112
rtmp.port=1935

添加red5到系统启动项
vi /etc/init.d/red5
#!/bin/bash
# For RedHat and cousins:
# chkconfig: 2345 85 85
# description: Red5 flash streaming server
# processname: red5
# Created By: BoTao Zhao (botaozhao@foxmail.com)

PROG=red5
RED5_HOME=/data/red5/red5-server
DAEMON=$RED5_HOME/$PROG.sh
PIDFILE=/var/run/$PROG.pid

# Source function library
. /etc/rc.d/init.d/functions

[ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5

RETVAL=0

case "$1" in
	start)
	echo -n $"Starting $PROG: "
	cd $RED5_HOME
	$DAEMON >/dev/null 2>/dev/null &
	RETVAL=$?
	if [ $RETVAL -eq 0 ]; then
		echo $! > $PIDFILE
		touch /var/lock/subsys/$PROG
	fi
	[ $RETVAL -eq 0 ] && success $"$PROG startup" || failure $"$PROG startup"
	echo
	;;
	stop)
	echo -n $"Shutting down $PROG: "
	killproc -p $PIDFILE
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG
	;;
	restart)
	$0 stop
	$0 start
	;;
	status)
	status $PROG -p $PIDFILE
	RETVAL=$?
	;;
	*)
	echo $"Usage: $0 {start|stop|restart|status}"
	RETVAL=1
esac

exit $RETVAL


chmod +x /etc/rc.d/init.d/red5

service red5 start

obs

下载地址:  https://obsproject.com/

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

四美

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值