Edward-Wu / srt-live-server

srt live server for low latency
Other
644 stars 192 forks source link

H265有时会播放不了 #108

Open a354123417 opened 2 years ago

a354123417 commented 2 years ago

背景:srt + H265 + larix broadcaster 复现:开始推流(H265编码) -> 停止推流 -> 编码改为H264 -> 开始推流(H264编码) -> 停止推流 -> 编码改为H265 -> 开始推流(H264编码) 播放不了,最后貌似识别为 H264

报错信息:

2021-10-19 20:03:42:537 SLS ERROR: CSLSSrt::libsrt_neterrno, err=2001, Connection was broken.
2021-10-19 20:03:42:537 SLS ERROR: [0x7f71bc0025d0]CSLSRole::handler_read_data, libsrt_read failure, n=-1.
2021-10-19 20:03:42:537 SLS ERROR: [0x7f71bc0025d0]CSLSRole::handler_read_data, m_srt is null.
2021-10-19 20:04:02:836 SLS ERROR: CSLSSrt::libsrt_neterrno, err=2001, Connection was broken.
2021-10-19 20:04:03:979 SLS ERROR: CSLSSrt::libsrt_neterrno, err=2001, Connection was broken.
2021-10-19 20:04:03:979 SLS ERROR: [0x7f71bc002490]CSLSRole::handler_read_data, libsrt_read failure, n=-1.
2021-10-19 20:04:03:979 SLS ERROR: [0x7f71bc002490]CSLSRole::handler_read_data, m_srt is null.
2021-10-19 20:04:32:844 SLS ERROR: CSLSSrt::libsrt_neterrno, err=2001, Connection was broken.
2021-10-19 20:04:32:844 SLS ERROR: [0x7f71bc002490]CSLSRole::handler_read_data, libsrt_read failure, n=-1.
2021-10-19 20:04:32:844 SLS ERROR: [0x7f71bc002490]CSLSRole::handler_read_data, m_srt is null.

ffplay 播放报错信息:

[NULL @ 000002119d578d00] missing picture in access unit with size 480
[h264 @ 000002119d58c980] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[h264 @ 000002119d58c980] If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
[h264 @ 000002119d58c980] no frame!
[NULL @ 000002119d578d00] missing picture in access unit with size 544
[h264 @ 00000211a3e19580] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[h264 @ 00000211a3e19580] If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)

配置文件:


      2     worker_threads  1;
      3     worker_connections 10;
      4 
      5     log_file logs/error.log ;
      6     log_level error;
      7 
      8     #stat_post_url http://192.168.31.106:8001/sls/stat;
      9     #stat_post_interval  5;#s
     10 
     11     record_hls_path_prefix /tmp/mov/sls;
     12     #vod  file name: /tmp/mov/sls/$listen/$domain_publisher/$app_publisher/$stream_name/vod.m3u8
     13 
     14     server {
     15         listen 4202;
     16         latency 20; #ms
     17 
     18         domain_player request;
     19         domain_publisher publish;
     20         backlog 100; #accept connections at the same time
     21         idle_streams_timeout 10;#s -1: unlimited
     22         #on_event_url http://192.168.31.106:8000/sls/on_event; #?method=on_connect|on_close&role_name=&srt_url=%s
     23         app {
     24             app_player live ;
     25             app_publisher live ;
     26 
     27             record_hls off;#on, off
     28             record_hls_segment_duration 10; #unit s
     29         }
     30     }
     31 }```
matiaspl commented 2 years ago

Duplicate of #36

liyitong5 commented 1 year ago

我的SLS日志也有这个报错,不清楚是啥问题

truedei commented 4 months ago

参考: https://blog.csdn.net/qq_17623363/article/details/137863559?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22137863559%22%2C%22source%22%3A%22qq_17623363%22%7D