mp4-to-rtmp

command
v0.0.0-...-ae8f3be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

MP4 文件推流到 RTMP 服务器示例

功能:

  • 智能检测 MP4 文件编码格式
  • 判断是否支持直接推流(无需转码)
  • 按原始时间戳控制推流速度
  • 支持循环推流

用法:

go run main.go -i input.mp4 -o rtmp://server/live/stream
go run main.go -i input.mp4 -o rtmp://server/live/stream -loop

支持的编码:

  • 视频:H.264, H.265
  • 音频:AAC

Source Files

  • main.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL