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

While watching streams on twitch, the first few seconds are repeated once #3480

Closed
ghost opened this issue Sep 1, 2016 · 14 comments
Closed

While watching streams on twitch, the first few seconds are repeated once #3480

ghost opened this issue Sep 1, 2016 · 14 comments

Comments

@ghost
Copy link

@ghost ghost commented Sep 1, 2016

mpv version and platform

mpv 0.20 Debian Sid

Reproduction steps

Open any stream/vod form twitch.tv

Expected behavior

Playing without repeating

Actual behavior

First few seconds repeating once.

Log files

http://sprunge.us/TbPf

Sample files

https://i.lithi.io/cfXu.webm (not mine)

@ghost
Copy link

@ghost ghost commented Sep 1, 2016

Hm, I could reproduce this when I briefly tested a few hours ago. But now that I wanted to take a closer look I can't anymore.

Maybe it depends on the stream. Is it possible that you can provide a downloaded version as a sample when it happens again?

@ghost
Copy link

@ghost ghost commented Sep 2, 2016

Tried again, it appears the link is dead now.

@ghost ghost added the meta:info-needed label Sep 2, 2016
@mc4man
Copy link

@mc4man mc4man commented Sep 2, 2016

This will likely show the repeat
mpv -no-config https://twitch.tv/welovegames

@ghost
Copy link
Author

@ghost ghost commented Sep 2, 2016

@mc4man repeat is not showing.

@mc4man
Copy link

@mc4man mc4man commented Sep 2, 2016

Whatever then but is 100% repeatable here, ex. audio from 1st 8 sec.
https://0x0.st/ueD.ogg
Doesn't seem that big a deal as always squares up afterwards.

mpv -no-config https://twitch.tv/welovegames
Playing: https://twitch.tv/welovegames
(+) Video --vid=1 (h264)
(+) Audio --aid=1 (aac)
AO: [pulse] 44100Hz stereo 2ch float
VO: [opengl] 1280x720 yuv420p
AV: 00:00:03 A-V: 0.000 Cache: 8s+0KB
Invalid audio PTS: 3.970612 -> 0.000000

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:03 A-V: -3.955 Cache: 13s+0KB
Invalid video timestamp: 3.972922 -> 0.022922
AV: 00:00:10 A-V: 0.000 Cache: 10s+0KB

@h633537
Copy link

@h633537 h633537 commented Sep 3, 2016

Happens on twitter videos too

Playing: https://twitter.com/video/status/772117027938902016
 (+) Video --vid=1 (h264)
 (+) Audio --aid=1 (aac)
AO: [pulse] 44100Hz mono 1ch float
VO: [opengl] 720x1280 yuv420p
AV: 00:00:00 / 00:00:34 (0%) A-V:  0.000 Cache:  2s+0KB
[osd/libass] Glyph 0x1F436 not found, broken font? Trying all charmaps
AV: 00:00:00 / 00:00:34 (0%) A-V:  0.000 Cache:  2s+0KB
[ffmpeg/demuxer] mpegts: DTS 0 < 267178 out of order
[ffmpeg/demuxer] hls,applehttp: DTS 0 < 267178 out of order
AV: 00:00:02 / 00:00:34 (7%) A-V:  0.000 Cache:  9s+0KB
Invalid audio PTS: 3.018594 -> 0.000000

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:02 / 00:00:34 (8%) A-V: -2.999 Cache: 12s+0KB
Invalid video timestamp: 2.968644 -> 0.000000
AV: 00:00:01 / 00:00:34 (3%) A-V: -0.000 Cache: 11s+0KB
@ghost
Copy link

@ghost ghost commented Sep 4, 2016

@mc4man: ytdl fails to produce playable media URLs here.

@h633537: works fine here.

@dragons4life
Copy link

@dragons4life dragons4life commented Sep 4, 2016

