maxcurzi / tplay

A terminal ASCII media player. View images, gifs, videos, webcam, YouTube, etc.. directly in the terminal as ASCII art.
MIT License
246 stars 16 forks source link

Application doesn't work on Arch Linux #4

Closed neon-mmd closed 1 year ago

neon-mmd commented 1 year ago

I was planning to package your commandline app for the aur but it seems like your application doesn't work on arch linux.

Steps to Reproduce

How did you install it

sudo pacman -S yt-dlp opencv clang mpv ffmpeg 
cargo install tplay

How did you run

In the home directory:

./.cargo/bin/tplay "https://<some-youtube-video-url>"

What Happened

After running the application the program froze with blank terminal with no audio or video playing even waiting for several minutes didn't help.

Expected Result

To get a youtube video to be played in the terminal.

Terminal Used

Kitty 0.28.1

Operating System Used

Arch Linux with linux-zen kernel version 6.2.13

maxcurzi commented 1 year ago

Have you tried to play a local media file or image? YouTube videos are downloaded before playing them (so very long videos may take a very long time to open). If that's the case I should put a progress bar (or just don't suppress yt-dlp output)

Try to tplay local videos/images first, then to make sure the crate can open videos from the internet try: tplay https://test-videos.co.uk/vids/bigbuckbunny/mp4/av1/360/Big_Buck_Bunny_360_10s_1MB.mp4 (The video is just 1MB, so it should take almost no time to load on a regular broadband connection)

And if that works, try a similarly short small video (on YouTube) to confirm that yt-dlp can download youtube videos: tplay https://www.youtube.com/watch?v=WSgQIsOE2rE

neon-mmd commented 1 year ago

Ok sure let me check and I will come back to you in a few moments.

neon-mmd commented 1 year ago

Ok it works thanks!!! :smile: . So the issue seems to be the length of the video if you can add a progress bar it would provide a good user experience.

Also some suggestions I want to provide for the project. I know this is not the right place but it is very important:

  1. Linux community has a lot toxic people so beware of them like they harress people, say mean things, etc like it also happended with big projects as well one example I can provide is of kitty project there was a recent issue over there where one guy was very mean he went so far as to say that the main developer is stupid he doesn't know anything. so my suggestion is don't talk with those people they will ruin your mood and your day.
  2. Provide issue templates in your project they make handling issues much easier.
  3. In your README add a part about like under Installation Debian its installations steps and at the end other distros with the sentence like with more contribution we can make our project available to more distros this will help you alot because you are not a super human :smile: so you can't package it for all distros.
  4. Don't over do your work this will burn you out very quickly and this is not. so I will suggest take plenty of rest.
  5. And also provide an FAQ section in the README.
  6. Also add a rolling branch to your repo which will be your unstable/working branch of your repo this will help you alot

Also why did you go with MIT why not GPLv3 licensing ?? just curious to know.

maxcurzi commented 1 year ago

Thanks for your comments, I'll make sure the yt-dlp output is not suppressed in future releases, maybe I'll release a 0.3.1 version as it's a genuine user experience issue that can cause some confusion.

Regarding your points:

  1. I don't really want to worry about this, I doubt that trolls would/toxic people would find any benefit in messing with this arguably small project;
  2. Makes sense
  3. Yeah it would be a massive endeavour to try and test installing it on most distros!
  4. Truth!
  5. That's something on my radar, I am looking into the various options for this, including makedoc, wiki on github and the likes, anything that requires the least effort to maintain
  6. Main is meant to be stable, any feature/unstable work is meant to be done on separate branches. However, from now on I should now start to make use of tagged releases to match the crate's version.

MIT is a generally more relaxed license, and I don't like how GPLv3 "virally" affects any derived work. If people like it, modify/repackage it it's fine (as long as they credit my original work).

neon-mmd commented 1 year ago

Oops again it failed :smile: . I think this is an issue occurring on some urls I guess but also thanks for enabling debugging. I will post the screenshot of the issue.

Here's how I reproduced it:

tplay 'https://www.youtube.com/watch?v=Vz96b0gm9qo'

Here is the screenshots of the issue: temp

With RUST_BACKTRACE=full: temp_2

maxcurzi commented 1 year ago

Yes, see #3

Unfortunately depending on which version of MPV you have (0.34 or 0.35) you need to use a different crate (see Cargo.toml).