1 Star 0 Fork 0

houmingzhang/mycommand

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
uk_capture 668 Bytes
一键复制 编辑 原始数据 按行查看 历史
houmingzhang 提交于 2022-02-02 14:42 +08:00 . 脚本工具
#!/bin/bash
PORTBEG=10001
PORTEND=`expr $PORTBEG + 10`
TESTMEDIAFILE=/opt/testMediaFiles/CCTV10.ts
# TESTMEDIAFILE=/opt/testMediaFiles/globo.ts
# TESTMEDIAFILE=/opt/testMediaFiles/recvems_20001.ts
# TESTMEDIAFILE=/opt/testMediaFiles/Avatar.ts
# TESTMEDIAFILE=/opt/testMediaFiles/xihu.flv
FFMPEGPATH=/opt/ThirdParty/opensource/ffmpeg-4.1.3
for PORT in `seq $PORTBEG $PORTEND`
do
{
while true;do
$FFMPEGPATH/bin/ffmpeg -re -i $TESTMEDIAFILE -c copy -f mpegts udp://127.0.0.1:$PORT?pkt_size=1316
done
} &
done
wait ##等待所有子后台进程结束
date
# 全部杀死:
# ps -axj | grep -v grep| grep -E "ffmpeg|uk_capture" | awk '{print $2}' | xargs kill -9
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/dtrylzhm/mycommand.git
git@gitee.com:dtrylzhm/mycommand.git
dtrylzhm
mycommand
mycommand
master

搜索帮助