question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use --player-fifo with MPV

See original GitHub issue

Streamlink 2.0.0 mpv 0.33.0-76-g93066ff12f Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects

streamlink --player-fifo https://www.twitch.tv/channelName best
[cli][info] Found matching plugin twitch for URL https://www.twitch.tv/channelName 
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (hls)
[cli][info] Creating pipe streamlinkpipe-1140
[cli][info] Starting player: "c:\Programs\MPV\mpv.exe"
error: Failed to start player: "c:\Programs\MPV\mpv.exe" (Process exited prematurely)
[cli][info] Closing currently open stream...

Works normally without FIFO

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:36 (20 by maintainers)

github_iconTop GitHub Comments

3reactions
bastimeyercommented, Feb 17, 2021

There seems to be an issue with Streamlink’s named pipe implementation on Windows. Neither MPV nor VLC is able to read from it. The named pipe implementation is working fine on *nix. https://github.com/streamlink/streamlink/blob/164b2579262a72bb291bd641309b703556878332/src/streamlink/utils/named_pipe.py

@Kein This thread was closed and tagged with “does not meet requirements” because you were (still) not able to provide a proper debug log with the necessary details, which the issue template is explicitly asking for. Remember that this is a free open source software project with volunteers working on it in their free time for fun, and the more details you provide, the easier it is for reproducing and fixing bugs. I’m giving you the first and last warning to watch your tone and not harass/insult any maintainers or contributors here.


$ streamlink -l debug -v --player-fifo -p ./mpv-x86_64-20210214-git-93066ff/mpv.exe twitch.tv/esl_csgo best
[cli][debug] OS:         Windows 10
[cli][debug] Python:     3.8.1
[cli][debug] Streamlink: 2.0.0+45.g164b257
[cli][debug] Requests(2.24.0), Socks(1.7.1), Websocket(0.57.0)
[cli][info] Found matching plugin twitch for URL twitch.tv/esl_csgo
[plugins.twitch][debug] Getting live HLS streams for esl_csgo
[utils.l10n][debug] Language code: en_DE
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (hls)
[stream.hls][debug] Reloading playlist
[stream.hls][debug] First Sequence: 10328; Last Sequence: 10344
[stream.hls][debug] Start offset: 0; Duration: None; Start Sequence: 10342; End Sequence: None
[stream.hls][debug] Adding segment 10342 to queue
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] Adding segment 10343 to queue
[stream.hls][debug] Adding segment 10344 to queue
[stream.hls][debug] Download of segment 10342 complete
[cli][info] Creating pipe streamlinkpipe-1412
[cli][info] Starting player: ./mpv-x86_64-20210214-git-93066ff/mpv.exe
[cli.output][debug] Opening subprocess: ./mpv-x86_64-20210214-git-93066ff/mpv.exe --force-media-title=twitch.tv/esl_csgo \\.\pipe\streamlinkpipe-1412
[stream.hls][debug] Download of segment 10343 complete
[stream.hls][debug] Download of segment 10344 complete
[file] Cannot open file '\\.\pipe\streamlinkpipe-1412': Resource temporarily unavailable
Failed to open \\.\pipe\streamlinkpipe-1412.

Exiting... (Errors when loading file)
error: Failed to start player: ./mpv-x86_64-20210214-git-93066ff/mpv.exe (Process exited prematurely)
[cli][info] Closing currently open stream...
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
$ streamlink -l debug -v --player-fifo -p /c/Program\ Files/VideoLAN/VLC/vlc.exe twitch.tv/esl_csgo best
[cli][debug] OS:         Windows 10
[cli][debug] Python:     3.8.1
[cli][debug] Streamlink: 2.0.0+45.g164b257
[cli][debug] Requests(2.24.0), Socks(1.7.1), Websocket(0.57.0)
[cli][info] Found matching plugin twitch for URL twitch.tv/esl_csgo
[plugins.twitch][debug] Getting live HLS streams for esl_csgo
[utils.l10n][debug] Language code: en_DE
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (hls)
[stream.hls][debug] Reloading playlist
[stream.hls][debug] First Sequence: 10535; Last Sequence: 10550
[stream.hls][debug] Start offset: 0; Duration: None; Start Sequence: 10548; End Sequence: None
[stream.hls][debug] Adding segment 10548 to queue
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] Adding segment 10549 to queue
[stream.hls][debug] Adding segment 10550 to queue
[stream.hls][debug] Download of segment 10548 complete
[cli][info] Creating pipe streamlinkpipe-6428
[cli][info] Starting player: C:/Program Files/VideoLAN/VLC/vlc.exe
[cli.output][debug] Opening subprocess: C:/Program Files/VideoLAN/VLC/vlc.exe --input-title-format twitch.tv/esl_csgo \\.\pipe\streamlinkpipe-6428
[stream.hls][debug] Download of segment 10549 complete
[stream.hls][debug] Download of segment 10550 complete
[cli][debug] Writing stream to output
[000001407d7b73f0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[000001407f2cf1c0] dvdnav demux error: Could not open \\.\pipe\streamlinkpipe-6428 with libdvdcss.
[000001407f2cf1c0] dvdnav demux error: Can't open \\.\pipe\streamlinkpipe-6428 for reading
[000001407f2cf1c0] dvdnav demux error: vm: failed to open/read the DVD
[000001407f2c74e0] filesystem stream error: cannot open file \\.\pipe\streamlinkpipe-6428 (Invalid argument)
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 10551 to queue
[stream.hls][debug] Adding segment 10552 to queue
[stream.hls][debug] Adding segment 10553 to queue
[stream.hls][debug] Adding segment 10554 to queue
[stream.hls][debug] Download of segment 10551 complete
[cli][info] Player closed
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[cli][info] Stream ended
[stream.hls][debug] Download of segment 10552 complete
[cli][info] Closing currently open stream...
$ streamlink -l debug --player-fifo -v -p mpv twitch.tv/esl_csgo best
[cli][debug] OS:         Linux-5.11.0-2-git-x86_64-with-glibc2.33
[cli][debug] Python:     3.9.1
[cli][debug] Streamlink: 2.0.0+45.g164b257
[cli][debug] Requests(2.25.1), Socks(1.7.1), Websocket(0.57.0)
[cli][info] Found matching plugin twitch for URL twitch.tv/esl_csgo
[plugins.twitch][debug] Getting live HLS streams for esl_csgo
[utils.l10n][debug] Language code: en_US
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (hls)
[stream.hls][debug] Reloading playlist
[stream.hls][debug] First Sequence: 10658; Last Sequence: 10673
[stream.hls][debug] Start offset: 0; Duration: None; Start Sequence: 10671; End Sequence: None
[stream.hls][debug] Adding segment 10671 to queue
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] Adding segment 10672 to queue
[stream.hls][debug] Adding segment 10673 to queue
[stream.hls][debug] Download of segment 10671 complete
[cli][info] Creating pipe streamlinkpipe-511177
[cli][info] Starting player: mpv
[cli.output][debug] Opening subprocess: mpv --force-media-title=twitch.tv/esl_csgo --cache=no /tmp/streamlinkpipe-511177
[stream.hls][debug] Download of segment 10672 complete
[stream.hls][debug] Download of segment 10673 complete
[cli][debug] Writing stream to output
 (+) Video --vid=1 (h264 1920x1080 59.940fps)
 (+) Audio --aid=1 (aac 2ch 48000Hz)
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 1920x1080 yuv420p

Exiting... (Quit)
[cli][info] Player closed
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[cli][info] Stream ended
[cli][info] Closing currently open stream...
2reactions
beardypigcommented, Feb 21, 2021

@Kein I literally quoted what you wrote in a previous comment. I also didn’t say you did say it worked on Windows, I asked where you it says it works with named pipes because I couldn’t remember where it was in the docs.

Anyway, it does work on Windows with MPV - you just need the correct incantation.

streamlink.exe -v -l debug --player-fifo -p mpv --player-args "file://{playerinput}" twitch.tv/sovietwomble best

@bastimeyer We can update the documentation to include a footnote for VLC and MPV using named pipes on Windows. We could also detect if the user is using named Pipes and Windows and direct them to the documentation notes with an INFO log message or something.

The way that Named Pipes have been handled by these players has changed over time, and this has been a frustrating issue to debug…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Players - Streamlink 5.1.2 documentation
MPlayer tries to play Twitch streams at the wrong FPS#. This is a bug in MPlayer, using the MPlayer fork mpv instead is...
Read more >
mpv - ArchWiki
mpv is a media player based on MPlayer and the now unmaintained mplayer2. It supports a wide variety of video file formats, audio...
Read more >
SVPTube not detecting links (Page 1) — Using SVP
I can only get SVPTube to recognize crunchyroll videos if they're not subscription required, but then they don't play. (Failed to render file)....
Read more >
Keyboard Control - mpv.io
Profiles can be set at runtime with apply-profile command. Since this operation is "destructive" (every item in a profile is simply set as...
Read more >
mpv - Gentoo Wiki
mpv is a free and open source command-line media player. It is based on mplayer2, which in turn is based on the original...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found