I utilize m3u8-segmenter to segment hls ts file with little change(i change it to work for streaming input instead of file input, and add things like data management), it works fine for mpeg stream, but bad for h264 stream, stable error occurs. the output is like the following:
[h264 @ 0xb7e351b0] non-existing PPS 0 referenced
[h264 @ 0xb7e351b0] non-existing PPS 0 referenced
[h264 @ 0xb7e351b0] decode_slice_header error
[h264 @ 0xb7e351b0] no frame!
[h264 @ 0xb7e351b0] non-existing PPS 0 referenced
[h264 @ 0xb7e351b0] non-existing PPS 0 referenced
[h264 @ 0xb7e351b0] decode_slice_header error
[h264 @ 0xb7e351b0] no frame!
[h264 @ 0xb7e351b0] mmco: unref short failure
[h264 @ 0xb7e351b0] mmco: unref short failure
[h264 @ 0xb7e351b0] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one
Output #0, mpegts, to '/data/hls_root/live':
Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 720x576, q=2-31, 25 tbc
Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 120 kb/s
[mpegts @ 0xb7e58bd0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0xb7e58bd0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Ignoring attempt to set invalid timebase 1/0 for st:1
live: first_segment = 1
live: last_segment = 0
live: first_segment = 1
live: last_segment = 1
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031503020 >= 5031494020
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031503020 >= 5031494020
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031503020 >= 5031490420
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031503020 >= 5031492220
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031503020 >= 5031495820
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031503020 >= 5031497620
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031503020 >= 5031499420
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031515620 >= 5031508420
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031515620 >= 5031510220
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031515620 >= 5031504820
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031515620 >= 5031506620
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031515620 >= 5031512020
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031515620 >= 5031513820
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031530020 >= 5031522820
Warning: Could not write frame of stream, discarding one packet
[mpegts @ 0xb7e58bd0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 5031530020 >= 5031524620
I have seen the author published problems like this, but didn't find any solution on the internet, i wonder if the problem had been solved? or the problem does not lie in the m3u8-segmenter, but the input stream itself?