Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http protocol Skip few seconds when internet connection is bad #72

Closed
ghaith100994 opened this issue Aug 19, 2021 · 13 comments
Closed

http protocol Skip few seconds when internet connection is bad #72

ghaith100994 opened this issue Aug 19, 2021 · 13 comments

Comments

@ghaith100994
Copy link

ghaith100994 commented Aug 19, 2021

if streaming and connection to Internet is Bad and after grouped dropped frames
then the connection will restart with current time + some seconds

[02.18.17.543] [#1] [Demuxer: Video] Stopped -> Running
[02.18.17.545] [#1] [Decoder: Video] Stopped -> Running
[02.18.17.550] [#1] [Demuxer: Video] [Thread] Started (Running)
[02.18.17.552] [#1] [Decoder: Audio] Stopped -> Running
[02.18.17.556] [#1] [Decoder: Video] [Thread] Started (Running)
[02.18.17.562] [#1] [Decoder: Audio] [Thread] Started (Running)
[02.18.17.579] [#1] [Demuxer:  Subs] Stopped -> Opening
[02.18.17.583] [#1] [Demuxer:  Subs] 
[Format  ] SubRip subtitle/srt |  00:00:00/00:00:00 | [Seekable: True]
[Subs  #0] subrip | [BR: 0] | -10675199.02:48:05.4775808/-10675199.02:48:05.4775808 | 00:00:00/-10675199.02:48:05.4775808
[02.18.17.585] [#1] [Demuxer:  Subs] Opening -> Stopped
[02.18.17.587] [#1] [Decoder:  Subs] Stopped -> Opening
[02.18.17.589] [#1] [Demuxer:  Subs] [Subs #0] Enabled
[02.18.17.590] [#1] [Decoder:  Subs] Opening -> Stopped
[02.18.17.593] [#1] [Demuxer:  Subs] [SEEK(<-)] Requested at 00:00:00.0130000
[02.18.17.595] [#1] [Demuxer:  Subs] [SEEK] Failed 1/2 (retrying) Result too large (-34)
[02.18.17.599] [#1] [Demuxer:  Subs] Stopped -> Running
'FlyleafPlayer.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App\5.0.8\System.IO.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
[02.18.17.610] [#1] [Demuxer:  Subs] [Thread] Started (Running)
[02.18.17.610] [#1] [Decoder:  Subs] Stopped -> Running
[02.18.17.614] [#1] [Player] [SubtitlePlugin] DefaultExternal
The thread 0x8230 has exited with code 0 (0x0).
[02.18.17.616] [#1] [Decoder:  Subs] [Thread] Started (Running)
[02.18.17.633] [#1] [Player] Drop AFrame  00:00:00
[02.18.17.646] [#1] [Player] Drop AFrame  00:00:00.0213333
[02.18.17.658] [#1] [Player] Drop AFrame  00:00:00.0426666
[02.18.17.671] [#1] [Player] Drop AFrame  00:00:00.0640000
[02.18.17.683] [#1] [Player] Drop AFrame  00:00:00.0853333
[02.18.17.696] [#1] [Player] Drop AFrame  00:00:00.1066666
[02.18.17.720] [#1] [Player] [SCREAMER] Buffering Done
[02.18.17.727] [#1] [Player] [SCREAMER] Started -> 00:00:00.1280000 | [V: 00:00:00.1951222] [A: 00:00:00.1280000]
[02.18.18.627] [#1] [Player] [SCREAMER] No video frames
[02.18.18.630] [#1] [Player] [SCREAMER] Buffering ...
[02.18.27.603] [#1] [Demuxer: Video] Read Timeout !!!! 10038 ms
[02.18.27.620] [#1] [Player] Drop AFrame  00:00:01.0240000
[02.18.28.454] [FFmpeg] [mpegts @ 123b8c40] PES packet size mismatch
[02.18.28.460] [FFmpeg] [mpegts @ 123b8c40] Packet corrupt (stream = 1, dts = 101351)
[02.18.28.468] [FFmpeg] [mpegts @ 123b8c40] , dropping it.
[02.18.28.508] [#1] [Player] [SCREAMER] Buffering Done
[02.18.28.511] [#1] [Player] [SCREAMER] Started -> 00:00:01.0453333 | [V: 00:00:01.1132888] [A: 00:00:01.0453333]
[02.18.28.705] [#1] [Player] [SCREAMER] Restarting ... (HLS?) 1 | + 00:00:09.6600000
[02.18.28.721] [#1] [Player] [SCREAMER] Buffering ...
[02.18.28.725] [#1] [Player] Drop AFrame  00:00:10.9226666
[02.18.28.737] [#1] [Player] Drop AFrame  00:00:10.9440000
[02.18.28.750] [#1] [Player] Drop AFrame  00:00:10.9653333
[02.18.28.762] [#1] [Player] Drop AFrame  00:00:10.9866666
[02.18.28.779] [#1] [Player] Drop AFrame  00:00:11.0080000
[02.18.28.797] [#1] [Player] Drop AFrame  00:00:11.0293333
[02.18.28.811] [#1] [Player] Drop AFrame  00:00:11.0506666
[02.18.28.835] [#1] [Player] [SCREAMER] Buffering Done
[02.18.28.837] [#1] [Player] [SCREAMER] Started -> 00:00:11.0720000 | [V: 00:00:11.1232888] [A: 00:00:11.0720000]
[02.18.30.096] [#1] [Player] -=-=-= 20 -=-=-=
[02.18.30.098] [#1] [Player] aDistanceMs 2 |-> -20
[02.18.30.138] [#1] [Player] [SCREAMER] No video frames
[02.18.30.141] [#1] [Player] [SCREAMER] Buffering ...
[02.18.32.621] [#1] [Player] Drop AFrame  00:00:12.3733333
[02.18.32.645] [#1] [Player] [SCREAMER] Stopped
[02.18.32.647] [#1] [Player] [SCREAMER] Finished -> 00:00:12.4162555
[02.18.32.662] [#1] [Decoder: Video] Pausing -> Paused
[02.18.32.683] [#1] [Decoder: Audio] Pausing -> Paused
[02.18.32.705] [#1] [Decoder:  Subs] Pausing -> Paused
[02.18.32.709] [#1] [Demuxer: Video] Running -> Pausing
[02.18.32.744] [#1] [Demuxer: Video] Read Interrupt (Pausing) !!!
[02.18.32.747] [#1] [Demuxer: Video] Pausing -> Paused
[02.18.32.750] [#1] [Demuxer:  Subs] Pausing -> Paused
@SuRGeoNix
Copy link
Owner

SuRGeoNix commented Aug 19, 2021

That's live stream right? It's normal, imagine that when someone is streaming a live video the cache might be small eg. 5 seconds. So you always go to the end of the stream when you restart. You can increase MaxQueueSize and MinQueueSize to ensure more buffering before playing.

@ghaith100994
Copy link
Author

yes it is live stream
it's stream from wowza streaming engine (Video on demand) Apple HLS (HTTP Live Streaming)
so When some thing happened wrong then it should restart on the moment the stream ended

@SuRGeoNix
Copy link
Owner

SuRGeoNix commented Aug 19, 2021

Imagine you watching a live stream and it is caching 10 seconds and you start at the very end of the stream and you pause for 20 seconds. If your flyleaf buffer is configured for 5 seconds and you start playing again, it will play the 5 seconds and then it will start receiving again from the HLS cache (that why you see the +9 seconds in the logs). HLS live seeking is still new, So possible there are still issues there. Not sure what subs had to do with the HLS live thought?!

@ghaith100994
Copy link
Author

Can We Reopen this Case
I have Recorded Video To See the case
https://drive.google.com/file/d/1WLxJTGVhv2-nTSW1rGZvYSw1_c7TCFcw/view

[02.32.34.225] [#1] [Demuxer: Video] Opening -> Stopped
[02.32.34.230] [#1] [Decoder: Video] Stopped -> Opening
[02.32.34.234] [#1] [Decoder: Video] [VA] Success
[02.32.34.237] [#1] [Renderer] Present! 0
[02.32.34.239] [#1] [Demuxer: Video] [Stream #1] Enables program #0
[02.32.34.242] [#1] [Demuxer: Video] [Video #1] Enabled
[02.32.34.243] [#1] [Decoder: Video] Opening -> Stopped
[02.32.34.245] [#1] [DecoderContext] [VideoStream] #_ => #1
[02.32.34.250] [#1] [Plugin: StreamSuggester] [Audio] based on language
[02.32.34.252] [#1] [Decoder: Audio] Stopped -> Opening
[02.32.34.258] [#1] [Demuxer: Video] [Stream #2] Program already enabled
[02.32.34.260] [#1] [Demuxer: Video] [Audio #2] Enabled
[02.32.34.261] [#1] [Decoder: Audio] Opening -> Stopped
[02.32.34.264] [#1] [AudioPlayer] Initializing
[02.32.34.265] [#1] [AudioPlayer] Disposed
[02.32.34.275] [#1] [DecoderContext] [AudioStream] #_ => #2
[02.32.34.296] [#1] [Player] [SCREAMER] Buffering ...
[02.32.34.298] [#1] [Demuxer: Video] Stopped -> Running
[02.32.34.300] [#1] [Decoder: Video] Stopped -> Running
[02.32.34.307] [#1] [Demuxer: Video] [Thread] Started (Running)
[02.32.34.307] [#1] [Decoder: Audio] Stopped -> Running
[02.32.34.315] [#1] [Decoder: Video] [Thread] Started (Running)
[02.32.34.323] [#1] [Decoder: Audio] [Thread] Started (Running)
[02.32.34.364] [#1] [Player] Drop AFrame 00:00:00
[02.32.34.366] [#1] [Player] Drop AFrame 00:00:00.0213333
[02.32.34.367] [#1] [Player] Drop AFrame 00:00:00.0426666
[02.32.34.369] [#1] [Player] Drop AFrame 00:00:00.0640000
[02.32.34.370] [#1] [Player] Drop AFrame 00:00:00.0853333
[02.32.34.371] [#1] [Player] Drop AFrame 00:00:00.1066666
[02.32.34.383] [#1] [Player] [SCREAMER] Buffering Done
[02.32.34.385] [#1] [Player] [SCREAMER] Started -> 00:00:00.1280000 | [V: 00:00:00.1951222] [A: 00:00:00.1280000]
[02.32.37.788] [#1] [Player] [SCREAMER] No video frames
[02.32.37.789] [#1] [Player] [SCREAMER] Buffering ...
[02.32.37.993] [#1] [Player] Drop AFrame 00:00:03.5200000
[02.32.37.995] [#1] [Player] Drop AFrame 00:00:03.5413333
[02.32.47.093] [#1] [Player] [SCREAMER] Buffering Done
[02.32.47.100] [#1] [Player] [SCREAMER] Started -> 00:00:03.5626666 | [V: 00:00:03.6147888] [A: 00:00:03.5626666]
[02.32.50.947] [#1] [Player] [SCREAMER] No video frames
[02.32.50.949] [#1] [Player] [SCREAMER] Buffering ...
[02.33.04.952] [#1] [Player] [SCREAMER] Buffering Done
[02.33.04.953] [#1] [Player] [SCREAMER] Started -> 00:00:07.4240000 | [V: 00:00:07.4936666] [A: 00:00:07.4240000]
The thread 0x86d8 has exited with code 0 (0x0).
[02.33.06.650] [#1] [Player] [SCREAMER] No video frames
[02.33.06.652] [#1] [Player] [SCREAMER] Buffering ...
[02.33.17.587] [#1] [Player] [SCREAMER] Buffering Done
[02.33.17.589] [#1] [Player] [SCREAMER] Started -> 00:00:09.1520000 | [V: 00:00:09.2042888] [A: 00:00:09.1520000]
[02.33.19.600] [#1] [Player] [SCREAMER] No video frames
[02.33.19.602] [#1] [Player] [SCREAMER] Buffering ...
[02.33.22.581] [#1] [Player] Drop AFrame 00:00:11.1360000
[02.33.22.582] [#1] [Player] Drop AFrame 00:00:11.1573333
[02.33.24.839] [FFmpeg] [http @ 000001ac700f9a40] Stream ends prematurely at 484720, should be 2318604
[02.33.24.946] [FFmpeg] [mpegts @ 000001ac70140600] PES packet size mismatch
[02.33.24.947] [FFmpeg] [mpegts @ 000001ac70140600] Packet corrupt (stream = 1, dts = 1036035)
[02.33.24.948] [FFmpeg] [mpegts @ 000001ac70140600] , dropping it.
[02.33.24.967] [#1] [Player] [SCREAMER] Buffering Done
[02.33.24.969] [#1] [Player] [SCREAMER] Started -> 00:00:11.1786666 | [V: 00:00:11.2481222] [A: 00:00:11.1786666]
[02.33.25.412] [#1] [Player] [SCREAMER] Restarting ... (HLS?) | Distance: 00:00:09.2410000
[02.33.25.413] [#1] [Player] [SCREAMER] Buffering ...
[02.33.25.415] [#1] [Player] Drop AFrame 00:00:20.8853333
[02.33.25.416] [#1] [Player] Drop AFrame 00:00:20.9066666
[02.33.25.418] [#1] [Player] Drop AFrame 00:00:20.9280000
[02.33.25.420] [#1] [Player] Drop AFrame 00:00:20.9493333
[02.33.25.421] [#1] [Player] Drop AFrame 00:00:20.9706666
[02.33.25.423] [#1] [Player] Drop AFrame 00:00:20.9920000
[02.33.25.424] [#1] [Player] Drop AFrame 00:00:21.0133333
[02.33.25.436] [#1] [Player] [SCREAMER] Buffering Done
[02.33.25.438] [#1] [Player] [SCREAMER] Started -> 00:00:21.0346666 | [V: 00:00:21.0905888] [A: 00:00:21.0346666]
[02.33.28.286] [#1] [Player] [SCREAMER] No video frames
[02.33.28.288] [#1] [Player] [SCREAMER] Buffering ...
[02.33.29.031] [#1] [Player] [SCREAMER] Stopped
[02.33.29.032] [#1] [Player] MediaBuffer() no video frame
[02.33.29.034] [#1] [Player] [SCREAMER] Finished -> 00:00:23.0391150
[02.33.29.036] [#1] [Decoder: Video] Running -> Pausing
[02.33.29.038] [#1] [Decoder: Video] Pausing -> Paused
[02.33.29.053] [#1] [Decoder: Audio] Pausing -> Paused
[02.33.29.055] [#1] [Demuxer: Video] Running -> Pausing
[02.33.29.081] [#1] [Demuxer: Video] Read Interrupt (Pausing) !!!
[02.33.29.083] [#1] [Demuxer: Video] Read Interrupt (Pausing) !!!
[02.33.29.084] [#1] [Demuxer: Video] Read Interrupt (Pausing) !!!
[02.33.29.086] [FFmpeg] [mpegts @ 000001ac70140600] PES packet size mismatch
[02.33.29.087] [FFmpeg] [mpegts @ 000001ac70140600] Packet corrupt (stream = 1, dts = 2184683)
[02.33.29.088] [FFmpeg] [mpegts @ 000001ac70140600] , dropping it.
[02.33.29.090] [#1] [Demuxer: Video] Pausing -> Paused
The thread 0x8ee0 has exited with code 0 (0x0).
[02.33.29.754] [#1] [Demuxer: Video] [SEEK(->)] Requested at 00:00:12.5740000
[02.33.29.760] [FFmpeg] [hls @ 000001ac701240c0] maybe the m3u8 list sequence have been wraped.
[02.33.36.136] [#1] [DecoderContext] 00:00:10.5110888 | pts -> 945998
The thread 0x468c has exited with code 0 (0x0).
[02.33.36.169] [#1] [Demuxer: Video] [SEEK(->)] Requested at 00:00:00
[02.33.36.171] [#1] [Player] [SCREAMER] Buffering ...
[02.33.36.172] [FFmpeg] [hls @ 000001ac701240c0] maybe the m3u8 list sequence have been wraped.
[02.33.37.399] [#1] [Player] Drop AFrame 00:00:00.0853333
[02.33.37.401] [#1] [Player] Drop AFrame 00:00:00.1066666
[02.33.37.413] [#1] [Player] [SCREAMER] Buffering Done
[02.33.37.415] [#1] [Player] [SCREAMER] Started -> 00:00:00.1280000 | [V: 00:00:00.1951222] [A: 00:00:00.1280000]
[02.33.40.818] [#1] [Player] [SCREAMER] No video frames
[02.33.40.820] [#1] [Player] [SCREAMER] Buffering ...
[02.33.41.171] [#1] [Player] Drop AFrame 00:00:03.5200000
[02.33.41.174] [#1] [Player] Drop AFrame 00:00:03.5413333
[02.33.48.774] [#1] [Player] [SCREAMER] Buffering Done
[02.33.48.775] [#1] [Player] [SCREAMER] Started -> 00:00:03.5626666 | [V: 00:00:03.6147888] [A: 00:00:03.5626666]
[02.33.52.457] [#1] [Player] [SCREAMER] No video frames
[02.33.52.458] [#1] [Player] [SCREAMER] Buffering ...
[02.33.52.591] [#1] [Player] Drop AFrame 00:00:07.2320000
[02.33.52.592] [#1] [Player] Drop AFrame 00:00:07.2533333
The thread 0x378c has exited with code 0 (0x0).
The thread 0x84b4 has exited with code 0 (0x0).
[02.34.07.761] [#1] [Player] [SCREAMER] Buffering Done
[02.34.07.762] [#1] [Player] [SCREAMER] Started -> 00:00:07.2746666 | [V: 00:00:07.3265444] [A: 00:00:07.2746666]
[02.34.09.483] [#1] [Player] [SCREAMER] No video frames
[02.34.09.485] [#1] [Player] [SCREAMER] Buffering ...
The thread 0x65ac has exited with code 0 (0x0).
[02.34.22.330] [FFmpeg] [hls @ 000001ac701240c0] maybe the m3u8 list sequence have been wraped.
[02.34.22.395] [#1] [Player] [SCREAMER] Buffering Done
[02.34.22.397] [#1] [Player] [SCREAMER] Started -> 00:00:09.0240000 | [V: 00:00:09.0794555] [A: 00:00:09.0240000]
[02.34.24.537] [#1] [Player] [SCREAMER] No video frames
[02.34.24.538] [#1] [Player] [SCREAMER] Buffering ...
[02.34.26.299] [#1] [Player] Drop AFrame 00:00:11.1360000
[02.34.26.301] [#1] [Player] Drop AFrame 00:00:11.1573333
[02.34.33.309] [FFmpeg] [http @ 000001ac7d13a180] Stream ends prematurely at 608820, should be 2318604
[02.34.33.312] [FFmpeg] [hls @ 000001ac701240c0] maybe the m3u8 list sequence have been wraped.
[02.34.33.374] [FFmpeg] [mpegts @ 000001ac70140600] PES packet size mismatch
[02.34.33.375] [FFmpeg] [mpegts @ 000001ac70140600] Packet corrupt (stream = 1, dts = 1066065)
[02.34.33.376] [FFmpeg] [mpegts @ 000001ac70140600] , dropping it.
[02.34.33.390] [#1] [Player] [SCREAMER] Buffering Done
[02.34.33.392] [#1] [Player] [SCREAMER] Started -> 00:00:11.1786666 | [V: 00:00:11.2481222] [A: 00:00:11.1786666]
[02.34.34.295] [#1] [Player] [SCREAMER] Restarting ... (HLS?) | Distance: 00:00:08.7810000
[02.34.34.296] [#1] [Player] [SCREAMER] Buffering ...
[02.34.34.297] [#1] [Player] Drop AFrame 00:00:20.8853333
[02.34.34.299] [#1] [Player] Drop AFrame 00:00:20.9066666
[02.34.34.301] [#1] [Player] Drop AFrame 00:00:20.9280000
[02.34.34.303] [#1] [Player] Drop AFrame 00:00:20.9493333
[02.34.34.304] [#1] [Player] Drop AFrame 00:00:20.9706666
[02.34.34.305] [#1] [Player] Drop AFrame 00:00:20.9920000
[02.34.34.306] [#1] [Player] Drop AFrame 00:00:21.0133333
[02.34.34.317] [#1] [Player] [SCREAMER] Buffering Done
[02.34.34.319] [#1] [Player] [SCREAMER] Started -> 00:00:21.0346666 | [V: 00:00:21.0905888] [A: 00:00:21.0346666]
[02.34.37.544] [#1] [Player] [SCREAMER] No video frames
[02.34.37.546] [#1] [Player] [SCREAMER] Buffering ...
[02.34.38.906] [#1] [Player] Drop AFrame 00:00:24.2560000
[02.34.42.340] [#1] [Player] [SCREAMER] Buffering Done
[02.34.42.342] [#1] [Player] [SCREAMER] Started -> 00:00:24.2773333 | [V: 00:00:24.3435444] [A: 00:00:24.2773333]
[02.34.47.663] [#1] [Player] [SCREAMER] No video frames
[02.34.47.665] [#1] [Player] [SCREAMER] Buffering ...
[02.34.48.117] [#1] [Player] Drop AFrame 00:00:29.5680000
[02.34.48.119] [#1] [Player] Drop AFrame 00:00:29.5893333
[02.34.48.120] [#1] [Player] Drop AFrame 00:00:29.6106666
[02.34.53.751] [#1] [Player] [SCREAMER] Buffering Done
[02.34.53.753] [#1] [Player] [SCREAMER] Started -> 00:00:29.6320000 | [V: 00:00:29.6832111] [A: 00:00:29.6320000]
[02.34.56.306] [#1] [Player] [SCREAMER] No video frames
[02.34.56.308] [#1] [Player] [SCREAMER] Buffering ...
[02.34.56.440] [#1] [Player] Drop AFrame 00:00:32.1920000
[02.34.56.452] [#1] [Player] [SCREAMER] Buffering Done
[02.34.56.456] [#1] [Player] [SCREAMER] Started -> 00:00:32.2133333 | [V: 00:00:32.2691222] [A: 00:00:32.2133333]
[02.34.58.888] [#1] [Player] [SCREAMER] No video frames
[02.34.58.889] [#1] [Player] [SCREAMER] Buffering ...
[02.34.59.887] [#1] [Player] Drop AFrame 00:00:34.6453333
[02.35.10.146] [#1] [Player] [SCREAMER] Buffering Done
[02.35.10.147] [#1] [Player] [SCREAMER] Started -> 00:00:34.6666666 | [V: 00:00:34.7299222] [A: 00:00:34.6666666]
[02.35.12.252] [#1] [Player] [SCREAMER] No video frames
[02.35.12.253] [#1] [Player] [SCREAMER] Buffering ...
[02.35.12.277] [#1] [Player] Drop AFrame 00:00:36.7573333
[02.35.12.278] [#1] [Player] Drop AFrame 00:00:36.7786666
[02.35.16.723] [#1] [Player] [SCREAMER] Buffering Done
[02.35.16.724] [#1] [Player] [SCREAMER] Started -> 00:00:36.8000000 | [V: 00:00:36.8569222] [A: 00:00:36.8000000]
[02.35.18.616] [#1] [Player] [SCREAMER] No video frames
[02.35.18.618] [#1] [Player] [SCREAMER] Buffering ...
[02.35.19.147] [#1] [Player] Drop AFrame 00:00:38.6773333
[02.35.19.149] [#1] [Player] Drop AFrame 00:00:38.6986666
[02.35.24.686] [#1] [Player] [SCREAMER] Buffering Done
[02.35.24.688] [#1] [Player] [SCREAMER] Started -> 00:00:38.7200000 | [V: 00:00:38.7746222] [A: 00:00:38.7200000]
[02.35.26.744] [#1] [Player] [SCREAMER] No video frames
[02.35.26.746] [#1] [Player] [SCREAMER] Buffering ...
[02.35.27.516] [#1] [Player] Drop AFrame 00:00:40.7893333
[02.35.30.867] [#1] [Player] [SCREAMER] Buffering Done
[02.35.30.868] [#1] [Player] [SCREAMER] Started -> 00:00:40.8106666 | [V: 00:00:40.8610444] [A: 00:00:40.8106666]
[02.35.34.297] [#1] [Player] [SCREAMER] No video frames
[02.35.34.298] [#1] [Player] [SCREAMER] Buffering ...
[02.35.35.223] [#1] [Player] Drop AFrame 00:00:44.2240000
[02.35.35.224] [#1] [Player] Drop AFrame 00:00:44.2453333
[02.35.43.095] [FFmpeg] [http @ 000001ac7d4aa500] Stream ends prematurely at 629260, should be 2351880
[02.35.43.204] [FFmpeg] [mpegts @ 000001ac70140600] PES packet size mismatch
[02.35.43.206] [FFmpeg] [mpegts @ 000001ac70140600] Packet corrupt (stream = 1, dts = 4069065)
[02.35.43.207] [FFmpeg] [mpegts @ 000001ac70140600] , dropping it.
[02.35.43.215] [#1] [Player] [SCREAMER] Buffering Done
[02.35.43.217] [#1] [Player] [SCREAMER] Started -> 00:00:44.2666666 | [V: 00:00:44.3228333] [A: 00:00:44.2666666]
[02.35.44.273] [#1] [Player] [SCREAMER] Restarting ... (HLS?) | Distance: 00:00:07.3680000
[02.35.44.275] [#1] [Player] [SCREAMER] Buffering ...
[02.35.44.277] [#1] [Player] Drop AFrame 00:00:52.7146666
[02.35.44.278] [#1] [Player] Drop AFrame 00:00:52.7360000
[02.35.44.279] [#1] [Player] Drop AFrame 00:00:52.7573333
[02.35.44.281] [#1] [Player] Drop AFrame 00:00:52.7786666
[02.35.44.282] [#1] [Player] Drop AFrame 00:00:52.8000000
[02.35.44.283] [#1] [Player] Drop AFrame 00:00:52.8213333
[02.35.44.284] [#1] [Player] Drop AFrame 00:00:52.8426666
[02.35.44.295] [#1] [Player] [SCREAMER] Buffering Done
[02.35.44.296] [#1] [Player] [SCREAMER] Started -> 00:00:52.8640000 | [V: 00:00:52.9137555] [A: 00:00:52.8640000]
[02.35.46.265] [#1] [Player] [SCREAMER] No video frames
[02.35.46.266] [#1] [Player] [SCREAMER] Buffering ...
[02.35.46.828] [#1] [Player] Drop AFrame 00:00:54.8053333
[02.35.46.829] [#1] [Player] Drop AFrame 00:00:54.8266666
[02.35.51.944] [#1] [Player] [SCREAMER] Buffering Done
[02.35.51.945] [#1] [Player] [SCREAMER] Started -> 00:00:54.8480000 | [V: 00:00:54.9157555] [A: 00:00:54.8480000]
[02.36.12.909] [#1] [Player] [SCREAMER] Finished -> 00:01:14.9213832
[02.36.12.914] [#1] [Decoder: Video] Stopping -> Stopped
[02.36.12.915] [#1] [Decoder: Video] [Thread] Stopped (Stopped)
The thread 0x89cc has exited with code 0 (0x0).
[02.36.12.926] [#1] [Decoder: Video] Stopped -> Stopped
[02.36.12.928] [#1] [Decoder: Video] Disposed
[02.36.12.934] [#1] [Decoder: Audio] Stopping -> Stopped
[02.36.12.935] [#1] [Decoder: Audio] [Thread] Stopped (Stopped)
The thread 0x58bc has exited with code 0 (0x0).
[02.36.12.942] [#1] [Decoder: Audio] Stopped -> Stopped
[02.36.12.943] [#1] [Decoder: Audio] Disposed
[02.36.12.951] [#1] [Demuxer: Video] Stopping -> Stopped
[02.36.12.952] [#1] [Demuxer: Video] [Thread] Stopped (Stopped)
The thread 0x47e0 has exited with code 0 (0x0).
[02.36.12.960] [#1] [Demuxer: Video] Stopped -> Stopped
[02.36.12.961] [#1] [Demuxer: Video] Disposed
The thread 0x2ab4 has exited with code 0 (0x0).
[02.36.12.967] [#1] [Player] [Initializing]
[02.36.12.974] [#1] [Player] [Initialized]
[02.36.12.975] [#1] [Renderer] Present! 0
[02.36.12.982] [#1] [AudioPlayer] Disposed

@SuRGeoNix
Copy link
Owner

  1. Is it a live stream?
  2. How much buffer duration do you have?
  3. What would be the right way to play this?
  4. How can I reproduce it?

I will re-open it and I will try to fix it as far as I will understand the issue!

@ghaith100994
Copy link
Author

1- It is Wowza Video On Demand Http and Is seekable. Not Really live
2- The default buffer duration (even if I put min is 10 seconds and max is 100 seconds it is happened)
3- Stop skipping between 5 and 10 seconds behavior
4- To reproduce
1- Download net Limiter
2- Set Application Limit to 50KB
3- Open the stream and it will happened
note If I done this on VLC or mobile MX Player no Skip will happened
I will send you Video Sample on private to play and test on it

@SuRGeoNix
Copy link
Owner

SuRGeoNix commented Sep 16, 2021

This is issue seems to be with ffmpeg itself. You can see in the logs that every X seconds skip you will get the following error from ffmpeg:

Stream ends prematurely at XX, should be YY

I don't think is an ffmpeg bug you just need to adjust the format options/flags. With a quick look here it seems that you could try the following:

Config.Demuxer.FormatOpt["reconnect_at_eof"] = "1"; // this might crash flyleaf
Config.Demuxer.FormatOpt["reconnect_on_network_error"] = "1";
Config.Demuxer.FormatOpt["reconnect_delay_max"] = 100000; // Sets the maximum delay in seconds after which to give up reconnecting
Config.Demuxer.FormatOpt["multiple_requests"] = "1";

Ideally, if you want to tested with VLC change their settings to use FFmpeg demuxer.
Give it a try and let me know how it goes (as I couldn't tested)

@SuRGeoNix
Copy link
Owner

SuRGeoNix commented Sep 16, 2021

I've tried to reproduce it with a custom delay in the demuxer... There is no issue with hls streams. It will continue exactly from the point that the screamer stopped.
Your stream is not live (would help to send also the opening debug logs)

[05.46.41.705] [#1] [DecoderContext] [VideoInput] None => https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8
[05.46.41.717] [#1] [Player] [SCREAMER] Buffering ...
[05.46.41.719] [#1] [Demuxer: Video] Stopped -> Running
[05.46.41.721] [#1] [Decoder: Video] Stopped -> Running
[05.46.41.728] [#1] [Demuxer: Video] [Thread] Started (Running)
[05.46.41.728] [#1] [Decoder: Audio] Stopped -> Running
[05.46.41.733] [#1] [Decoder: Video] [Thread] Started (Running)
[05.46.41.741] [#1] [Decoder: Audio] [Thread] Started (Running)
[05.46.45.662] [#1] [Player] Drop AFrame  00:00:00.0000001
[05.46.45.664] [#1] [Player] Drop AFrame  00:00:00.0232112
[05.46.45.665] [#1] [Player] Drop AFrame  00:00:00.0464334
The thread 0x393c has exited with code 0 (0x0).
The thread 0x3258 has exited with code 0 (0x0).
[05.47.37.155] [#1] [Player] [SCREAMER] Buffering Done
[05.47.37.156] [#1] [Player] [SCREAMER] Started -> 00:00:00.0696556 | [V: 00:00:00.1364890] [A: 00:00:00.0696556]
[05.47.37.984] [#1] [Player] -=-=-= 5 -=-=-=
[05.47.37.985] [#1] [Player] aDistanceMs 2 |-> -14
[05.47.38.790] [#1] [Player] [SCREAMER] No video frames
[05.47.38.791] [#1] [Player] [SCREAMER] Buffering ...
[05.47.40.259] [#1] [Player] Drop AFrame  00:00:01.6718334
[05.47.40.271] [#1] [Player] Drop AFrame  00:00:01.6950556
[05.48.29.521] [#1] [Player] [SCREAMER] Buffering Done
[05.48.29.523] [#1] [Player] [SCREAMER] Started -> 00:00:01.7182778 | [V: 00:00:01.7714890] [A: 00:00:01.7182778]
[05.48.31.043] [#1] [Player] [SCREAMER] No video frames
[05.48.31.045] [#1] [Player] [SCREAMER] Buffering ...
The thread 0x4a20 has exited with code 0 (0x0).
[05.49.21.109] [#1] [Player] [SCREAMER] Buffering Done
[05.49.21.111] [#1] [Player] [SCREAMER] Started -> 00:00:03.2740112 | [V: 00:00:03.3064890] [A: 00:00:03.2740112]
[05.49.21.133] [#1] [Player] -=-=-= 9 -=-=-=
[05.49.21.134] [#1] [Player] aDistanceMs 2 |-> -21
[05.49.22.611] [#1] [Player] [SCREAMER] No video frames
[05.49.22.612] [#1] [Player] [SCREAMER] Buffering ...
[05.50.12.280] [#1] [Player] [SCREAMER] Buffering Done
[05.50.12.281] [#1] [Player] [SCREAMER] Started -> 00:00:04.8065334 | [V: 00:00:04.8414890] [A: 00:00:04.8065334]
[05.50.13.784] [#1] [Player] [SCREAMER] No video frames
[05.50.13.785] [#1] [Player] [SCREAMER] Buffering ...
[05.50.14.978] [#1] [Player] Drop AFrame  00:00:06.2926112
[05.51.03.855] [#1] [Player] [SCREAMER] Buffering Done
[05.51.03.856] [#1] [Player] [SCREAMER] Started -> 00:00:06.3158334 | [V: 00:00:06.3764890] [A: 00:00:06.3158334]
[05.51.05.384] [#1] [Player] [SCREAMER] No video frames
[05.51.05.385] [#1] [Player] [SCREAMER] Buffering ...
[05.52.02.780] [#1] [Player] [SCREAMER] Buffering Done
[05.52.02.782] [#1] [Player] [SCREAMER] Started -> 00:00:07.8483334 | [V: 00:00:07.9114890] [A: 00:00:07.8483334]
[05.52.04.545] [#1] [Player] [SCREAMER] No video frames
[05.52.04.546] [#1] [Player] [SCREAMER] Buffering ...
[05.52.07.222] [#1] [Player] [SCREAMER] Buffering Done
[05.52.07.223] [#1] [Player] [SCREAMER] Started -> 00:00:09.6130556 | [V: 00:00:09.6794890] [A: 00:00:09.6130556]
[05.52.07.225] [#1] [Player] [SCREAMER] Finished -> 00:00:09.6130556

@ghaith100994
Copy link
Author

if you watch the video then you will notice my problem is with this
[02.35.44.273] [#1] [Player] [SCREAMER] Restarting ... (HLS?) | Distance: 00:00:07.3680000
Why when Flyleaf Restating (We will have this Distance??)

@ghaith100994
Copy link
Author

Just for the first minute when Internet connection is bad
it's skip more than 20 seconds in several period

@ghaith100994
Copy link
Author

I tried it with this url
because resolution is too low ,you need to set internet limit to 5 KBs
http://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4/playlist.m3u8

@SuRGeoNix
Copy link
Owner

SuRGeoNix commented Sep 19, 2021

Finally, I was able to reproduce it. It seems is a bug with ffmpeg. As I was not able to open it at all with VLC (avformat demuxer) and with ffplay I had the same results:

[http @ 0000017125c3cd00] Opening 'http://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4/media_w2141201946_2.ts' for reading
[hls @ 0000017125c0f1c0] Opening 'http://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4/media_w2141201946_2.ts' for reading
[http @ 0000017125c3c180] Stream ends prematurely at 140844, should be 237444
[http @ 0000017125c47680] Opening 'http://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4/media_w2141201946_3.ts' for reading
[hls @ 0000017125c0f1c0] Opening 'http://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4/media_w2141201946_3.ts' for reading
[mpegts @ 0000017125c32e00] PES packet size mismatch=    0B f=0/0
[mpegts @ 0000017125c32e00] Packet corrupt (stream = 1, dts = 1473750).
[h264 @ 000001712b87ab40] Invalid NAL unit 0, skipping.  0B f=0/0
[h264 @ 000001712b87ab40] error while decoding MB 5 6, bytestream -17
[h264 @ 000001712b87ab40] concealing 104 DC, 104 AC, 104 MV errors in P frame

Happens with mpv as well:

mpv http://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4/playlist.m3u8
 (+) Video --vid=1 (h264 240x160 24.000fps) (389 kbps)
 (+) Audio --aid=1 (aac 2ch 12000Hz) (389 kbps)
AO: [wasapi] 48000Hz stereo 2ch float
VO: [gpu] 240x160 yuv420p
AV: 00:00:11 / 00:09:56 (2%) A-V:  0.000 Dropped: 5 Cache: 3.4s/124KB
[ffmpeg] http: Stream ends prematurely at 140844, should be 237444
(Buffering) AV: 00:00:15 / 00:09:56 (3%) A-V:  0.000 Dropped: 5 Cache: 0.0s/4KB
[ffmpeg/demuxer] mpegts: PES packet size mismatch
[ffmpeg/demuxer] mpegts: Packet corrupt (stream = 1, dts = 1473750).
AV: 00:00:15 / 00:09:56 (3%) A-V:  0.066 Dropped: 5 Cache: 7.8s/52KB
[ffmpeg/video] h264: Invalid NAL unit 0, skipping.
AV: 00:00:15 / 00:09:56 (3%) A-V:  0.026 Dropped: 5 Cache: 7.8s/50KB
[ffmpeg/video] h264: error while decoding MB 5 6, bytestream -17
AV: 00:00:16 / 00:09:56 (3%) A-V:  0.000 Dropped: 6 Cache: 0.7s/27KB
Invalid audio PTS: 16.384000 -> 23.125333
Reset playback due to audio timestamp reset.
(...) AV: 00:00:00 / 00:09:56 (0%) A-V:  0.000 Cache: 0.0s

Happens also with rtsp protocol (not just hls):

mpv rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
 (+) Video --vid=1 (h264 240x160 24.000fps)
 (+) Audio --aid=1 (aac 2ch 12000Hz)
File tags:
 Title: BigBuckBunny_115k.mov
AO: [wasapi] 48000Hz stereo 2ch float
VO: [gpu] 240x160 yuv420p
Invalid video timestamp: 0.208333 -> 0.000000
AV: 00:00:25 / 00:09:56 (4%) A-V:  0.480 ct:  0.208 Dropped: 7

Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).

AV: 00:00:31 / 00:09:56 (5%) A-V:  0.000 ct:  0.208 Dropped: 24
Invalid audio PTS: 32.341333 -> 34.303667
AV: 00:00:56 / 00:09:56 (9%) A-V:  0.000 ct:  2.171 Dropped: 47
Invalid audio PTS: 56.490333 -> 60.501667
AV: 00:00:56 / 00:09:56 (9%) A-V:  0.000 ct:  2.171 Dropped: 47

Opened a ticket at ffmpeg's trac

@SuRGeoNix SuRGeoNix reopened this Sep 19, 2021
@SuRGeoNix
Copy link
Owner

Closing this as this from FFmpeg side. If more people have this issue I will try to make a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants