You are not logged in.

#1 2011-07-26 23:00:42

intnull
Member
Registered: 2011-07-26
Posts: 6

videotop - a console browser for online videos

videotop - a console browser for online videos

Another YouTube downloader with an ncurses interface and Vim-like keybindings written in python2.
Please check the GitHub README to learn how to use it and feel free to leave comments and suggestions.

Screenshots

tOW42Nw

Dependencies
  • python-urwid

  • python-gdata

  • youtube-dl

Installation

AUR (git version)

Links

Last edited by intnull (2011-08-07 21:32:01)

Offline

#2 2011-07-27 10:22:21

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,840
Website

Re: videotop - a console browser for online videos

Some Progressbar would be nice tho - apart from that, fine tool :)
Could you integrate cclive support to make playing videos work instantly instead of downloading them first...

**EDIT**
After waiting roughly an hour now for the file to start playing, i guess the playing function does not work all :)

Last edited by Rasi (2011-07-27 11:37:25)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#3 2011-07-27 17:26:29

stressat
Member
From: Romania
Registered: 2010-10-10
Posts: 69
Website

Re: videotop - a console browser for online videos

Thanks you, but videotop don't play files, only download them, and mplayer is my default player... In browser is ok.
+1 Rasi

Offline

#4 2011-07-28 23:08:14

aluser
Member
Registered: 2011-01-16
Posts: 119

Re: videotop - a console browser for online videos

i have both python-urwid and gdatas installed but I get ImportError: No module named urwid for some reason

Offline

#5 2011-07-29 15:43:09

intnull
Member
Registered: 2011-07-26
Posts: 6

Re: videotop - a console browser for online videos

@Rasi:
Hehe the playing function is just a hack right now.
(It currently doesn't check if the file exists and the statusbar is a bit misleading)
For now you can play the downloaded videos by typing ":v<Enter>" which lists the videos in the download directory and hitting p, this will definitely work.

Streaming videos sounds like a good idea, I will look into that.

@aluser:
That's strange, can you open it with "python2 videotop"?

Last edited by intnull (2011-07-29 15:44:23)

Offline

#6 2011-07-29 18:35:14

aluser
Member
Registered: 2011-01-16
Posts: 119

Re: videotop - a console browser for online videos

kk got it to work after trying python2 instead of just python.
i gotta say this is pretty cool and can come handy for those of us who hate flash with a passion.
It would be much more efficient though if we could see the download percent of a video in there somewhere.

Offline

#7 2011-08-04 07:40:08

intnull
Member
Registered: 2011-07-26
Posts: 6

Re: videotop - a console browser for online videos

Quick update:

Since YouTube changed something internally, youtube-dl is currently broken.
However, there is a fork of youtube-dl by phihag in the AUR which fixes this issue.

Offline

#8 2011-08-06 17:47:15

intnull
Member
Registered: 2011-07-26
Posts: 6

Re: videotop - a console browser for online videos

Update: Implemented progress bar

Downloading a video now conveniently shows the output of youtube-dl (see screenshot).
You can abort the download of a video by selecting it and hitting a.
If you download the video again with ENTER, it resumes the download rather than starting all over again.

tOXM5Mg

Offline

#9 2011-08-09 14:49:05

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: videotop - a console browser for online videos

Will it be possible to directly stream the video? Because I don't really like this "download -> watch -> remove" thing.

Offline

#10 2011-08-09 17:09:33

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: videotop - a console browser for online videos

I would guess that streaming would go something like this:
* Download ~5% of the video file (overall size / 20)
* Let mplayer start playing the file, somehow monitoring its position in the video
* If we get within a 1% range between the end of the downloading file and where mplayer currently playing, freeze (pause) and buffer the video until we get back to 5%
* If/when playback is aborted/finished, delete the video file

Offline

#11 2011-08-09 22:19:31

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: videotop - a console browser for online videos

Wouldn't it be much easier to simply use mplayer to stream the file? Youtube-viewer from the AUR does that afaik and it works fine.

Offline

#12 2011-08-09 23:19:21

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: videotop - a console browser for online videos

Army wrote:

Wouldn't it be much easier to simply use mplayer to stream the file? Youtube-viewer from the AUR does that afaik and it works fine.

...or we could do that. tongue

Last edited by itsbrad212 (2011-08-09 23:19:34)

Offline

#13 2011-08-10 19:10:18

intnull
Member
Registered: 2011-07-26
Posts: 6

Re: videotop - a console browser for online videos

Yeah, MPlayer can stream the file directly although it's a bit tricky.
There is a video by metalx1000 on YouTube which shows how to do that with youtube-dl,
but I'm still interested in how youtube-viewer does it.

I started implementing streaming support (thanks to metalx1000) in the latest git version of videotop, if you press s the focused video starts to stream.
You might also want to add something like this in your MPlayer config (~/.mplayer/config), the values depend on your internet connection:

[default]
cache = 8192 # 8 mb cache
cache-min = 5 # play if 5% of the cache is loaded in memory

Note that fast-forwarding doesn't really work and I have no clue how to fix that, also youtube-viewer still seems to be broken.

Offline

#14 2011-10-01 12:05:37

intnull
Member
Registered: 2011-07-26
Posts: 6

Re: videotop - a console browser for online videos

Update
  • Selected downloaded videos can now be deleted with :delete (WARNING: no undo)

  • Minimal readline support: in command mode hitting CTRL p or CTRL n moves through previously entered commands (you can also use the arrow keys)

  • Changed the layout to get more advantage of available text space and added dividers for a better overview

tYWx2Zw

Offline

#15 2012-10-30 11:13:59

Boobek
Member
Registered: 2011-03-15
Posts: 7

Re: videotop - a console browser for online videos

I'lll want to add new features to this project like
- youtube login
- youtube playlist view & video add
- headless play support (no video output)

Anyone interrested in this work?

Boobek

Offline

Board footer

Powered by FluxBB