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

Unable to play live stream. . . #13978

Closed
zhouxinghong opened this issue Apr 24, 2024 · 6 comments
Closed

Unable to play live stream. . . #13978

zhouxinghong opened this issue Apr 24, 2024 · 6 comments
Labels

Comments

@zhouxinghong
Copy link

Important Information

Provide following Information:

  • mpv version 0.38
  • Windows Version 10 19044
  • Source of the mpv binary
  • If known which version of mpv introduced the problem
  • GPU model, driver and version
  • Possible screenshot or video of visual glitches

If you're not using git master or the latest release, update.
Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

Unable to play live stream. . .

PowerShell> mpv --no-config https://m3u.haiwaikan.com/xm3u8/caa7c5c10222f234fca7e184d9c53dc630cdc1ff0a7578770e73cae7043a26779921f11e97d0da21.m3u8
[ffmpeg/demuxer] hls: Could not find codec parameters for stream 0 (Video: png, none): unspecified size
[ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
 (+) Video --vid=1 (png)
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] ...treating it as fatal error.
Exiting... (Errors when loading file)

Log file

Sample files

PowerShell> mpv --no-config https://m3u.haiwaikan.com/xm3u8/caa7c5c10222f234fca7e184d9c53dc630cdc1ff0a7578770e73cae7043a26779921f11e97d0da21.m3u8
[ffmpeg/demuxer] hls: Could not find codec parameters for stream 0 (Video: png, none): unspecified size
[ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
 (+) Video --vid=1 (png)
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] error reading packet: Invalid argument.
[lavf] ...treating it as fatal error.
Exiting... (Errors when loading file)
@CounterPillow
Copy link
Contributor

Stream's first .ts segment does not look like a standard MPEG-TS fragment, it begins with all the header data you'd expect of a PNG:

