[FFmpeg-trac] #9527(ffmpeg:new): process freezes rtsp remux hls (cur_dts is invalid st:0 )

FFmpeg trac at avcodec.org
Wed Nov 24 06:59:47 EET 2021


#9527: process freezes rtsp remux hls (cur_dts is invalid st:0 )
----------------------------------------+----------------------------------
             Reporter:  Eugene          |                    Owner:  (none)
                 Type:  defect          |                   Status:  new
             Priority:  important       |                Component:  ffmpeg
              Version:  git-master      |               Resolution:
             Keywords:  rtsp remux hls  |               Blocked By:
             Blocking:                  |  Reproduced by developer:  0
Analyzed by developer:  0               |
----------------------------------------+----------------------------------
Description changed by Eugene:

Old description:

> Summary of the bug:
> I park streams from ip cameras over rtsp and remux them to hls.
> I have several cameras from which ffmpeg cannot do remux in hls or
> mpegts.
> It looks like the process freezes and does nothing
>
> I run approximately the following command
> {{{
> ffmpeg -loglevel debug  -rtsp_transport tcp -stimeout 10000000
> -use_wallclock_as_timestamps 1 -copytb 1 -i
> rtsp://admin:123456@127.0.0.1:5554/profile2 -ss 1-vsync -1 -map 0:0 -c:v
> copy -map 0:1 -c:a aac -async 1 -f hls -use_localtime 1 -hls_time 2
> -hls_list_size 5 -hls_flags delete_segments+second_level_segment_index
> -hls_segment_filename %M%S_%%03d.ts ffmpeg-index.m3u8 -report
> }}}
>

> there are a lot of such errors in the output
> {{{
> cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless
> if it occurs once at the start per stream)
> cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless
> if it occurs once at the start per stream)
> cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless
> if it occurs once at the start per stream)
> cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless
> if it occurs once at the start per stream)
> cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless
> if it occurs once at the start per stream)
> cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless
> if it occurs once at the start per stream)
> cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless
> if it occurs once at the start per stream)
>
> }}}
>
> mux does not start, while it is possible to send ffmpeg to the SIGTERM
> process, then it ends and at the same time muxes the last data that was
> in the buffer. ts chunks and an index file appear in the directory.
>
> I also recorded a minute fragment in TS format, errors are reproduced
> bug_808.ts
>
> {{{
> ffmpeg -re -loglevel debug   -i bug_808.ts -vsync -1 -map 0:0 -c:v copy
> -map 0:1 -c:a aac -async 1 -f hls -use_localtime 1 -hls_time 2
> -hls_list_size 5 -hls_flags delete_segments+second_level_segment_index
> -hls_segment_filename %M%S_%%03d.ts ffmpeg-index.m3u8
> }}}
>
> I checked on the build from here
> https://www.johnvansickle.com/ffmpeg/
> git master: built on 20211117

New description:

 Summary of the bug:
 I park streams from ip cameras over rtsp and remux them to hls.
 I have several cameras from which ffmpeg cannot do remux in hls or mpegts.
 It looks like the process freezes and does nothing

 I run approximately the following command
 {{{
 ffmpeg -loglevel debug  -rtsp_transport tcp -stimeout 10000000
 -use_wallclock_as_timestamps 1 -copytb 1 -i
 rtsp://admin:123456@127.0.0.1:5554/profile2 -ss 1-vsync -1 -map 0:0 -c:v
 copy -map 0:1 -c:a aac -async 1 -f hls -use_localtime 1 -hls_time 2
 -hls_list_size 5 -hls_flags delete_segments+second_level_segment_index
 -hls_segment_filename %M%S_%%03d.ts ffmpeg-index.m3u8 -report
 }}}


 there are a lot of such errors in the output
 {{{
 cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless
 if it occurs once at the start per stream)
 cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless
 if it occurs once at the start per stream)
 cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless
 if it occurs once at the start per stream)
 cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless
 if it occurs once at the start per stream)
 cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless
 if it occurs once at the start per stream)
 cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless
 if it occurs once at the start per stream)
 cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless
 if it occurs once at the start per stream)

 }}}

 mux does not start, while it is possible to send ffmpeg to the SIGTERM
 process, then it ends and at the same time muxes the last data that was in
 the buffer. ts chunks and an index file appear in the directory.

 I also recorded a minute fragment in TS format, errors are reproduced
 bug_808.ts
 file by link https://yadi.sk/d/Jy-HzMixINRNMQ


 {{{
 ffmpeg -re -loglevel debug   -i bug_808.ts -vsync -1 -map 0:0 -c:v copy
 -map 0:1 -c:a aac -async 1 -f hls -use_localtime 1 -hls_time 2
 -hls_list_size 5 -hls_flags delete_segments+second_level_segment_index
 -hls_segment_filename %M%S_%%03d.ts ffmpeg-index.m3u8
 }}}

 I checked on the build from here
 https://www.johnvansickle.com/ffmpeg/
 git master: built on 20211117

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9527#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list