ZLMediaKit / ZLMediaKit

WebRTC/RTSP/RTMP/HTTP/HLS/HTTP-FLV/WebSocket-FLV/HTTP-TS/HTTP-fMP4/WebSocket-TS/WebSocket-fMP4/GB28181/SRT server and client framework based on C++11
https://docs.zlmediakit.com
Other
14.08k stars 3.45k forks source link

[BUG] BUG Phenomenon Description (Required) #3935

Closed Yordroid closed 1 month ago

Yordroid commented 1 month ago

Phenomenon Description

Pushing only AAC audio to ZLM, HLS does not see media registration print, but pushing audio and video can, what is the reason for this? I see that there is only one init.mp4 in the www directory, and no slice files are generated,

How to reproduce?

Single push audio

First push audio to ZLM, it should have HLS media registration, then you can pull the stream to play

Related logs or screenshots

image

Expand to view detailed logs

```
#Please paste the detailed log here!
```

2024-09-27 19:20:02.730 E [iot_media_server] [18-event poller 1] vs_media_pusher_handle_zlm_def.h:343 on_mk_http_before_access | client info, local: 127.0.0.1:7205, peer: 127.0.0.1:40742, path: /apps/www/play/7419281117343122412/hls.fmp4.m3u8 GET /play/7419281117343122412/hls.fmp4.m3u8? HTTP/1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36

2024-09-27 19:20:02.730 E [iot_media_server] [18-event poller 1] vs_media_pusher_handle_zlm_def.h:92 on_mk_media_play | client info, local: 127.0.0.1:7205, peer: 127.0.0.1:40742 hls.fmp4/defaultVhost/play/7419281117343122412, url params: 2024-09-27 19:20:02.730 E [iot_media_server] [18-event poller 1] vs_media_pusher_handle_zlm_def.h:117 on_mk_media_not_found | client info, local: 127.0.0.1:7205, peer: 127.0.0.1:40742 hls.fmp4/defaultVhost/play/7419281117343122412, url params: 2024-09-27 19:20:12.120 E [iot_media_server] [18-event poller 0] vs_media_pusher_handle_zlm_def.h:45 on_mk_media_changed | 1 fmp4/defaultVhost/play/7419281168882729965 2024-09-27 19:20:12.120 I [iot_media_server] [18-event poller 0] MediaSource.cpp:517 emitEvent | Media registration: fmp4://defaultVhost/play/7419281168882729965 2024-09-27 19:20:12.120 I [iot_media_server] [18-event poller 0] MultiMediaSourceMuxer.cpp:555 onAllTrackReady | stream: schema://defaultVhost/app/stream , codec info: mpeg4-generic[8000/1/16] H264[1920/1080/25] 2024-09-27 19:20:12.120 E [iot_media_server] [18-event poller 0] vs_media_pusher_handle_zlm_def.h:45 on_mk_media_changed | 1 rtmp/defaultVhost/play/7419281168882729965 2024-09-27 19:20:12.120 I [iot_media_server] [18-event poller 0] MediaSource.cpp:517 emitEvent | Media registration: rtmp://defaultVhost/play/7419281168882729965 2024-09-27 19:20:12.120 E [iot_media_server] [18-event poller 0] vs_media_pusher_handle_zlm_def.h:45 on_mk_media_changed | 1 rtsp/defaultVhost/play/7419281168882729965 2024-09-27 19:20:12.120 I [iot_media_server] [18-event poller 0] MediaSource.cpp:517 emitEvent | Media registration: rtsp://defaultVhost/play/7419281168882729965 2024-09-27 19:20:12.120 E [iot_media_server] [18-event poller 0] vs_media_pusher_handle_zlm_def.h:45 on_mk_media_changed | 1 ts/defaultVhost/play/7419281168882729965 2024-09-27 19:20:12.120 I [iot_media_server] [18-event poller 0] MediaSource.cpp:517 emitEvent | Media registration: ts://defaultVhost/play/7419281168882729965 2024-09-27 19:20:15.912 E [iot_media_server] [18-event poller 0] vs_media_pusher_handle_zlm_def.h:227 on_mk_http_request | client info, local: 127.0.0.1:7205, peer: 127.0.0.1:37938 GET /play/7419281168882729965/hls.fmp4.m3u8? HTTP/1.0

Configuration

Please expand to view detailed configuration

