mpv-player / mpv

šŸŽ„ Command line video player
https://mpv.io
Other
27.83k stars 2.87k forks source link

Support libsixel as a video output option #2183

Closed HalosGhost closed 9 years ago

HalosGhost commented 9 years ago

One of the most creative libraries I've seen recently for those of us who may not wish to use X is libsixel. It allows for the output of images directly in a terminal which supports it. As mpv still supports image outputs, this would not be dramatically different.

In fact, there is already a fork of ffmpeg that supports libsixel playback, so such a thing is not beyond possibility. However, I cannot estimate how much time/work it would be to implement this feature. Rest assured, I would deeply appreciate it if it ever gets implemented!

ghost commented 9 years ago

There's already --vo=drm.

HalosGhost commented 9 years ago

I would ask you to reconsider. dvtm may get libsixel support, and if/when it does, window management in the console may allow for libsixel images to be displayed only in the relevant window. --vo=drm is incredibly helpful for the moment, but it obscures the whole framebuffer which makes the use of things like dvtm as window managers less functional.

This kind of support would dramatically increase the usefulness of such tools to have a functional non-X workflow.

ghost commented 9 years ago

Maybe if someone else writes support. I'm not interested in such toy hacks. There are already 2 proper methods to do this, X and Wayland. Why a 3rd, hacked-together one?

HalosGhost commented 9 years ago

I realize it's a fairly niche use-case, so I completely understand your not being too interested in writing it yourself. But there are plenty of people who do not really feel the need for a full GUI; or, in my case, wish to escape it on some machines.

As I am likely to be one of the folks trying to implement sixel in dvtm, if we are successful, I will take a look at creating a PR for this on mpv.

haasn commented 9 years ago

But there are plenty of people who do not really feel the need for a full GUI

Then they should accept the loss of window management and other ā€œfull GUIā€ things, IMO.

That, or just use a ā€œfull GUIā€. Whatever that means.

oatberry commented 9 years ago

I'd just like to say that I'd be very interested in libsixel support as well.

I find the idea of an X-less workflow attractive, and I was very happy to learn of the existence of yaft (which, by the way, has sixel support) and dvtm (which may have sixel support in the future). These programs add several interesting features to a tty that make it act more like a full window manager.

libsixel support for mpv would just be icing on the cake. I understand your disinterest in implementing it, but I'm sure there are more people than just @HalosGhost and I who would be intrigued by this feature. Thanks!

tantei3 commented 3 years ago

@HalosGhost mpv now supports sixel playback through libsixel. Do give it a try!

yosefbernal commented 2 years ago

Hi all. I'm quite curious to try out this output driver, but when trying to launch mpv --vo=sixel <MyVideo> I get:

 (+) Video --vid=1 (*) (h264 1280x720 30.000fps)
[vo] Video output sixel not found!
Error opening/initializing the selected video_out (--vo) device.
Video: no video
No video or audio streams selected.

Exiting... (Errors when loading file)

Not sure why as this seems to be supported and documented on the mpb.io manual.

Any clues why this is?

CounterPillow commented 2 years ago

@yosefbernal make sure your mpv is up to date, and build with libsixel support. A complete --log-file would tell us if you've done both of these; open a new issue if you still experience problems.

yosefbernal commented 2 years ago

For the uninitiated, how do I do just that? Iā€™m not very comfortable with Linux yet so the whole procedure is kind of obscure to me. Iā€™ve followed several tutorials online on how to install the latest version but each one delivers a version lower than 0.34.1 (as shown in GitHub).

I chose not to open an issue since this isnā€™t really and issue but a question. Hope you can assist.

On Mar 21, 2022, at 12:47 AM, Nicolas F. @.***> wrote:

ļ»æ

@yosefbernalhttps://github.com/yosefbernal make sure your mpv is up to date, and build with libsixel support. A complete --log-file would tell us if you've done both of these; open a new issue if you still experience problems.

ā€” Reply to this email directly, view it on GitHubhttps://github.com/mpv-player/mpv/issues/2183#issuecomment-1073375788, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AICHYQ27IN2ATMFU32SSYTTVA62KTANCNFSM4BMQL5EQ. You are receiving this because you were mentioned.Message ID: @.***>

CounterPillow commented 2 years ago

@yosefbernal assuming you're on a Debian system:

sudo apt-get build-dep mpv
sudo apt install libsixel libsixel-dev
git clone https://github.com/mpv-player/mpv-build.git
cd mpv-build
./rebuild -j$(nproc)

Then symlink (ln -s $target $linkname, so from the file that exists to where you want the link to appear) the resulting mpv-build/mpv/build/mpv binary to some directory in your $PATH (e.g. ~/.local/bin), and uninstall the distro-provided mpv. Also symlink /usr/share/man/man1/mpv.1 to $your-dir-here/mpv-build/mpv/build/DOCS/man/mpv.1 if you want man mpv to work. Also symlink /usr/share/applications/mpv.desktop to $your-dir-here/mpv-build/mpv/etc/mpv.desktop.

bitcoinmeetups commented 10 months ago

I ran into the same issue. Please make mpv able to display videos in sixel by default. Sixel is great, now after 30 years Linux can finally do what my Commodore 64 could all the time: display graphics and command line in the same window : )