推流脚本

小龙人 发布于 阅读:32 shell

#!/bin/bash

input_file="playlist.txt"

while true
do

ffmpeg -f concat -safe 0 -i $input_file -vcodec copy -acodec aac -f mpegts -strict -2 -vbsf h264_mp4toannexb pipe:1.ts | cat - >> push
done
#!/bin/bash

logfile="log.txt"
rtmp_adress="rtmp://103.200.30.107/live/livestream"

while true
do
ffmpeg -re -i push -c:v copy -c:a aac -f flv $rtmp_adress 2>&1 | tee -a $logfile
sleep 5
done 
#!/bin/bash
ffmpeg -re -i 1.mp4 -i qiao.png -filter_complex "overlay=main_w-overlay_w:main_h-overlay_h",drawtext="fontfile=simhei.ttf: text='徐老师学习馆直播间':x=10:y=10:fontsize=36:fontcolor=#40e0d0:shadowy=2",drawtext="fontfile=wx.ttf:fontsize=50:fontcolor=white:textfile=vip.txt:boxcolor=black:x=w-t*100:y=h-th:enable='between(t\,3,\60)'" -vcodec h264 -acodec aac -strict -2 -f flv rtmp://103.200.30.107/live/livestream

手机扫码阅读

微信或手机浏览器扫一扫,随时随地随心阅读与分享