```ini
#Please paste the contents of the config.ini file here!
```
; ; auto-generated by mINI class { [general] check_nvidia_dev=1 enableVhost=0 enable_ffmpeg_log=0 flowThreshold=1024 maxStreamWaitMS=15000 mediaServerId=yxTkZ5mpwZPGCIQK mergeWriteMS=0 resetWhenRePlay=1 streamNoneReaderDelayMS=30000 unready_frame_cache=100 wait_add_track_ms=3000 wait_track_ready_ms=10000 [hls] broadcastRecordTs=0 deleteDelaySec=10 fileBufSize=65536 segDur=2 segKeep=0 segNum=3 segRetain=5 fastRegister = 1 [http] allow_cross_domains=1 allow_ip_range=127.0.0.1,172.16.0.0-172.31.255.255,192.168.0.0-192.168.255.255,10.0.0.0-10.255.255.255 charSet=gb2312 dirMenu=1 port=7608 forbidCacheSuffix= forwarded_ip_header= keepAliveSecond=15 maxReqSize=40960 notFound=404 Not Found

The resource you are accessing does not exist!


ZLMediaKit(git hash:a64383a/2023-04-24T19:49:23+08:00,branch:master,build time:2023-08-22T18:15:21)
rootPath=./www sendBufSize=65536 virtualPath= [multicast] addrMax=239.255.255.255 addrMin=239.0.0.0 udpTTL=64 [protocol] add_mute_audio=1 auto_close=0 continue_push_ms=15000 enable_audio=1 enable_fmp4=1 enable_hls=1 enable_hls_fmp4=1 enable_mp4=0 enable_rtmp=1 enable_rtsp=1 enable_ts=1 fmp4_demand=0 hls_demand=1 hls_save_path=./www modify_stamp=2 mp4_as_player=0 mp4_max_second=3600 mp4_save_path=./www rtmp_demand=0 rtsp_demand=0 ts_demand=0 [record] appName=record fastStart=0 fileBufSize=65536 fileRepeat=0 sampleMS=500 [rtc] externIP=xxx port=7208 preferredCodecA=PCMU,PCMA,opus,mpeg4-generic preferredCodecV=H264,H265,AV1,VP9,VP8 rembBitRate=0 tcpPort=0 timeoutSec=15 [rtmp] handshakeSecond=15 keepAliveSecond=15 [rtp] audioMtuSize=600 h264_stap_a=1 lowLatency=0 rtpMaxSize=10 videoMtuSize=1400 [rtp_proxy] dumpDir= gop_cache=1 h264_pt=98 h265_pt=99 opus_pt=100 port_range=30000-35000 ps_pt=96 timeoutSec=15 [rtsp] authBasic=0 directProxy=1 handshakeSecond=15 keepAliveSecond=15 lowLatency=0 rtpTransportType=-1 [shell] maxReqSize=1024 [srt] latencyMul=4 pktBufSize=8192 port=9000 timeoutSec=5 ## Various environment information * **Code commit record/git commit hash**: * **Operating system and version**: * **Hardware information**: * **crash backtrace**: ``` #Paste the crash information backtrace here ``` * **Other information to be supplemented**: > ## 现象描述 把仅aac音频推到zlm,hls没有看到媒体注册打印,但推送音视频时可以,这个是什么原因呢,我看www目录下只有一个init.mp4,没有切片文件生成, ## 如何复现? 单推送音频 首先推送音频到zlm,正在应该有hls媒体注册,然后才能拉流播放 ## 相关日志或截图 ![image](https://github.com/user-attachments/assets/d330a421-8b14-42f8-8c32-471a6a9162a4)
展开查看详细日志

```
#详细日志粘在这里!
```
2024-09-27 19:20:02.730 E [iot_media_server] [18-event poller 1] vs_media_pusher_handle_zlm_def.h:343 on_mk_http_before_access | client info, local: 127.0.0.1:7205, peer: 127.0.0.1:40742, path: /apps/www/play/7419281117343122412/hls.fmp4.m3u8 GET /play/7419281117343122412/hls.fmp4.m3u8? HTTP/1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 2024-09-27 19:20:02.730 E [iot_media_server] [18-event poller 1] vs_media_pusher_handle_zlm_def.h:92 on_mk_media_play | client info, local: 127.0.0.1:7205, peer: 127.0.0.1:40742 hls.fmp4/__defaultVhost__/play/7419281117343122412, url params: 2024-09-27 19:20:02.730 E [iot_media_server] [18-event poller 1] vs_media_pusher_handle_zlm_def.h:117 on_mk_media_not_found | client info, local: 127.0.0.1:7205, peer: 127.0.0.1:40742 hls.fmp4/__defaultVhost__/play/7419281117343122412, url params: 2024-09-27 19:20:12.120 E [iot_media_server] [18-event poller 0] vs_media_pusher_handle_zlm_def.h:45 on_mk_media_changed | 1 fmp4/__defaultVhost__/play/7419281168882729965 2024-09-27 19:20:12.120 I [iot_media_server] [18-event poller 0] MediaSource.cpp:517 emitEvent | 媒体注册:fmp4://__defaultVhost__/play/7419281168882729965 2024-09-27 19:20:12.120 I [iot_media_server] [18-event poller 0] MultiMediaSourceMuxer.cpp:555 onAllTrackReady | stream: schema://__defaultVhost__/app/stream , codec info: mpeg4-generic[8000/1/16] H264[1920/1080/25] 2024-09-27 19:20:12.120 E [iot_media_server] [18-event poller 0] vs_media_pusher_handle_zlm_def.h:45 on_mk_media_changed | 1 rtmp/__defaultVhost__/play/7419281168882729965 2024-09-27 19:20:12.120 I [iot_media_server] [18-event poller 0] MediaSource.cpp:517 emitEvent | 媒体注册:rtmp://__defaultVhost__/play/7419281168882729965 2024-09-27 19:20:12.120 E [iot_media_server] [18-event poller 0] vs_media_pusher_handle_zlm_def.h:45 on_mk_media_changed | 1 rtsp/__defaultVhost__/play/7419281168882729965 2024-09-27 19:20:12.120 I [iot_media_server] [18-event poller 0] MediaSource.cpp:517 emitEvent | 媒体注册:rtsp://__defaultVhost__/play/7419281168882729965 2024-09-27 19:20:12.120 E [iot_media_server] [18-event poller 0] vs_media_pusher_handle_zlm_def.h:45 on_mk_media_changed | 1 ts/__defaultVhost__/play/7419281168882729965 2024-09-27 19:20:12.120 I [iot_media_server] [18-event poller 0] MediaSource.cpp:517 emitEvent | 媒体注册:ts://__defaultVhost__/play/7419281168882729965 2024-09-27 19:20:15.912 E [iot_media_server] [18-event poller 0] vs_media_pusher_handle_zlm_def.h:227 on_mk_http_request | client info, local: 127.0.0.1:7205, peer: 127.0.0.1:37938 GET /play/7419281168882729965/hls.fmp4.m3u8? HTTP/1.0 ## 配置
展开查看详细配置

```ini
#config.ini内容粘在这里!
```
; auto-generated by mINI class { [general] check_nvidia_dev=1 enableVhost=0 enable_ffmpeg_log=0 flowThreshold=1024 maxStreamWaitMS=15000 mediaServerId=yxTkZ5mpwZPGCIQK mergeWriteMS=0 resetWhenRePlay=1 streamNoneReaderDelayMS=30000 unready_frame_cache=100 wait_add_track_ms=3000 wait_track_ready_ms=10000 [hls] broadcastRecordTs=0 deleteDelaySec=10 fileBufSize=65536 segDur=2 segKeep=0 segNum=3 segRetain=5 fastRegister = 1 [http] allow_cross_domains=1 allow_ip_range=127.0.0.1,172.16.0.0-172.31.255.255,192.168.0.0-192.168.255.255,10.0.0.0-10.255.255.255 charSet=gb2312 dirMenu=1 port=7608 forbidCacheSuffix= forwarded_ip_header= keepAliveSecond=15 maxReqSize=40960 notFound=404 Not Found

您访问的资源不存在!


ZLMediaKit(git hash:a64383a/2023-04-24T19:49:23+08:00,branch:master,build time:2023-08-22T18:15:21)
rootPath=./www sendBufSize=65536 virtualPath= [multicast] addrMax=239.255.255.255 addrMin=239.0.0.0 udpTTL=64 [protocol] add_mute_audio=1 auto_close=0 continue_push_ms=15000 enable_audio=1 enable_fmp4=1 enable_hls=1 enable_hls_fmp4=1 enable_mp4=0 enable_rtmp=1 enable_rtsp=1 enable_ts=1 fmp4_demand=0 hls_demand=1 hls_save_path=./www modify_stamp=2 mp4_as_player=0 mp4_max_second=3600 mp4_save_path=./www rtmp_demand=0 rtsp_demand=0 ts_demand=0 [record] appName=record fastStart=0 fileBufSize=65536 fileRepeat=0 sampleMS=500 [rtc] externIP=xxx port=7208 preferredCodecA=PCMU,PCMA,opus,mpeg4-generic preferredCodecV=H264,H265,AV1,VP9,VP8 rembBitRate=0 tcpPort=0 timeoutSec=15 [rtmp] handshakeSecond=15 keepAliveSecond=15 [rtp] audioMtuSize=600 h264_stap_a=1 lowLatency=0 rtpMaxSize=10 videoMtuSize=1400 [rtp_proxy] dumpDir= gop_cache=1 h264_pt=98 h265_pt=99 opus_pt=100 port_range=30000-35000 ps_pt=96 timeoutSec=15 [rtsp] authBasic=0 directProxy=1 handshakeSecond=15 keepAliveSecond=15 lowLatency=0 rtpTransportType=-1 [shell] maxReqSize=1024 [srt] latencyMul=4 pktBufSize=8192 port=9000 timeoutSec=5 ## 各种环境信息 * **代码提交记录/git commit hash**: * **操作系统及版本**: * **硬件信息**: * **crash backtrace**: ``` #崩溃信息backtrace粘贴至此 ``` * **其他需要补充的信息**: `TRANS_BY_GITHUB_AI_ASSISTANT`
xiongguangjie commented 1 month ago

Using this PR will fix it.

使用这个pr修复就行了

TRANS_BY_GITHUB_AI_ASSISTANT