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
GW.J
fcdd7bd990
bugfix: MediaSource 经 listener->getMuxer() 的空指针竞态崩溃 ( #4775 )
2026-07-13 11:02:39 +08:00
YuLi
1b4f3ef9a1
Bound paced sender cache by frame count ( #4776 )
...
### Motivation
- Prevent unbounded memory growth in `FramePacedSender` when many frames
share identical or tightly clustered DTS values by restoring an
insertion-time frame-count guard independent of DTS-span-based pressure.
### Description
- Add a `kMaxCacheSize` constant and force a cache `flushCache(...)`
when `_cache.size()` exceeds `kMaxCacheSize`, keeping paced-sender
buffering bounded even if `buf_ms` remains small; the guard is applied
immediately after `_cache.emplace(...)` in
`FramePacedSender::inputFrame`.
### Testing
- Performed static discovery of call sites and symbols with `rg`/`sed`
to verify the paced sender is created when `_option.paced_sender_ms` is
nonzero and that frames are routed to `_paced_sender->inputFrame(...)`;
this succeeded.
- Attempted to configure and build with `cmake -S . -B build
-DCMAKE_BUILD_TYPE=Release && cmake --build build -j2` and `cmake
--build build -j2`, both failed during configuration or build due to
missing third-party artifacts (`3rdpart/ZLToolKit/CMakeLists.txt`) or no
existing `build` directory in the checkout, so no binary tests were
executed.
------
[Codex
Task](https://chatgpt.com/codex/cloud/tasks/task_e_6a512c4481a883209d56b8e7109a91ba )
2026-07-11 08:19:43 +08:00
xiongziliang
6c0bc2e5c0
重构平滑发送逻辑,自适应发送速度降低延时
2026-07-08 11:12:22 +08:00
xiongziliang
6d2d586fb2
优化getSnap截图接口性能
2026-07-08 11:12:22 +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
86a7204bab
解决mp4_as_player设置为1时相关bug ( #4725 )
2026-05-21 16:39:20 +08:00
xia-chu
37ea51a2ec
彻底解决mp4_as_player设置为1时,on_stream_none_reader回调无效流信息的问题 ( #4725 )
2026-05-08 18:16:16 +08:00
xia-chu
ee05ae159a
修复mp4_as_player设置为1时,on_stream_none_reader回调无效流信息的问题 ( #4725 )
2026-05-03 19:50:09 +08:00
xia-chu
9bff057860
Revert "修复mp4_as_player设置为1时,on_stream_none_reader回调无效流信息的问题 ( #4725 )"
...
This reverts commit 6f9531c5fa .
2026-05-03 19:33:43 +08:00
xia-chu
c440c45ce4
新增流健康度探针功能
2026-05-03 15:02:03 +08:00
xia-chu
6f9531c5fa
修复mp4_as_player设置为1时,on_stream_none_reader回调无效流信息的问题 ( #4725 )
2026-05-03 12:04:09 +08:00
xia-chu
bb49e4dcdc
播放器新增schema参数支持指定拉流协议
2026-03-11 22:24:21 +08:00
xia-chu
ca47a1f8b2
http access事件新增文件绝对路径参数
2026-03-09 18:01:48 +08:00
xia-chu
b8301bd085
修复python on_create_muxer事件隐式拷贝对象的bug
2026-03-07 13:06:18 +08:00
夏楚
6d520ea6a3
新增支持Python混合编程模式 ( #4579 )
2026-02-10 13:28:42 +08:00
xia-chu
a54a0b35c7
优化代码
2026-01-09 11:41:07 +08:00
xia-chu
cd8a14d1ca
事件视频录制前溯和后溯时间支持负数
2026-01-09 11:34:18 +08:00
xia-chu
1892185b23
更新默认配置文件,支持配置注释和排序
2025-12-01 20:08:23 +08:00
xia-chu
021f09e62b
优化精简媒体事件相关逻辑代码
2025-11-23 19:07:48 +08:00
xia-chu
8289aa7e88
优化根据pts生成dts时间戳逻辑 ( #4552 )
2025-11-23 11:46:02 +08:00
xia-chu
c9490ad764
新增兜底机制确保事件录制视频能正常结束
2025-11-18 20:12:47 +08:00
xia-chu
07f8f46e8a
默认输出增强型rtmp协议
2025-10-16 20:16:11 +08:00
baigao-X
3fb43c5fef
feat: 增加webrtc代理拉流 ( #4389 )
...
- 增加客户端模式,支持主动拉流、推流:
- addStreamProxy接口新增支持whep主动拉流,拉流地址目前只兼容zlm的whep url。
- addStreamPusherProxy接口新增支持whip主动推流,推流地址目前只兼容zlm的whip url。
- 以上推流url格式为webrtc[s]://server_host:server_port/app/stream_id?key=value, 内部会自动转换为http[s]://server_host:server_port/index/api/[whip/whep]?app=app&stream=stream_id&key=value。
- 增加WebRtc p2p 模式:
- 增加 ICE FULL模式。
- 增加STUN/TURN 服务器。
- 增加websocket 信令。
- 增加P2P代理拉流。
---------
Co-authored-by: xia-chu <771730766@qq.com >
Co-authored-by: mtdxc <mtdxc@126.com >
Co-authored-by: cqm <cqm@97kid.com >
2025-09-20 16:23:30 +08:00
xia-chu
a8f5cedd84
rtsp/http类型播放协议支持自定义header
2025-09-10 21:51:26 +08:00
xia-chu
5686027fc2
修复MediaSource::close线程安全问题
...
主动或无人观看关闭流可能会由于线程安全问题导致崩溃
2025-09-09 22:02:20 +08:00
Nevermore
acb12d7806
bug-fix: fix urldecode in unsigned-char ( #4424 #4423 )
2025-09-02 16:54:45 +08:00
xia-chu
f524a0ebbd
配置文件auto_close开启后也触发无人观看hook(不处理回复)
2025-08-23 10:43:32 +08:00
yingxiaodong
8f3c01043f
问题修正:解决loadMP4File崩溃问题时,引入的getOwnerPoller失败 ( #4390 )
2025-08-11 20:35:10 +08:00
xia-chu
57fede9508
修复编译警告
2025-08-09 15:42:28 +08:00
yingxiaodong
d2e099bd23
BUG修正:loadMP4File播放文件时,无人观看触发关闭,导致程序崩溃 ( #4387 )
...
关闭文件播放的处理与文件播放动作不在一个线程,导致崩溃。
2025-08-09 14:37:54 +08:00
dsjing
87d84c47fe
修正ENABLE_RTPPROXY未启用时编译失败问题 ( #4384 )
2025-08-09 14:24:23 +08:00
xia-chu
c9a0025620
新增startRecordTask接口,支持录制事件视频
...
用户可以录制当前时间前后一定时间内的视频,配置文件gop_cache设置较大时历史视频才能录全
2025-08-02 21:00:30 +08:00
xia-chu
88ef00e429
音视频时间戳相差太大时强制同步
2025-08-02 21:00:30 +08:00
sbkyy
6ccbd3aafb
rtp级联网络慢时默认不限制源端接收网速 ( #4359 )
2025-07-26 15:44:29 +08:00
PioLing
fb2a3f5179
修复无人观看关闭流相关bug ( #4334 )
2025-07-02 14:58:12 +08:00
xia-chu
f0bc7a75aa
确保断连续推功能开启后流能正常强制关闭 ( #4287 )
2025-06-29 18:10:00 +08:00
xia-chu
9a7cca1ad9
paced_sender逻辑新增音视频包排序功能
...
用于矫正音视频包时间戳交织性
2025-06-29 18:00:04 +08:00
xia-chu
18ca4cf48f
优化音视频时间戳同步逻辑
2025-06-29 17:55:17 +08:00
xia-chu
a9fe5d6f42
新增帧合并开关,优化国标流秒开速度
2025-06-29 10:56:05 +08:00
xia-chu
9e6b33b02e
rtp tcp级联速度太慢时主动限制上游接收速度
...
防止发送速度跟不上接受速度导致发送超时
2025-06-29 10:56:05 +08:00
Haibo Chen(陈海博)
6e125d02dc
Fix typo ( #4307 )
2025-06-07 15:00:06 +08:00
PioLing
7b1f8fedac
Add network traffic statistics ( #4239 )
...
Co-authored-by: xiongguangjie <xiong_panda@163.com >
Co-authored-by: xia-chu <771730766@qq.com >
2025-05-02 16:23:25 +08:00
xia-chu
11d1b849ec
startSendRtp、startRecord接口支持缓存多个gop ( #4180 )
2025-03-07 23:40:50 +08:00
xiongguangjie
2a85dffdf9
on_play/on_publish hook 新增protocol字段 ( #4133 #4143 )
...
对于webhook 涉及到media info的相关信息,增加protocol 的字段,表明是基于什么协议传输的
2025-02-13 15:18:47 +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
xia-chu
0bbcbb9907
修复某些不规范流不注册的问题
2024-12-21 18:47:33 +08:00
xia-chu
ef11c66fb8
新增语音对讲接口(startSendRtpTalk)
2024-11-09 19:29:04 +08:00
xia-chu
4c90a1a95b
Instantly enable recording support for GOP caching
2024-10-18 22:22:13 +08:00