Giter Club home page Giter Club logo

pipe-viewer's Introduction

pipe-viewer

A lightweight application (fork of straw-viewer) for searching and playing videos from YouTube.

This fork parses the YouTube website directly and relies on the invidious instances only as a fallback method.

pipe-viewer

  • command-line interface to YouTube.

pipe-viewer

gtk-pipe-viewer

  • GTK+ interface to YouTube.

gtk-pipe-viewer

AVAILABILITY

REVIEWS

VIDEO REVIEWS

TRY

For trying the latest commit of pipe-viewer, without installing it, execute the following commands:

    cd /tmp
    wget https://github.com/trizen/pipe-viewer/archive/main.zip -O pipe-viewer-main.zip
    unzip -n pipe-viewer-main.zip
    cd pipe-viewer-main
    ./bin/pipe-viewer

INSTALLATION

To install pipe-viewer, run:

    perl Build.PL
    sudo ./Build installdeps
    sudo ./Build install

To install gtk-pipe-viewer along with pipe-viewer, run:

    perl Build.PL --gtk
    sudo ./Build installdeps
    sudo ./Build install

DEPENDENCIES

For pipe-viewer:

For gtk-pipe-viewer:

Build dependencies:

Optional dependencies:

PACKAGING

To package this application, run the following commands:

    perl Build.PL --destdir "/my/package/path" --installdirs vendor [--gtk]
    ./Build test
    ./Build install --install_path script=/usr/bin

INVIDIOUS INSTANCES

To use invidious instances, pass the --invidious option:

    pipe-viewer --invidious

or set in the configuration file (~/.config/pipe-viewer/pipe-viewer.conf):

    prefer_invidious => 1,

To use a specific invidious instance, like invidious.fdn.fr, pass the --api=HOST option:

    pipe-viewer --invidious --api=invidious.fdn.fr

To make the change permanent, set in the configuration file:

    api_host => "invidious.fdn.fr",

When api_host is set to "auto", pipe-viewer picks a random invidious instance from api.invidious.io.

SUPPORT AND DOCUMENTATION

After installing, you can find documentation with the following commands:

man pipe-viewer
perldoc WWW::PipeViewer

LICENSE AND COPYRIGHT

Copyright (C) 2012-2024 Trizen

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See https://dev.perl.org/licenses/ for more information.

pipe-viewer's People

Contributors

antonialoytorrens avatar benoit-pierre avatar cyb3rc0nn0r avatar dm1tz avatar namazso avatar pirate486743186 avatar r-ricci avatar trizen avatar veraellyunjie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pipe-viewer's Issues

pipe-viewer doesn't know it's up to date

Any time I attempt to watch a video, I get the following:

WWW::PipeViewer version v0.1.4 required--this is only version v0.1.3 at /usr/bin/pipe-viewer line 49.
BEGIN failed--compilation aborted at /usr/bin/pipe-viewer line 49.

I am running the latest version from the AUR -git package.

pacman -Qi pipe-viewer-git
Name            : pipe-viewer-git
Version         : 0.1.4.r0.gc999250-1

The command line parameters/config options had no effects.

Using version 0.1.7

  1. Tried to use the --results=50 but the pipe-viewer always shows 20 results.
  2. I set up the maxResults=50 which shows correctly when I use --help, but has no effect on the results displayed (still 20).
  3. Tried to use --page=x (where x was 2, 3, 4, 5), but only first page was always displayed.

Why do I have such issues?

Kind regards,
Piotr

Option -ls doesn't show any video

Thank you by the way for implementing offline subscriptions, it is very much appreciated.

The behavior is very simple to explain: you can save channels using :save=i, and they show up using -lc, but -ls doesn't show anything at all, unlike youtube-viewer.

hide terminal in GTK application [Feature]

I was wondering whether the terminal could be hidden when using the GTK version of pipe viewer, when the "audio only" option is enabled. It would be very useful and (I think?) not too difficult to pull off. thanks in advance,

ubuntu dependencies

here are the ubuntu dependencies, so that others don't go dig for them. A simple copy paste should do. Not fully tested

pipe-viewer
libwww-perl liblwp-protocol-https-perl libdata-dump-perl libjson-perl

build module
libmodule-build-perl

gtk-pipe-viewer
libgtk3-perl libfile-sharedir-perl

