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
相关推荐
MicJordan2 小时前
macos安装Claude提示command not found
macos
坠金2 小时前
mac电脑网络卡顿解决方法
macos
写点啥呢3 小时前
MacOS远程桌面报错0x207解决方法
macos
CrankZ5 小时前
幕译 1.7--本地字幕生成与翻译--支持macOS,Windows
macos·whisper
ashcn20015 小时前
autohotkey模拟mac中英文切换和ESC切成英文(适配vim)
macos·autohotkey
大猫熊猫5 小时前
【ios】xcode运行项目时报错 Showing All Errors Only Framework ‘Pods_Runner‘ not found
macos·ios·xcode
weixin_4624462313 小时前
【原创实践】mac手动安装 wget
macos·wget
FreeBuf_16 小时前
认证噩梦:新型MacSync窃密木马绕过Gatekeeper劫持Mac设备
macos
绝世唐门三哥1 天前
Mac 免费 GIF 录制软件全攻略:下载、安装与使用指南
macos·gif
雪域迷影1 天前
macOS系统上或首次使用Python的urllib模块时出现 ssl.SSLCertVerificationError 错误
python·macos·ssl