YuLi
4a24057e73
feat(http): decouple upload size limit from maxReqSize and harden file upload ( #4780 )
...
- Add maxUploadSize config (default 1GB) for custom HttpBody streaming uploads;
maxReqSize now only controls in-memory buffering threshold
- Reject uploads exceeding maxUploadSize with 413 before writing any data
- Delete incomplete files on HttpFileStorage destruction
- Open HttpFileStorage in "wb" mode instead of "ab" to avoid stale data
- Pass content_size to writeData() for integrity validation
- Use uint64_t for content_len to support large file uploads
- Wrap HttpBody _on_completed callback in try-catch to prevent unhandled exceptions
- Make GET_CONFIG global variables read-only
- Update ZLToolKit submodule
---------
Co-authored-by: xiongziliang <771730766@qq.com >
2026-07-23 13:55:35 +08:00
xiongziliang
92681fe6e1
新增支持http文件上传功能
2026-07-08 11:12:22 +08:00
Caner Ateş
64ae6e43c5
支持配置 fmp4 HLS 切片文件扩展名 (.mp4/.m4s) ( #4746 )
...
## 背景 / 问题
fmp4 模式下,HLS 切片文件名被硬编码为 `.mp4`(见 `HlsMakerImp::onOpenSegment`),无法改用 fmp4
媒体段更规范、更常见的 `.m4s` 扩展名(`init` 段用 `init.mp4`、媒体段用 `.m4s` 是 CMAF/DASH
的通行约定)。
## 改动
- 新增配置项 `hls.fmp4SegExt`,默认 `.mp4`,**完全向后兼容**;用户可设为 `.m4s`。
- `init` 段仍固定为 `init.mp4`,mpegts 切片仍为 `.ts`,相关行为不变。
- 切片文件名同时用作 m3u8 中的分片 URI,因此扩展名变更后 playlist 自动保持一致,无需额外同步。
- 在 HTTP MIME 表中注册 `.m4s` -> `video/mp4`;否则会以 `text/plain` 返回,导致 Safari
等播放器无法播放 HLS-fmp4。
- 配置值不带前导点(如 `m4s`)时自动规范化为 `.m4s`。
## 涉及文件
`src/Common/config.h`、`src/Common/config.cpp`、`src/Record/HlsRecorder.h`、`src/Record/HlsMakerImp.h`、`src/Record/HlsMakerImp.cpp`、`src/Http/HttpConst.cpp`、`conf/config.ini`
## 测试
- **默认(未配置)**:切片仍为 `*.mp4`,`init` 为 `init.mp4`,行为与改动前一致(回归正常)。
- **`hls.fmp4SegExt=.m4s`**:切片文件为 `*_N.m4s`,m3u8 中 `#EXTINF` 的 URI 指向
`.m4s`,`#EXT-X-MAP` 仍为 `init.mp4`;HTTP 拉取切片返回 `Content-Type:
video/mp4`;hls.js 与 Safari 播放正常。
- **`hls.fmp4SegExt=m4s`(无前导点)**:自动规范化,仍生成 `*.m4s`。
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-08 21:25:25 +08:00
xia-chu
bb49e4dcdc
播放器新增schema参数支持指定拉流协议
2026-03-11 22:24:21 +08:00
夏楚
6d520ea6a3
新增支持Python混合编程模式 ( #4579 )
2026-02-10 13:28:42 +08:00
xia-chu
1892185b23
更新默认配置文件,支持配置注释和排序
2025-12-01 20:08:23 +08:00
xia-chu
07f8f46e8a
默认输出增强型rtmp协议
2025-10-16 20:16:11 +08:00
xia-chu
a8f5cedd84
rtsp/http类型播放协议支持自定义header
2025-09-10 21:51:26 +08:00
xia-chu
a9fe5d6f42
新增帧合并开关,优化国标流秒开速度
2025-06-29 10:56:05 +08:00
baigao-X
1c8ed1c55a
Add srt caller mode and stream encryption support. ( #4088 )
...
Add srt caller mode and stream encryption support.
1. Support srt caller mode, realize srt proxy pull stream proxy push
stream;
url parameter format such as: srt://127.0.0.1:9000?streamid=#!
::r=live/test11
2. Support srt stream encrypted transmission in caller and listener
mode.
---------
Co-authored-by: xiongguangjie <xiong_panda@163.com >
2024-12-28 20:21:29 +08:00
alex
4152dcd409
AI automatically translates all comments in the code into English ( #3917 )
2024-09-19 14:53:50 +08:00
Talus
e2ac6dc176
Accelerate the ready speed of certain media that actually only have a single video track but the metadata contains an audio track ( #3885 )
...
加快某些实际上只有单视频track但是metadata包含音频track的媒体Ready速度,比如GB28181 PS流
---------
Co-authored-by: TalusL <liangzhuohua@genew.com >
2024-09-13 14:59:46 +08:00
u7ko4
e3cad7f8fa
支持绑定到指定网卡 ( #3760 )
2024-08-01 11:03:26 +08:00
xia-chu
5470049076
精简ProtocolOption相关代码
2024-06-28 19:40:46 +08:00
Lidaofu
5a717186dd
feat: 增加拉流代理rtsp时提供倍速功能支持 ( #3669 )
...
Co-authored-by: lidaofu <lidf@ahtelit.com >
2024-06-28 16:08:08 +08:00
KkemChen
373620cfc6
feat: add broadcast event for player count change ( #3562 )
2024-05-23 10:30:11 +08:00
xia-chu
bbdbd6a3e0
feat: Using kBeatIntervalMS option for rtsp heartbeat interval time and add kRtspBeatType for setting rtsp heartbeat type
2024-05-11 14:41:18 +08:00
xia-chu
e4de454d5d
Charset default to UTF-8 on Windows
2024-04-20 22:25:21 +08:00
jamesZHANG500
03c93d0b23
Add config for save fmp4 record files ( #3356 )
2024-03-10 16:19:02 +08:00
张传峰
ffdc13bfb9
RTP proxy通过UDP收流,调整udp recv socket buffer size成配置 ( #3336 )
...
国标推流有些情况需要UDP方式接收流,端口复用同一个UDP端口可能需要根据服务器性能
2024-03-05 10:42:22 +08:00
gongluck
5a6364bae2
Add datachannel c apis and callbacks( #3328 )
...
增加datachannel数据收发的回调通知 #3326,和控制datachannel回显的开关
---------
Co-authored-by: xiongziliang <771730766@qq.com >
2024-03-02 16:52:51 +08:00
xiongguangjie
06abbd0eb7
rtp send rtp g711 audio can config duration ( #3325 )
...
optimization for this
[issue](https://github.com/ZLMediaKit/ZLMediaKit/issues/3316 )
2024-03-02 16:40:13 +08:00
SetoKaiba
b6cbbb4339
Add hls_delay feature ( #3158 )
2024-01-03 09:05:15 +08:00
xiongziliang
189f787746
Disable enhanced-rtmp H265 default
2023-12-17 18:10:47 +08:00
夏楚
bbe8f4a018
release 8.0
2023-12-09 16:23:51 +08:00
夏楚
21c03f772f
新增平滑发送逻辑 ( #3072 )
2023-12-02 10:20:06 +08:00
zjx94
1cbfcd96e2
新增hls快速注册相关配置,提高hls打开速度 ( #3024 )
...
新增配置项:hls.fastRegister,默认关闭。
开启后首个切片文件只保存一个gop,可提高hls注册速度,加快播放器打开速度。
但是第一个切片播放完毕,第二个切片需要更长时间生成,可能导致播放器等待加载。
2023-11-30 17:47:22 +08:00
alexliyu7352
d593267f61
增加http代理功能 ( #2988 )
...
支持通过http代理拉流, 避免内外网复杂网络环境时需要专门配置防火墙,现在只需要配置一台代理内网的服务器.
---------
Co-authored-by: xia-chu <771730766@qq.com >
2023-11-23 11:09:01 +08:00
ljx0305
7ee2d66eaa
统一代码命名风格 ( #2910 )
...
openRtpServer时,如果开启tcp模式,从tcp端口池获取
2023-10-19 17:55:30 +08:00
夏楚
9f6930390a
IP白名单支持ipv6 ( #2858 )
...
Fix #2855
2023-09-26 14:48:19 +08:00
xia-chu
d286ac1d73
NoticeCenter支持安全类型转换,解决监听者参数类型不一致导致的bug
2023-09-02 11:22:28 +08:00
夏楚
383da1e09e
优化代码 ( #2741 )
...
删除无效的配置项,
同时修复编译警告
2023-08-05 21:30:01 +08:00
夏楚
eaecf9a56c
ip白名单添加局域网ip 10段 ( #2712 )
2023-07-29 13:04:06 +08:00
xia-chu
098046cb1d
新增http api与http文件访问ip白名单限制机制,默认禁止公网访问
2023-07-26 16:33:21 +08:00
夏楚
beae515bb2
新增无人观看自动关闭流(无须hook返回)功能 ( #2643 )
...
auto_close参数适用于配置文件、addStreamProxy接口、on_publish hook
2023-07-08 21:36:34 +08:00
XiaoYan Lin
cb0579a16d
新增支持hls-fmp4直播( #2603 #977 #1965 )
...
同时主要优化点包括:
1、编译宏特性开关优化。
2、转协议复用器相关创建代码移动至Recorder类。
3、转协议复用器onAllTrackReady函数修改为addTrackCompleted。
4、startRecord/stopRecord/isRecording接口新增支持ts/fmp4/hls-fmp4协议。
Co-authored-by: xia-chu <771730766@qq.com >
Co-authored-by: linxiaoyan87 <linxiaoyan87@foxmail.com >
2023-07-02 12:02:33 +08:00
夏楚
db8e9182cc
新增配置项指定H264 rtp打包是否优先采用stap-a模式 ( #2582 )
...
H264 rtp打包模式是否采用stap-a模式(为了在老版本浏览器上兼容webrtc)还是采用Single NAL unit packet
per H.264 模式 有些老的rtsp设备不支持stap-a rtp,设置此配置为0可提高兼容性
2023-06-26 10:04:16 +08:00
Talus
9f753b5e5f
RTSP支持强制协商RTP传输方式 ( #2572 )
...
当客户端发起RTSP SETUP的时候,如果rtp传输类型和配置不一致则返回461 Unsupported
transport。迫使客户端切换到对应rtp传输协议并重新SETUP;目前支持FFMPEG和VLC。
2023-06-21 15:35:27 +08:00
夏楚
e4acc59bec
媒体时间戳默认改为相对时间戳,通过时间戳矫正器解决跳跃和回退问题 ( #2523 )
...
通过用户反馈发现,遇到较多直播源时间戳混乱问题,包括rtsp流之rtcp ntp时间戳混乱,国标流时间戳混乱问题。
之前默认采用源流绝对时间戳,但是由于时间戳混乱会导致hls切片异常或视频播放不了等问题。
故默认改成相对时间戳(modify_stamp=2),通过时间戳矫正器过滤了时间戳跳跃以及回退问题(强制加1ms),
同时保留了对之前时间戳覆盖(modify_stamp=1)的兼容。
该修改同时兼容点播流,在点播流开启时间戳覆盖时,不起实质作用(采用原始绝对时间戳)。
2023-06-03 17:34:34 +08:00
老衲不出家
f6ac39ade5
新增允许所有跨域请求配置项 ( #2449 )
...
配置项为http.allow_cross_domains
2023-05-12 11:47:22 +08:00
Dw9
978143c86d
rtp级联(ps/ts/es)新增支持gop缓存功能 ( #2395 )
...
该修改主要解决rtp级联(调用startSendRtp接口)未做gop缓存导致上级无法秒开的问题。
同时通过RingBuffer对象线程隔离的特性,实现了在断连续推场景下归属线程切换导致的线程安全问题。
用户如未使用rtp级联功能,请修改配置文件关闭GOP缓存(rtp_proxy.gop_cache=0)以便节省内存。
---------
Co-authored-by: 夏楚 <771730766@qq.com >
2023-04-17 12:19:24 +08:00
ziyue
77e46353ce
新增支持mjpeg es rtp流
...
mpegts/g711 payload改成固定模式
2022-12-30 18:04:15 +08:00
xiongziliang
9bb6a2f828
全面整理转协议相关配置文件
2022-11-12 23:56:28 +08:00
xiongguangjie
bc63142712
add rtp server timeout hook
2022-11-10 16:58:02 +08:00
xiongguangjie
0a71e06d4a
united some code style
2022-10-19 14:55:39 +08:00
xiongguangjie
7b87985f74
Merge remote-tracking branch 'origin/master'
2022-10-19 14:27:49 +08:00
xiongguangjie
0d2e035215
rtsp and rtp h264 lowlatency mode config
2022-10-19 14:20:53 +08:00
ziyue
ff6e9f4fc7
修复流注销时,hls无法播完最后一个切片的问题: #1955
2022-10-18 19:23:20 +08:00
custompal
08789454c3
rtsp支持指定播放单一track ( #1937 )
2022-09-13 16:27:00 +08:00
xiongziliang
6a4297845f
新增发送rtp被动关闭hook
2022-08-27 10:53:47 +08:00