mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
GNU General Public License v3.0
8.08k stars 648 forks source link

youtube playback freezes after 2 minutes #242

Closed OliverLeitner closed 1 year ago

OliverLeitner commented 9 years ago

hi

seems my youtube playback stopped working, ive tried with vlc/mpv/mplayer, all three of them stop after exactly 2 minutes and the players and mpsyt freeze in that way that i can only stop them by doing a kill -sigkill pid in the terminal.

this started happening within this week.

krogank9 commented 9 years ago

I'm also getting this error. It also occurs with audio only

Something to note is it always stops (for me) at 2:01. Sometimes the music continues playing. It seems if undisturbed the video/audio player will continue to play the loaded file fine, but once mpsyt gives it some more input it glitches it out. That's my guess on what's happening.

It doesn't even seem that you can't play videos/music past 2:00. Just once the clock on mps-youtube hits 2:00 it starts loading the video player garbage data, even if more than 2 minutes of data has been loaded. Someone please help with this!

EDIT: I think also if I skip past two minutes it will work, but the video still in total will only play for two minutes. Also tested with mpsyt playurl. Same behavior.

ids1024 commented 9 years ago

@krogank9 Mpv or mplayer? Does mpv http://url/of/video work fine outside of mpsyt?

krogank9 commented 9 years ago

I'm using mplayer. Can't figure out how to install mpv for my distro (raspbian)

lol768 commented 9 years ago

@krogank9 Are you on jessie or wheezy? How comfortable are you with building code from source?

Please also see https://github.com/mpv-player/mpv/issues/911

krogank9 commented 9 years ago

@lol768 I'm on wheezy, I compiled and installed mpv and it fixes the 2:00 freeze but also is stuck in fullscreen mode. Any other player I can try besides mplayer & mpv?

Can't find any fix for the fullscreen mode, someone suggested --autofit-larger option but no luck here

krogank9 commented 9 years ago

Update: I fixed this repetetive problem on my raspberry pi running raspbian (wheezy) by finally upgrading it to raspbian (jessie) using raspbian-ui-netinst and setting release to jessie in the config. This allowed me to download a newer version of mplayer I think which does not have this problem anymore. Anyway, I'm sure the problem here is with mplayer, unless the way data is piped to the players differs in mplayer/mpv. MPV did not have the 2 minute problem only mplayer for me

laapsaap commented 9 years ago

I am having this problem, after updating to the latest with pip. Audio stops and I can ctrl-c and go back to "main screen". I am using the same mplayer version, so not sure why it isnt working.

laapsaap commented 9 years ago

I updated mplayer to latest svn build, but problem still exist. I dont think this is a mplayer bug because it was fine until last mps-youtube update. Cant seem to get development version working either, spent too much time already on this problem. Hate to use spotify... mps-youtube is completely broken on my two workstations.

