mac中如何使用obs推流以及使用vlc播放

  • 使用obs推流

    1.打开obs,在"来源"框中->点加号->选择媒体源->选择本地ts文件

    2.obs中->点击右下角设置->点直播->服务选自定义->服务器填写你的srt服务url,比如:srt://192.168.13.211:14000?mode=caller

    注意,你的srt服务是listener模式,你的obs的url要填写caller,因为是obs call 你的srt服务器

  • 使用vlc播放

    1.打开vlc,file -> open network... ->填写拉流地址

    比如:我拉的是http流,那么这里填写:http://192.168.13.211:800/ts/1720078261350617962

mac也可以安装FFmpeg来播放流
FFmpeg 是一个强大的多媒体处理工具,可以通过命令行播放和处理 HTTP 流。

  • 使用 Homebrew 安装 FFmpeg:

    bash 复制代码
    brew install ffmpeg
  • 打开终端,运行以下命令:

    bash 复制代码
    ffplay http://example.com/stream

    mac也可以安装FFmpeg来推流

    • 安装好ffmpeg之后,准备好一个ts文件,并编写脚本send.sh

      假定bbb_sunflower_1080p_60fps_avc_aac.ts已经放到当前目录

      复制代码
      bitrate=$1
      port=$2
      ./ffmpeg -stream_loop -1 -re -i ./bbb_sunflower_1080p_60fps_avc_aac.ts -codec copy -flush_packets 0 -f mpegts -muxrate ${bitrate}000k "udp://127.0.0.1:${port}?pkt_size=1316&bitrate=${bitrate}000000&burst_bits=1000000" >/dev/null 2>/dev/null &

然后执行下面命令即可推流udp到指定端口(100是码率100Mbps,10010shi 端口):

复制代码
./send.sh 100 10010
相关推荐
库奇噜啦呼3 小时前
【iOS】内存对齐原理
macos·ios·cocoa
子沫20204 小时前
mac下载VMware Fusion
macos·mac·vmware fusion
xwz_new6 小时前
数字芯片验证工具之Mac安装Icarus Verily+ GTKWave+VScode(免费)
macos·ic验证
卵男(章鱼)10 小时前
系统终端命令对比大全(Linux发行/macOS/Windows)
linux·运维·服务器·windows·macos
SNOWPIAOP10 小时前
从MAC电脑复制qwen3.5:4b 的OLLAMA模型到LINUX电脑实践
linux·运维·macos·manifest·ollama·blobs
一直会游泳的小猫11 小时前
Homebrew - macOS 与 Linux 的包管理器
linux·运维·macos·brew·包管理工具
lwf00616412 小时前
解决macOS .dmg 文件无法安装问题
macos·策略模式
青柠小苍兰12 小时前
Mac(M4 Pro)安装 Parallels Desktop 20 + Windows 11 ARM 完整教程
arm开发·macos·虚拟机·parallels
pop_xiaoli1 天前
【iOS】dyld加载
macos·ios·objective-c·cocoa
程序员小崔日记1 天前
当 AIR 只支持 Mac,我开始重新思考操作系统这件事
macos·操作系统·ai编程