Closed
Description
Description
obs starts pushing a new stream (session mode). The first time does not trigger the on_dvr callback function. The second time, the callback function is triggered after clicking on start streaming, not waiting for the stop streaming to trigger the callback function.
Please describe the issue you are facing.
- SRS Version:
docker srs:3
- SRS Logs:
- Logs for the first streaming attempt.
connected stream, tcUrl=rtmp://192.168.0.120/testsrs, pageUrl=, swfUrl=rtmp://192.168.0.120/testsrs, schema=rtmp, vhost=defaultVhost, port=1935, app=testsrs, stream=78911, param=, args=null
[2020-02-13 07:56:00.481][Trace][1][682] source url=/testsrs/78911, ip=192.168.0.111, cache=1, is_edge=0, source_id=-1[-1]
[2020-02-13 07:56:00.533][Trace][1][682] hls: win=60000ms, frag=10000ms, prefix=, path=./objs/nginx/html, m3u8=[app]/[stream].m3u8, ts=[app]/[stream]-[seq].ts, aof=2.00, floor=0, clean=1, waitk=1, dispose=0ms, dts_directly=1
[2020-02-13 07:56:00.533][Trace][1][682] dvr stream 78911 to file ./objs/nginx/html/testsrs/78911.1581580560533.flv
[2020-02-13 07:56:00.533][Trace][1][682] ignore disabled exec for vhost=defaultVhost
[2020-02-13 07:56:00.533][Trace][1][682] http: mount flv stream for sid=/testsrs/78911, mount=/testsrs/78911.flv
[2020-02-13 07:56:00.533][Trace][1][682] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=0
[2020-02-13 07:56:00.586][Trace][1][682] got metadata, width=1092, height=614
[2020-02-13 07:56:01.272][Trace][1][682] 7B audio sh, codec(10, profile=LC, 2channels, 0kbps, 44100HZ), flv(16bits, 2channels, 44100HZ)
[2020-02-13 07:56:01.281][Trace][1][682] 46B video sh, codec(7, profile=High, level=3.1, 1104x624, 0kbps, 0.0fps, 0.0s)
[2020-02-13 07:56:20.532][Trace][1][682] <- CPB time=0, okbps=1,0,0, ikbps=2654,0,0, mr=0/350, p1stpt=20000, pnt=5000
[2020-02-13 07:56:21.633][Trace][1][682] -> HLS time=21257540ms, sno=2, ts=78911-1.ts, dur=0.00, dva=3633p
[2020-02-13 07:56:25.533][Trace][1][682] <- CPB time=19257424, okbps=1,0,0, ikbps=2639,0,0, mr=0/350, p1stpt=20000, pnt=5000
[2020-02-13 07:56:35.538][Trace][1][682] <- CPB time=29551511, okbps=0,1,0, ikbps=2638,2574,0, mr=0/350, p1stpt=20000, pnt=5000
[2020-02-13 07:56:45.538][Trace][1][682] <- CPB time=39701998, okbps=0,1,0, ikbps=2636,2574,0, mr=0/350, p1stpt=20000, pnt=5000
- Logs for the first streaming attempt.
- Logs for the second streaming attempt (on_dvr triggered right from the beginning).
[2020-02-13 07:58:25.950][Trace][1][684] connected stream, tcUrl=rtmp://192.168.0.120/testsrs, pageUrl=, swfUrl=rtmp://192.168.0.120/testsrs, schema=rtmp, vhost=defaultVhost, port=1935, app=testsrs, stream=78911, param=, args=null
[2020-02-13 07:58:25.951][Trace][1][684] source url=/testsrs/78911, ip=192.168.0.111, cache=1, is_edge=0, source_id=-1[-1]
[2020-02-13 07:58:26.003][Trace][1][684] hls: win=60000ms, frag=10000ms, prefix=, path=./objs/nginx/html, m3u8=[app]/[stream].m3u8, ts=[app]/[stream]-[seq].ts, aof=2.00, floor=0, clean=1, waitk=1, dispose=0ms, dts_directly=1
[2020-02-13 07:58:26.003][Trace][1][684] dvr stream 78911 to file ./objs/nginx/html/testsrs/78911.1581580706003.flv
[2020-02-13 07:58:26.003][Trace][1][684] ignore disabled exec for vhost=defaultVhost
[2020-02-13 07:58:26.003][Trace][1][684] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=0
[2020-02-13 07:58:26.010][Trace][1][684] http hook on_dvr success. client_id=682, url=http://192.168.0.106:8888/getdvr, request={"action":"on_dvr","client_id":682,"ip":"192.168.0.111","vhost":"defaultVhost","app":"testsrs","stream":"78911","param":"","cwd":"/usr/local/srs","file":"./objs/nginx/html/testsrs/78911.1581580560533.flv"}, response=0
[2020-02-13 07:58:26.052][Trace][1][684] got metadata, width=1092, height=614
[2020-02-13 07:58:26.739][Trace][1][684] 7B audio sh, codec(10, profile=LC, 2channels, 0kbps, 44100HZ), flv(16bits, 2channels, 44100HZ)
[2020-02-13 07:58:26.743][Trace][1][684] 46B video sh, codec(7, profile=High, level=3.1, 1104x624, 0kbps, 0.0fps, 0.0s)
[2020-02-13 07:58:26.763][Trace][1][684] -> HLS time=145595317ms, sno=10, ts=78911-9.ts, dur=0.00, dva=0p
Describe your expectation:
The first call was successful, but it does not match the functionality described in the documentation. It should trigger a callback when the start button is clicked.
TRANS_BY_GPT3