q191201771 / lal

🔥 Golang audio/video live streaming lib/client/server. support RTMP, RTSP(RTP/RTCP), HLS, HTTP[S]/WebSocket-FLV/TS, GB28181, H264/H265/AAC/G711/OPUS, relay, cluster, record, HTTP Notify/API/UI. 直播
https://pengrl.com/lal
MIT License
2.79k stars 468 forks source link

API控制lal从远端拉rtsp流至本地找不到flv直播流 #261

Closed SLoSnow9879 closed 1 year ago

SLoSnow9879 commented 1 year ago

你好,我刚接触视频流这块的知识,想实现一套系统可以在web前端看到内网中所有摄像头的画面,我这边实现了一个后台,前端将摄像头的rtsp地址发后台,后台通过提供的API控制lal拉取rtsp流,但发现拉回来后在lal_record目录下有hls和flv两个目录,其中hls里面有stream_name的子目录,子目录里面有hls格式的直播流和录播流,但在flv目录下只有stream-timestamp.flv的文件,看配置文件这个应该是flv的录播文件,没有看到直播流文件,想问下是哪里操作的不对吗?谢谢! 这是我的配置文件:

{ "# doc of config": "https://pengrl.com/lal/#/ConfigBrief", "conf_version": "v0.4.1", "rtmp": { "enable": true, "addr": ":1935", "rtmps_enable": false, "rtmps_addr": ":4935", "rtmps_cert_file": "./conf/cert.pem", "rtmps_key_file": "./conf/key.pem", "gop_num": 0, "single_gop_max_frame_num": 0, "merge_write_size": 0 }, "in_session": { "add_dummy_audio_enable": false, "add_dummy_audio_wait_audio_ms": 150 }, "default_http": { "http_listen_addr": ":8080", "https_listen_addr": ":4433", "https_cert_file": "./conf/cert.pem", "https_key_file": "./conf/key.pem" }, "httpflv": { "enable": true, "enable_https": false, "url_pattern": "/", "gop_num": 0, "single_gop_max_frame_num": 0 }, "hls": { "enable": true, "enable_https": true, "url_pattern": "/hls/", "out_path": "./lal_record/hls/", "fragment_duration_ms": 3000, "fragment_num": 6, "delete_threshold": 6, "cleanup_mode": 1, "use_memory_as_disk_flag": false, "sub_session_timeout_ms": 30000, "sub_session_hash_key": "" }, "httpts": { "enable": true, "enable_https": true, "url_pattern": "/", "gop_num": 0, "single_gop_max_frame_num": 0 }, "rtsp": { "enable": true, "addr": ":5544", "rtsps_enable": false, "rtsps_addr": ":5322", "rtsps_cert_file": "./conf/cert.pem", "rtsps_key_file": "./conf/key.pem", "out_wait_key_frame_flag": true, "auth_enable": false, "auth_method": 1, "username": "q191201771", "password": "pengrl" }, "record": { "enable_flv": true, "flv_out_path": "./lal_record/flv/", "enable_mpegts": false, "mpegts_out_path": "./lal_record/mpegts" }, "relay_push": { "enable": false, "addr_list":[ ] }, "static_relay_pull": { "enable": false, "addr": "" }, "http_api": { "enable": true, "addr": ":8083" }, "server_id": "1", "http_notify": { "enable": false, "update_interval_sec": 5, "on_update": "http://127.0.0.1:10101/on_update", "on_pub_start": "http://127.0.0.1:10101/on_pub_start", "on_pub_stop": "http://127.0.0.1:10101/on_pub_stop", "on_sub_start": "http://127.0.0.1:10101/on_sub_start", "on_sub_stop": "http://127.0.0.1:10101/on_sub_stop", "on_relay_pull_start": "http://127.0.0.1:10101/on_relay_pull_start", "on_relay_pull_stop": "http://127.0.0.1:10101/on_relay_pull_stop", "on_rtmp_connect": "http://127.0.0.1:10101/on_rtmp_connect", "on_server_start": "http://127.0.0.1:10101/on_server_start", "on_hls_make_ts": "http://127.0.0.1:10101/on_hls_make_ts" }, "simple_auth": { "key": "q191201771", "dangerous_lal_secret": "pengrl", "pub_rtmp_enable": false, "sub_rtmp_enable": false, "sub_httpflv_enable": false, "sub_httpts_enable": false, "pub_rtsp_enable": false, "sub_rtsp_enable": false, "hls_m3u8_enable": false }, "pprof": { "enable": true, "addr": ":8084" }, "log": { "level": 1, "filename": "./logs/lalserver.log", "is_to_stdout": true, "is_rotate_daily": true, "short_file_flag": true, "timestamp_flag": true, "timestamp_with_ms_flag": true, "level_flag": true, "assert_behavior": 1 }, "debug": { "log_group_interval_sec": 30, "log_group_max_group_num": 10, "log_group_max_sub_num_per_group": 10 } }

q191201771 commented 1 year ago

flv文件是flv录制功能的。 flv的直播功能不需要生成flv文件,直接是内存数据网络发送。