pystardust / ani-cli

A cli tool to browse and play anime
GNU General Public License v3.0
8.04k stars 554 forks source link

Tried changing mpv with vlc but still not working #45

Closed ghost closed 2 years ago

ghost commented 3 years ago

I tried to change it with vlc instead on mpv but the script was not working

!/bin/sh

# dependencies: grep sed curl video_player # video_player ( needs to be able to play urls ) player_fn="vlc"

prog="ani-cli" logfile="${XDG_CACHE_HOME:-$HOME/.cache}/ani-hsts"

c_red="\033[1;31m" c_green="\033[1;32m" c_yellow="\033[1;33m"

ghost commented 3 years ago

I want to run it on vlc because I personally dont like mpv and it is trash .

NoRMaNxLLy commented 3 years ago

was it working with mpv ?

avidhy-chan commented 3 years ago

was it working with mpv ?

Yup working fine with mpv. Test in windows and can confirm it's working.

nabakolu commented 3 years ago

I think the problem is in line 213:
setsid -f $player_fn --http-header-fields="Referer: $embedded_video_url" "$video_url" >/dev/null 2>&1
But vlc does not have the cli option http-header-fields. Instead you could use the option --http-referrer provided in vlc (look at the documentation).
It should look something like this: setsid -f $player_fn --http-referrer="$embedded_video_url" "$video_url" >/dev/null 2>&1

ghost commented 3 years ago

was it working with mpv ?

Yes it was working with mpv fine. But i discovered a weird thing in vlc. Whenever I press ctrl + n in vlc and try to put in a video link for ex a youtube link it says "Video MRL not found". And the problem is not from my end i tried it on different computers.

ghost commented 3 years ago

I think the problem is in line 213: setsid -f $player_fn --http-header-fields="Referer: $embedded_video_url" "$video_url" >/dev/null 2>&1 But vlc does not have the cli option http-header-fields. Instead you could use the option --http-referrer provided in vlc (look at the documentation). It should look something like this: setsid -f $player_fn --http-referrer="$embedded_video_url" "$video_url" >/dev/null 2>&1

Oh i will try it and then i will tell u whether it works or not.

ghost commented 3 years ago

I think the problem is in line 213: setsid -f $player_fn --http-header-fields="Referer: $embedded_video_url" "$video_url" >/dev/null 2>&1 But vlc does not have the cli option http-header-fields. Instead you could use the option --http-referrer provided in vlc (look at the documentation). It should look something like this: setsid -f $player_fn --http-referrer="$embedded_video_url" "$video_url" >/dev/null 2>&1

It opens the vlc player but doesnt play the video :(

nabakolu commented 3 years ago

Then I'd recommend echoing one of these links and trying to get it to work manually

ghost commented 3 years ago

Then I'd recommend echoing one of these links and trying to get it to work manually

I Dont know how to do that can u help me ?

Glitcher85 commented 3 years ago

Then I'd recommend echoing one of these links and trying to get it to work manually

I echoed the link and tried to play the video manually but it seems it doesn't work either.

$ vlc https://www02.anicdn.stream/videos/hls/MltU2rpWt3SYcQ3gsLHQ2A/1635076998/1123/cbbd28f60b184eb2ffab2ce371615957/ep.1.1633561542.m3u8
VLC media player 3.0.9.2 Vetinari (revision 3.0.9.2-0-gd4c1aefe4d)
[000055d91097c5b0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
qt5ct: using qt5ct plugin
qt5ct: D-Bus global menu: no
qt5ct: D-Bus system tray: no
[00007f77f4001af0] access stream error: HTTP 403 error
nabakolu commented 3 years ago

Do it with the options I recommended

port19x commented 2 years ago

Do you need any further support?

Glitcher85 commented 2 years ago

Do you need any further support?

Nope, it seems like they added a vlc option as well.

port19x commented 2 years ago

Good to hear @Glitcher85 :smiley:

Full vlc support was implemented 2 weeks ago in PR #172 Update to the latest version If you still have issues, don't hesitate to open another issue