$ curl --silent https://cdn.kin6c1.com/fvod/39fe89f062e0c9240573a95288e1c7f1cac2c4935962f6f32af8e27a8199cd080ec531db3d29e5a35a2a431fdebfb694638a531870e55e2e74a63bc76686fd696fe0b5e05756f021fb79d5661ee8af29b59f68c9c34c06c2.ts -o - | hexdump -C | head -n 80
00000000  89 50 4e 47 0d 0a 1a 0a  00 00 00 0d 49 48 44 52  |.PNG........IHDR|
00000010  00 00 00 01 00 00 00 01  08 06 00 00 00 1f 15 c4  |................|
00000020  89 00 00 00 01 73 52 47  42 00 ae ce 1c e9 00 00  |.....sRGB.......|
00000030  00 04 67 41 4d 41 00 00  b1 8f 0b fc 61 05 00 00  |..gAMA......a...|
00000040  00 09 70 48 59 73 00 00  12 74 00 00 12 74 01 de  |..pHYs...t...t..|
00000050  66 1f 78 00 00 00 0d 49  44 41 54 18 57 63 f8 ff  |f.x....IDAT.Wc..|
00000060  ff ff 7f 00 09 fb 03 fd  05 43 45 ca 00 00 00 00  |.........CE.....|
00000070  49 45 4e 44 ae 42 60 82  47 40 11 10 00 42 f0 25  |IEND.B`[email protected].%|
00000080  00 01 c1 00 00 ff 01 ff  00 01 fc 80 14 48 12 01  |.............H..|
00000090  06 46 46 6d 70 65 67 09  53 65 72 76 69 63 65 30  |.FFmpeg.Service0|
000000a0  31 77 7c 43 ca ff ff ff  ff ff ff ff ff ff ff ff  |1w|C............|
000000b0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000130  ff ff ff ff 47 40 00 10  00 00 b0 0d 00 01 c1 00  |....G@..........|
00000140  00 00 01 f0 00 2a b1 04  b2 ff ff ff ff ff ff ff  |.....*..........|
00000150  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
000001f0  47 50 00 10 00 02 b0 1d  00 01 c1 00 00 e1 00 f0  |GP..............|
00000200  00 1b e1 00 f0 00 0f e1  01 f0 06 0a 04 75 6e 64  |.............und|
00000210  00 08 7d e8 77 ff ff ff  ff ff ff ff ff ff ff ff  |..}.w...........|
00000220  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
000002a0  ff ff ff ff ff ff ff ff  ff ff ff ff 47 41 00 30  |............GA.0|
000002b0  07 50 00 00 7b 0c 7e 00  00 00 01 e0 00 00 80 80  |.P..{.~.........|
000002c0  05 21 00 07 d8 61 00 00  00 01 09 f0 00 00 00 01  |.!...a..........|
000002d0  06 05 ff ff 97 dc 45 e9  bd e6 d9 48 b7 96 2c d8  |......E....H..,.|
000002e0  20 d9 23 ee ef 78 32 36  34 20 2d 20 63 6f 72 65  | .#..x264 - core|
000002f0  20 31 36 31 20 72 33 30  31 35 20 34 63 32 61 61  | 161 r3015 4c2aa|
00000300  66 64 20 2d 20 48 2e 32  36 34 2f 4d 50 45 47 2d  |fd - H.264/MPEG-|
00000310  34 20 41 56 43 20 63 6f  64 65 63 20 2d 20 43 6f  |4 AVC codec - Co|
00000320  70 79 6c 65 66 74 20 32  30 30 33 2d 32 30 32 30  |pyleft 2003-2020|
00000330  20 2d 20 68 74 74 70 3a  2f 2f 77 77 77 2e 76 69  | - http://www.vi|
00000340  64 65 6f 6c 61 6e 2e 6f  72 67 2f 78 32 36 34 2e  |deolan.org/x264.|
00000350  68 74 6d 6c 20 2d 20 6f  70 74 69 6f 6e 73 3a 20  |html - options: |
00000360  63 61 62 61 63 3d 30 20  47 01 00 11 72 65 66 3d  |cabac=0 G...ref=|
00000370  31 20 64 65 62 6c 6f 63  6b 3d 31 3a 30 3a 30 20  |1 deblock=1:0:0 |
00000380  61 6e 61 6c 79 73 65 3d  30 78 31 3a 30 78 31 31  |analyse=0x1:0x11|
00000390  31 20 6d 65 3d 68 65 78  20 73 75 62 6d 65 3d 32  |1 me=hex subme=2|
000003a0  20 70 73 79 3d 31 20 70  73 79 5f 72 64 3d 31 2e  | psy=1 psy_rd=1.|
000003b0  30 30 3a 30 2e 30 30 20  6d 69 78 65 64 5f 72 65  |00:0.00 mixed_re|
000003c0  66 3d 30 20 6d 65 5f 72  61 6e 67 65 3d 31 36 20  |f=0 me_range=16 |
000003d0  63 68 72 6f 6d 61 5f 6d  65 3d 31 20 74 72 65 6c  |chroma_me=1 trel|
000003e0  6c 69 73 3d 30 20 38 78  38 64 63 74 3d 30 20 63  |lis=0 8x8dct=0 c|
000003f0  71 6d 3d 30 20 64 65 61  64 7a 6f 6e 65 3d 32 31  |qm=0 deadzone=21|
00000400  2c 31 31 20 66 61 73 74  5f 70 73 6b 69 70 3d 31  |,11 fast_pskip=1|
00000410  20 63 68 72 6f 6d 61 5f  71 70 5f 6f 66 66 73 65  | chroma_qp_offse|
00000420  74 3d 30 20 47 01 00 12  74 68 72 65 61 64 73 3d  |t=0 G...threads=|
00000430  31 32 20 6c 6f 6f 6b 61  68 65 61 64 5f 74 68 72  |12 lookahead_thr|
00000440  65 61 64 73 3d 34 20 73  6c 69 63 65 64 5f 74 68  |eads=4 sliced_th|
00000450  72 65 61 64 73 3d 30 20  6e 72 3d 30 20 64 65 63  |reads=0 nr=0 dec|
00000460  69 6d 61 74 65 3d 31 20  69 6e 74 65 72 6c 61 63  |imate=1 interlac|
00000470  65 64 3d 30 20 62 6c 75  72 61 79 5f 63 6f 6d 70  |ed=0 bluray_comp|
00000480  61 74 3d 30 20 63 6f 6e  73 74 72 61 69 6e 65 64  |at=0 constrained|
00000490  5f 69 6e 74 72 61 3d 30  20 62 66 72 61 6d 65 73  |_intra=0 bframes|
000004a0  3d 30 20 77 65 69 67 68  74 70 3d 30 20 6b 65 79  |=0 weightp=0 key|
000004b0  69 6e 74 3d 32 35 30 20  6b 65 79 69 6e 74 5f 6d  |int=250 keyint_m|
000004c0  69 6e 3d 32 33 20 73 63  65 6e 65 63 75 74 3d 34  |in=23 scenecut=4|
000004d0  30 20 69 6e 74 72 61 5f  72 65 66 72 65 73 68 3d  |0 intra_refresh=|
000004e0  47 01 00 13 30 20 72 63  5f 6c 6f 6f 6b 61 68 65  |G...0 rc_lookahe|
000004f0  61 64 3d 31 30 20 72 63  3d 32 70 61 73 73 20 6d  |ad=10 rc=2pass m|
00000500  62 74 72 65 65 3d 31 20  62 69 74 72 61 74 65 3d  |btree=1 bitrate=|
00000510  32 34 30 30 20 72 61 74  65 74 6f 6c 3d 31 2e 30  |2400 ratetol=1.0|
00000520  20 71 63 6f 6d 70 3d 30  2e 36 30 20 71 70 6d 69  | qcomp=0.60 qpmi|
00000530  6e 3d 30 20 71 70 6d 61  78 3d 36 39 20 71 70 73  |n=0 qpmax=69 qps|
00000540  74 65 70 3d 34 20 63 70  6c 78 62 6c 75 72 3d 32  |tep=4 cplxblur=2|
00000550  30 2e 30 20 71 62 6c 75  72 3d 30 2e 35 20 69 70  |0.0 qblur=0.5 ip|
00000560  5f 72 61 74 69 6f 3d 31  2e 34 30 20 61 71 3d 31  |_ratio=1.40 aq=1|
00000570  3a 31 2e 30 30 00 80 00  00 00 01 67 42 c0 28 da  |:1.00......gB.(.|
00000580  01 e0 08 9f 97 01 10 00  00 3e 90 00 0b b8 08 f1  |.........>......|
00000590  83 2a 00 00 00 01 68 ce  0d c8 00 00 47 01 00 14  |.*....h.....G...|
000005a0  01 65 88 84 04 7f ff ff  0f 45 00 01 14 5f 27 27  |.e.......E..._''|
000005b0  27 27 27 27 27 27 27 27  27 27 27 27 27 27 27 27  |''''''''''''''''|
*
00000620  27 27 27 27 27 5d 75 d7  5d 75 d7 5d 75 d7 5d 75  |''''']u.]u.]u.]u|
00000630  d7 5d 75 d7 5d 75 d7 5d  75 d7 5d 75 d7 5d 75 d7  |.]u.]u.]u.]u.]u.|
00000640  5d 75 d7 5d 75 d7 5d 75  d7 5d 75 d7 5d 75 d7 5d  |]u.]u.]u.]u.]u.]|
00000650  75 d7 5d 75 d7 5d 75 d7  47 01 00 15 5d 75 d7 5d  |u.]u.]u.G...]u.]|
00000660  75 d7 5d 75 d7 5d 75 d7  5d 75 d7 5d 75 d7 5d 75  |u.]u.]u.]u.]u.]u|
00000670  d7 5d 75 d7 5d 75 d7 5d  75 d7 5d 75 d7 5d 75 d7  |.]u.]u.]u.]u.]u.|
00000680  5d 75 d7 5d 75 d7 5d 75  d7 5d 75 d7 5d 75 d7 5d  |]u.]u.]u.]u.]u.]|

Not mpv's issue to solve since this is in ffmpeg's demuxer/probe logic but I doubt FFmpeg would be interested in adding a special case workaround for this ad-hoc format your streaming service invented either.

@zhouxinghong
Copy link
Author

@CounterPillow Can you try the following line? See if it plays properly in your machine.
mpv --no-config https://m3u.haiwaikan.com/xm3u8/caa7c5c10222f234fca7e184d9c53dc630cdc1ff0a7578770e73cae7043a26779921f11e97d0da21.m3u8

@CounterPillow
Copy link
Contributor

It doesn't, for the reasons I already told you. The m3u8 link is a playlist of .ts segments and the .ts segments are not MPEG-TS but seemingly some garbage homebrew format that prepends a PNG.

@tuilakhanh
Copy link

If you're looking to play this stream, download the entire stream then play with option --demuxer-lavf-format=mpegts

@kasper93
Copy link
Contributor

kasper93 commented Apr 25, 2024

I tried ffmpeg -seg_format_options f=mpegts -i ... but doesn't seem to work, same with skip_initial_bytes.

@stumpedatwork
Copy link

stumpedatwork commented May 6, 2024

#11365 MPV can't play non-standard M3U8 stream with faked video parts as 1x1 pixel images

@kasper93 kasper93 closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants