fabiospampinato / cliflix

Watch anything instantaneously, just write its name.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mpv doesn't open automatically when selected through the prompt after running `watch`, but does when running `watch -- --mpv`

tylerhou opened this issue · comments

Hi,

So if I type just watch in the command line, go through the prompts, and select mpv on the last step, the streaming server will start but mpv doesn't automatically open and connect. If I manually start mpv, it connects to the server fine.

When I type watch -- --mpv, mpv starts automatically upon selecting a download.

A similar thing happens with VLC. VLC opens and plays automatically when it's specified in the first command, but when I select it through the prompts it opens but doesn't play automatically. I suspect that this issue might have to deal with webtorrent, and not watch.

I have both VLC and mpv installed with Homebrew Cask.

mpv:

mpv 0.26.0 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
 built on Mon Jul 24 16:20:40 CEST 2017
ffmpeg library versions:
   libavutil       55.58.100
   libavcodec      57.89.100
   libavformat     57.71.100
   libswscale      4.6.100
   libavfilter     6.82.100
   libswresample   2.7.100
ffmpeg version: 3.3.2

Running on a MacBook Pro, Early 2015. macOS Sierra 10.12.6. Shell is zsh.

Never mind; when I tried to debug the issue it fixed itself? Not sure what's going on.

I've no clue on this.

The latest version (1.2.0) supports calls like watch -- --app more reliably though, I'd recommend an update.

I'm on the latest version of watch.

I'm pretty sure what happened is that I didn't let webtorrent buffer the video long enough. It seems that it only starts playing the video when the video is completely buffered.

I probably tested watch -- --app with a video that was easier to buffer, or had already been cached by my first run with just watch, so it seemed like latter was more responsive than the former. If I run just watch and wait for webtorrent to buffer, then everything works fine.

There doesn't seem to be a bug here in watch. I wish webtorrent printed some line that said "buffering media before opening video player."

I'm not terribly familiar with how webtorrent-cli works but I think it opens the media player right away, but still the latter has to wait until the beginning of the video has been downloaded, depending on how popular a particular torrent is and how lucky you are with your peers this may take a bit.