optional (liblwp-useragent-cached-perl doesn't exist in ubuntu)
libterm-readline-gnu-perl libjson-xs-perl
libunicode-linebreak-perl or libtext-charwidth-perl

all
libwww-perl liblwp-protocol-https-perl libdata-dump-perl libjson-perl libmodule-build-perl libgtk3-perl libfile-sharedir-perl libterm-readline-gnu-perl libjson-xs-perl libunicode-linebreak-perl libtext-charwidth-perl

[feature]use emoji instead of asciii symbols

something like this

my %symbols = (
               up_arrow    => '👍',
               down_arrow  => '👎',
               diamond     => '💡',
               face        => '😃',
               black_face  => '🤖',
               average     => 'x̄',
               ellipsis    => '🗃️ ',
               play        => '▶️ ',
               views       => '👀',
               heart       => '❤️ ',
               right_arrow => '⏱️ ',
               crazy_arrow => '✨',
               numero      => '#️⃣ ',
              );

How can I pass video ID as an argument?

I write mpv addon to use sponsorblock with local database and I need to get video IDs. But I didn't found that option in code. So can I pass video ID as an argument?

make dynamic cli?

Not really an issue, but when you search in the cli, it will reprint what was already there.
image

Although I understand this will take a long time to do, I was wondering whether this is currently something the developers are working on? Making a dynamic cli, like mpsyt, would be much more cleaner.
Are there any workarounds currently for this?

Add support for Newpipe OPML files

Newpipe is widely used for libre software enthusiasts on Android and offers the user the option to save the data of subscribed channels, saved playlists and defined settings as one OPML file. Android will still be widely used, so is interesting to mantain the standard form of managing the file. Of course other forms of managing the database can be achieved, but by this way the users will more easily use the program.

mpv-sponsorblock with pipe-viewer

I need to use URL instead of VIDEO to have mpv sponsorblock work.
With URL, pipe-viewer doesn't tell mpv the resolution to use so you would have to configure that manually.
--ytdl-format='bestvideo[height<=RESOLUTION]+bestaudio/best[height<=RESOLUTION]'
This would work if RESOLUTION returned just the vertical height of the video [720] and not the height with a p [720p].

[Help] Modify what information is poured out on selecting a video / how they are displayed (the description / video creator etc...)

Hi,

I looked at the documentation and configuration and I don't think I have found anything that pertains to this. Basically I'd like to decorate / select the output (the description / video details) that is shown on selecting a video -- all the information bits that are separated by dashes (----). I know I can change and modify the format used to display the various search results but I haven't found anything regarding the output itself. Hopefully you get what I am saying and this isn't in some documentation I've over looked.

thanks!

Issues loading next page of results

I almost entirely open pipe-viewer (CLI) with the -u or -sc options rather than searching all of YouTube, but when I do, the :n command almost never works on those results from a single user, displaying "[!] This is the last page!". I know it's not, and it's generally not too much of an issue since the thirty or so videos I can access still give me plenty of viewing material, but I do occasionally want to pull up something older. More egregiously, though, the same thing happens with the playlist view, which means I have a lot of trouble seeing any episode 21 or later. I'm guessing it's some issue with pages sorted chronologically (forwards or reversed) since the -sc list itself also has no issue going to the next page, but I'm not exactly sure what would cause it.

login problem

nothing happens when i try to login. Search invitation appears again:

[user@juser-pc ~]$ pipe-viewer 

=>> Search for YouTube videos (:h for help)
> :login

=>> Search for YouTube videos (:h for help)
> :q
[user@user-pc ~]$ 

System: Void Linux
Version: 0.0.9

switch to yt-dlp?

yt-dlp is a fork of youtube-dl
https://github.com/yt-dlp/yt-dlp

youtube-dl didn't have a release for 2 months now.... you even manually added support for age restricted videos.
You might want to consider officially switching to yt-dlp, it seams to be the best of youtube-dl forks. (it even has "--write-comments")

now i also notice that you don't mention youtube-dl in the dependencies.

audio only downloads a full video

Why download a whole video (i'm guessing, max quality)
and not just download the audio file?
That's a very large waste of bandwidth.

[Feature] Support search history

Currently the up and down arrows do nothing but print their codes (?) it would be nice if you could use them to navigate to past searches.

Reverse sorted playlist - how to handle them ?

Hello there !

First of all, thanks a lot for this software that rock.

Sometime a playlist is ordered from newest to oldest. To play them I can see two options:

  • Add a command to reverse a searched list of results
  • Allow to ..1 that would mean "last to first" (similary to 1.. "first to last")

Is there already a way to handle those cases and I missed it ? Those solutions are conceivablle ?

Thanks a lot !

Offline subscription mechanism

Right now :subscription seems to require the login, but if I do :login nothing happens. It would be nice to have :subscription to subscribe only in an offline manner, in a JSON file or whatnot. Also :login seems out of place since this version of the app does not make use of the YouTube APIs from what I can understand.

Pipe-viewer download speed throttling query

I ran across this yesterday and was wondering if it is something I missed in the config, or if it's something with my computer.

I'm usin the latest commit of pipe-viewer and a distro packaged yt-dlp. The config file is the default, bar changing resolution to audio instead of best.

If I call yt-dlp from outside pipe-viewer I get 5+ mb download speeds. However if I download a video from within pipe-viewer, it throttles it down to under 100 kbps. Is this a known issue, or something I can change in the config file somewhere? I don't have the issue playing videos, only downloading them, and wget behaves the same way iff it is set to download via it in the config file

extreamly slow when opening a video

Also the video streaming is super slow. It buffer for a minute then play video for 5 sek. Internet is fine. Videos on yt are opening super fast.

What is going on? Hm...

[feature] subs in audio only

mpv supports subtitles(in the terminal) in audio only.
For example, this works:
mpv --no-video --slang=en https://www.youtube.com/watch?v=ZmQF1LmjpUg

[feature] gui improvements when lauching a video

It would be nice to have a visual cue, that you indeed launched the video. For example, the block of the video in the list could blink when it starts launching the video. (hmm, is it just slow, or i didn't press the button well enough?)

It would be nice, to immediately fork a new process when starting a video. For example, the cli app is forked, that then launches the video. This prevents the gui from freezing while it does its thing. I mean, this would be hidden from the user, not launching it with xterm. forking the cli app, would be the simplest way to do it.

[Feature Request] Make --extract work when there are multiple search results

Foreword: Trizen, your work is awesome.

System: Ubuntu 21
Version: CLI Pipe Viewer 0.1.3

I'm trying to use pipe-viewer to only extract information. Objective is to have search results, or the video links/IDs most importantly, saved to a file.

This,
pipe-viewer --no-interactive --extract '*TITLE* (*ID*)' --extract-file results.txt 'https://www.youtube.com/watch?v=zfFo8BtPTnc'
produces a file with contents:

Chico Xavier - Contos Desta e Doutra Vida (zfFo8BtPTnc)

The option "--dump json" is ignored.

It would be great if something like this,
pipe-viewer --no-interactive --extract '*TITLE* (*ID*)' --extract-file results.json --dump json --related 'https://www.youtube.com/watch?v=zfFo8BtPTnc'
would output a file with multiple results, instead of an empty file. Json or plain text.

select and play video then return to the search result

Hi,
Would it be possible to select & play a video then returns to the search results while keeping the playing video running ?
Currently, when I select & play a video, I have to exit the playing video to return to the results.
This would allow to quickly preload multiple video from a single tab.
Thanks for reading, and thanks for this very useful software.

No support for 144p resolution

Hi,
I found both cli and gtk version does not offer 144p support, I don't have experience with perl. However I was able to get 144p suppot on cli version by looking at the code for cli and entering the following line, at line number 1450.

'144p|8' => sub { $opt{resolution} = 144 },

I could not do this on gtk version. Could you tell me how should I modify the gtk version code to enable 144p resolution support?

[QUESTION]: How to use absolute paths to referenced programs?

I am packaging pipe-viewer into Guix.

The programs ffmpeg, mpv, wget, xdg-open, and youtube-dl; are referenced in the files bin/pipe-viewer, bin/gtk-pipe-viewer, and lib/WWW/PipeViewer.pm.

IIUC, the application tries to find these programs in $PATH (as if they were installed explicitly in the system). Guix works in a different way. If the app were to be run in a pure environment or in container, the app can only have access to specific things. Other things installed in system are not accessible to the app.

So I am trying to replace those references (program) with absolute references (/path/to/program). I tried replacing the occurrences of 'program' and "program", to '/path/toprogram' and "/path/to/program", respectively; in the files bin/pipe-viewer, bin/gtk-pipe-viewer, and lib/WWW/PipeViewer.pm.

But I still get this error:

Can't exec "youtube-dl": No such file or directory at /gnu/store/k8c3019fvagc89rsm1qz87p6f4m9mnyj-pipe-viewer-0.1.2/lib/perl5/site_perl//5.30.2/WWW/PipeViewer.pm line 1489.
sh: mpv: command not found

Could anyone please help me with what is wrong and how to correct it?

Regards,
RG.

Cannot get full description from search results

First of all, thank you very much for this hugely useful tool!

The problem I ran into is that while simply playing a video, or when using the :info command, pipe-viewer simply display a short description, like for example:

Roll Over Beethoven (FULL SONG) by happydude010 12 years ago 8 minutes, 25 seconds 2,754,495 views

However, if I use the full youtube URL in pipe-viewer, then I get the complete video description, as seen on the actual youtube page.

If fixing this issue results in an unacceptable performance hit in normal use, would it be possible to at least fix the :info command or perhaps add a :description command?

XDG standard

there's the xdg specification for user directories
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables

They are the xdg variables, that i don't know if many people actually use.
they are also the default cache, config and local directories.

you put too much stuff in .config .
The "$HOME/.local/share" directory is for user specific data, like history, or other stuff that are generated as the user uses the program, but can't be automatically be regenerated if deleted, like the stuff in cache.

ueberzug

Is there an alternative way to view thumbnails in Wayland that could be used by pipe-viewer?

This pipe-viewer with thumbnails is almost exactly what I was looking for.

Thank You!

unsupported webp thumbnails

In "show more details", often i don't see the thumbnails.
I think, the underlying libraries don't support webp.

i'm getting this error (debian 11, 32bits):
Image type “webp” is not supported at /usr/lib/i386-linux-gnu/perl5/5.32/Glib/Object/Introspection.pm line 67.

Either it's a missing dependency, or it needs a conversion.
Probably, it should first try to load them as is, then fallback in converting them.
This way it's future/back proofed.

[UI] show more details

In the "show more details" window.
Can you split the column of details into two columns and leave more room for the description?

Live Stream Video not showing in search results but url is playable

This video https://www.youtube.com/watch?v=3gOlzV1qEjE does not show up in search results when seaching for the string '4k lofi study music'. For one day, I was able to get around this by setting order to "relevance" and searching for another video before re-inputting the original search string. However, my luck with that has clearly run out and this method is not working anymore. I have attempted to delete the cache directory and config to no avail. However, playing the video by pasting the youtube link does work. I checked and it appears that the code for filtering videos with no time has been commented out. I confirmed this by removing the code and rebuilding the program. (Sorry I'm not a perl developer.) Hope this helps.

reddit comments

invidious also supports reddit comments.
It should be relatively simple to add this feature.

Always pass youtube url to player

Hi, I don't understand enough about Perl to figure this out myself, but I think a setting or a new *VARIABLE* to always pass "youtube_video_url" to the selected player, even when pipe-viewer is falling back to the Invidious API to grab search results and comments would be nice.
Invidious nodes tend to be a little slower, and plugin support in the youtube-dl project (I removed the --no-ytdl arg in my config) for it is understandably slightly less maintained than its support for youtube itself. In my case mpv's "ytdl-format" setting isn't working as-is, and I think the reason might be that youtube-dl doesn't know how to select video resolutions with Invidious.
pipe-viewer's "-2", "-3" arguments do work, and I saw something to do with resolution in the config file, but I'd still enjoy the faster speed of watching videos from youtube itself, and unlike the rest of the API, that point will only ever fail if you get a http 503.

GUI: Allow column to be collapsable and change position of the search bar

Amazing work you've done! I use this program almost every day on lightweight devices that cannot handle web browsing.

Just a few nitpicks, I'd like more usability on smaller screens.
For example, allowing collapsable columns (I barely use the second column, for advanced search), so I'd like to hide it when I don't need it.

Then, the search bar could belong to the first column, as this column should always remain visible, and the search bar should always be accessible.

Here's a small draft to clarify my explanation:
usability-pipe-viewer

Thank you very much in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.