This happens to me only on the bitbucket builds, however even on srsfrckn,sourceforge and building it on my own, (using https://github.com/mpv-player/mpv/blob/master/DOCS/compile-windows.md) seems to not make the stream repeat, however they do give me several

[ffmpeg] tls: Unable to read from socket
[ffmpeg] tls: Failed to send close message

compare to bitbucket

Builds:

https://bitbucket.org/rorgoroth/mpv-for-windows/downloads
https://sourceforge.net/projects/mpv-player-windows/


bitbucket

Log - https://i.lithi.io/N2DFM.txt


Sourceforge

Log - https://i.lithi.io/1IeT.txt


MSYS2

Log - https://i.lithi.io/X5QQ.txt
(looks to me that it's almost the same as sourceforge.

I used --no-config in all of them, same results.

https://i.lithi.io/kcldl.conf - mpv.conf

@ghost
Copy link

@ghost ghost commented Sep 4, 2016

Both the bitbucket and lachs0r logs contain lots of suspicious stuff.

I'm noticing that all 3 logs use different ffmpeg versions. I tried with debian unstable current ffmpeg version (possibly outdated by a few days), and I got an error immediately. It seems the demuxer is repeating the first segment, so the error messages output by mpv are correct.

It's probably a problem that has been caused sometimes after 3.1.1, and fixed in ffmpeg git?

(I still don't know why I could reproduce with the twitch stream at first - maybe I used system ffmpeg, or it depends on timing issues.)

@dragons4life
Copy link

@dragons4life dragons4life commented Sep 6, 2016

I wish bitbucket had a version history so that I can check, but yeah this didn't happen before.

@gcat432
Copy link

@gcat432 gcat432 commented Sep 22, 2016

This bug appears for me as well on Twitch streams. since an update to ffmpeg 3.1.3 from 2.8.7.

ffmpeg 2.8.7

$ mpv https://www.twitch.tv/somestream
Playing: https://www.twitch.tv/somestream
[ffmpeg] https: No trailing CRLF found in HTTP header.
 (+) Video --vid=1 (h264)
 (+) Audio --aid=1 (aac)
libva info: VA-API version 0.39.3
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
AO: [pulse] 44100Hz stereo 2ch float
Using hardware decoding (vaapi).
VO: [opengl] 1280x720 vaapi
AV: 00:00:00 A-V:  0.000 Cache:  2s+0KB
[ffmpeg] https: No trailing CRLF found in HTTP header.
AV: 00:00:01 A-V:  0.000 Cache:  5s+0KB
[ffmpeg] https: No trailing CRLF found in HTTP header.
AV: 00:00:03 A-V:  0.000 Cache:  7s+0KB
[ffmpeg] https: No trailing CRLF found in HTTP header.
AV: 00:00:08 A-V:  0.000 Cache:  7s+0KB
[ffmpeg] https: No trailing CRLF found in HTTP header.
AV: 00:00:09 A-V:  0.000 Cache:  9s+0KB
[ffmpeg] https: No trailing CRLF found in HTTP header.

...

ffmpeg 3.1.3

$ mpv https://www.twitch.tv/somestream
Playing: https://www.twitch.tv/somestream
 (+) Video --vid=1 (h264)
 (+) Audio --aid=1 (aac)
libva info: VA-API version 0.39.3
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
AO: [pulse] 44100Hz stereo 2ch float
Using hardware decoding (vaapi).
VO: [opengl] 1280x720 vaapi
AV: 00:01:41 A-V:  0.000 Cache:  9s+0KB
[ffmpeg] skipping 1 segments ahead, expired from playlists
AV: 00:01:49 A-V:  0.000 Cache:  9s+0KB
[ffmpeg] skipping 2 segments ahead, expired from playlists
AV: 00:01:51 A-V:  0.000 Cache: 16s+0KB
Invalid audio PTS: 112.016404 -> 116.010233

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:01:56 A-V:  3.559 ct:  0.441 Cache:  9s+0KB
Invalid audio PTS: 120.004066 -> 128.014956
[ffmpeg/video] h264: co located POCs unavailable
[ffmpeg/video] h264: mmco: unref short failure
AV: 00:01:58 A-V:  0.000 Cache:  2s+0KB

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:01:58 A-V: 10.002 Cache:  3s+0KB
[ffmpeg] skipping 1 segments ahead, expired from playlists
AV: 00:01:59 A-V:  9.842 ct:  0.990 Cache:  9s+0KB
Invalid audio PTS: 132.008781 -> 136.002622
AV: 00:02:22 A-V: 11.596 ct:  2.427 Cache:  9s+0KB
[ffmpeg] skipping 1 segments ahead, expired from playlists
AV: 00:02:31 A-V: 10.712 ct:  3.310 Cache:  9s+0KB
[ffmpeg] skipping 2 segments ahead, expired from playlists
AV: 00:02:33 A-V: 10.499 ct:  3.523 Cache: 15s+0KB
Invalid audio PTS: 164.005888 -> 167.999711
AV: 00:02:37 A-V: 14.049 ct:  3.967 Cache:  9s+0KB
Invalid audio PTS: 172.016763 -> 180.004433

...

I'm using the hardware acceleration of my graphic card (vaapi) so no CPU spike is in cause. Anyway, before the update, even while browsing or doing stuff, there was no problem. I got the same problem on my desktop with a quad core and a crossfire using vdpau as hardware decoding.

The problem appears on two separate distributions (Void and Manjaro which is Arch based).

$ mpv -V
mpv 0.20.0 (C) 2000-2016 mpv/MPlayer/mplayer2 projects
 built on Thu Sep 22 12:09:47 UTC 2016
ffmpeg library versions:
   libavutil       55.28.100
   libavcodec      57.48.101
   libavformat     57.41.100
   libswscale      4.1.100
   libavfilter     6.47.100
   libswresample   2.1.100
ffmpeg version: 3.1.3
$ mpv -V
mpv 0.20.0 (C) 2000-2016 mpv/MPlayer/mplayer2 projects
 built on Sat Aug 27 06:25:00 UTC 2016
ffmpeg library versions:
   libavutil       54.31.100
   libavcodec      56.60.100
   libavformat     56.40.101
   libswscale      3.1.101
   libavfilter     5.40.101
   libswresample   1.2.101
ffmpeg version: 2.8.7
@gcat432
Copy link

@gcat432 gcat432 commented Oct 28, 2016

The bug seems fixed since ffmpeg 3.2

$ mpv -V                                                   
mpv 0.21.0 (C) 2000-2016 mpv/MPlayer/mplayer2 projects
 built on Fri Oct 28 13:15:15 UTC 2016
ffmpeg library versions:
   libavutil       55.34.100
   libavcodec      57.64.100
   libavformat     57.56.100
   libswscale      4.2.100
   libavfilter     6.65.100
   libswresample   2.3.100
ffmpeg version: 3.2
@Jj0YzL5nvJ
Copy link

@Jj0YzL5nvJ Jj0YzL5nvJ commented Nov 5, 2016

Yeah, ffmpeg 3.2 fixes this.

@ghost
Copy link
Author

@ghost ghost commented Nov 5, 2016

For me too, i closing this issue.

@ghost ghost closed this Nov 5, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants