Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The m3u8 file is not triggering the callback, and after the callback is triggered for the flv file, it cannot be played. #4299

Open
15280285993 opened this issue Mar 11, 2025 · 0 comments
Labels
TransByAI Translated by AI/GPT.

Comments

@15280285993
Copy link

15280285993 commented Mar 11, 2025

I am using the version registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:5. In the configuration, I have set up an on_play callback URL, but I noticed that the callback is not triggered when the .m3u8 file is played. The callback was triggered for the .flv file, and the logs indicated that the callback was successful, but the video did not play and shortly after, the on_stop callback was triggered.

The logs are shown in the image:
Image

The complete configuration is as follows for srs.release.conf:

listen 1935;
max_connections 1000;
srs_log_tank console;
daemon on;
disable_daemon_for_docker off;
http_api {
enabled on;
listen 127.0.0.1:1985;
raw_api {
enabled on;
allow_reload on;
}
auth {
enabled on;
username admin;
password admin;
}
}
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
rtc_server {
enabled on;
listen 8000; # UDP port
candidate $CANDIDATE;
use_auto_detect_network_ip off;
api_as_candidates off;
}

srt_server {
enabled on;
listen 10080; # UDP port
maxbw 1000000000;
connect_timeout 4000;
latency 20;
peerlatency 20;
recvlatency 20;
tlpktdrop off;
tsbpdmode off;
}

include containers/data/config/srs.server.conf;

vhost defaultVhost {
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
rtc {
enabled on;
nack on;
twcc on;
stun_timeout 30;
dtls_role passive;
rtmp_to_rtc on;
keep_bframe off;
rtc_to_rtmp on;
pli_for_rtmp 6.0;
}

hls {
    enabled         on;
    hls_fragment    5;
    hls_window      86400;
    hls_path        ./objs/nginx/html/;
    hls_m3u8_file   [app]/[stream].m3u8;
    hls_ts_file     [app]/[2006][01][02]/[stream]/[15][04][05].ts;
    hls_cleanup     off;
    hls_dispose     0; 
    }

dvr {
    enabled             on;
    dvr_path            ./objs/nginx/html/[app]/[stream].flv;
    dvr_plan            session;
    }

srt {
    enabled     on;
    srt_to_rtmp on;
}

http_hooks {
    enabled         on;
    on_publish      http://localhost:2022/terraform/v1/hooks/srs/verify;
    on_unpublish    http://localhost:2022/terraform/v1/hooks/srs/verify;
    on_play         http://192.168.50.243:9061/oryx/demo/verify/token;
    on_stop         http://localhost:2022/terraform/v1/hooks/srs/verify;
   on_dvr          http://192.168.50.243:9061/oryx/demo/verify/token;
    on_hls          http://localhost:2022/terraform/v1/hooks/srs/hls;
}

include containers/data/config/srs.vhost.conf;

}
`

TRANS_BY_GPT4

@winlinvip winlinvip changed the title m3u8无法触发回调以及flv文件触发回调后无法播放 The m3u8 file is not triggering the callback, and after the callback is triggered for the flv file, it cannot be played. Mar 11, 2025
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

2 participants