ioctl(0, TIOCGWINSZ, {ws_row=32, ws_col=118, ws_xpixel=954, ws_ypixel=520}) = 0
ioctl(0, TIOCGWINSZ, {ws_row=32, ws_col=118, ws_xpixel=954, ws_ypixel=520}) = 0
write(1, " tcZisG3AVmw; ogg 128k; 22 Mb; 0"..., 119) = 119
write(6, "\0\0\0\20\200\2U\5pauseq\1\211\206q\2.", 20
krogank9 commented 9 years ago

@laapsaap Are you on debian wheezy or a debian wheezy based distro? When I did a clean install of jessie it worked fine for me.

Have you tried mpv or another player? MPV worked fine for me, but the player ended up being glitchy on my raspberry pi so I continued trying to get mplayer to work.

Are you on a raspberry pi by chance? That's where I had this problem.

laapsaap commented 9 years ago

@krogank9 nope I am using CentOS 7 on a NUC. I use pip install to get mps-youtube. It always stops at 1 minute and 32 seconds. I tried debugging it but the more I see the weirder it gets, so I stopped looking.

openglx commented 9 years ago

Issue happens to me on CentOS 7.1.1503 (x86_64) as well. Tried both mplayer and vlc (from default rpm), and also mpv (compiled locally). Attaching a strace on process was showing some timers trying to work, I didn't investigate much further.

I am trying now a different approach. Create a virtualenv, activate it, and install mpsyt from there. Something like:

mkdir -p tmp/mpsyt_env
cd tmp/mpsyt_env
sudo pip install virtualenv
virtualenv mpsyt
source mpsyt/bin/activate
pip install mps-youtube
mpsyt

and it just works! Back to listening without issues, at least so far (tried like 15 minutes ago).

Next time to reactivate you will need to get back there again: cd tmp/mpsyt_env && source mpsyt/bin/activate && mpsyt

pip freeze inside that env:

mps-youtube==0.2.4
pafy==0.3.74
requests==2.7.0
wheel==0.24.0

I'm back using this version of mplayer: MPlayer SVN-r37245-4.8.2 (C) 2000-2014 MPlayer Team Also relevant: Python 2.7.5.

My suspicion is some incompatible library being loaded at same time when outside the virtualenv...

OliverLeitner commented 9 years ago

i seems that most distributions python packaging is broke most of the time, i did the pip way inbetween, but that doesnt make things better, back to using mps-youtube on github and keeping the rest of the python stuff as distro default fixes stuff for me 90% of the time.

laapsaap commented 9 years ago

Now with release 0.2.5 Python3 seems to be a requirement. I dont feel like installing it on CentOS7 just for a music player, so this problem is becoming irrelevant.

pipointzero commented 9 years ago

Hi, problem solved using python 3.2 and the corresponding pip version. You must force pip tu use python 3.2 and everything will work fine with mplayer. (on raspbian)

space-potato commented 8 years ago

I think I'm also having this issue.. it plays fine if I don't touch anything, but if happen that I pause and then re-play the video/audio, after a while (don't know if 2 minutes, but I don't think so) it stops playing..

It happened both with debian jessie and scratch (I'm currently using the latter) and I'm using mplayer

space-potato commented 8 years ago

Just checked and yeah, it's about less than 2 minutes after I paused the video/song (I only noticed this for audio only, I don't think it happens with videos too)

space-potato commented 7 years ago

i just realized that if you play a video with mpsyt playurl [url] (it plays with audio-only by default) it won't be affected by this issue. I hope this information might help in some ways.

sollericos commented 7 years ago

Thanks freeasinbear, this issue is still happening to me, but mpsyt playrl [url] did the trick for me!

space-potato commented 7 years ago

No problem! I'm not having this issue anymore, by the way. Can't really tell why, I just reinstalled it along with youtube-dl through pip. I suggest you to try to uninstall and reinstall these packages

sollericos commented 7 years ago

I installed pip, removed the youtube-dl package, reinstall via pip, then mpsyt refused to play any song. I've removed the youtube-dl package installed via pip in the step before and I've reinstalled the package I compiled via slackbuild and it seems to work rigth, now I'm playing "Best of Hot Funky House Music - Top Funky Megamix [1:53:38]". Don't stop. ;-) Thanks for the clue.

maop commented 7 years ago

Hello! Just my 2¢: i have an old netbook with ubuntu 14.04, installed pip3 from official repositories (python3-pip), then pip3 install mps-youtube and apt install mpv... it happened the same, freezed after 2-3min. Tried lots of things, but what solved the problem was just to upgrade mpv i installed it from this PPA: https://launchpad.net/~mc3man/+archive/ubuntu/mpv-tests

Since the problems is just having old packages i think this bug should be closed.

cheers!

paxperscientiam commented 5 years ago

@krogank9 Mpv or mplayer? Does mpv http://url/of/video work fine outside of mpsyt?

This helped me. Revealed a build discrepency between FFMPEG and MPV. Thanks!