2bc4 / twitch-hls-client

Minimal CLI client for watching/recording Twitch streams
GNU General Public License v3.0
22 stars 5 forks source link

Timestamp errors when piping into mpv #32

Closed brian6932 closed 4 months ago

brian6932 commented 5 months ago

When piping into mpv I often get the following errors

[   6.058][w][ad] Invalid audio PTS: 4.000667 -> 2.016667
[   6.325][w][cplayer] Invalid video timestamp: 3.967000 -> 2.000000
[   2.974][d][vo/gpu-next/libplacebo] First frame received with non-zero PTS 1760.032000
[  66.003][w][ffmpeg/demuxer] mpegts: Packet corrupt (stream = 1, dts = 183415410).

I'm not doing any proxying

I don't experience it when opening the hls playlist directly in mpv, or when using streamlink It also seems that whenever this gets logged, some (output) frames get dropped in mpv, no matter the settings used

2bc4 commented 5 months ago

Jumping back in time is a bug unless the request times out and it rewrites the segment. I do know of a bug where streams with lower view counts can repeat segments for some reason, I've been trying to track that down for a while. fixed

Jumping forward in time is to be expected since this isn't (yet?) a full HLS parser and can't really handle that. not anymore

brian6932 commented 5 months ago

Seems like e7f47b6055d429c0d1f9708d6fa200ac17b20760 fixed the Dropped (output) frames, but I do still get the same errors logged to console sometimes

2bc4 commented 5 months ago

I'm seeing it jump forward but not backwards anymore. Might be time to write a full HLS parser.

2bc4 commented 5 months ago

Should be better now? It should only jump ahead now if it can't find the next segment.