Solved Image viewer for the console.

Hi.

I like to know, is there is a chance to see images, pdf, and videos on the console (no X running) with the framebuffer on FreeBSD like there is on my Gentoo with fbi, fbgs and mplayer.

Looks like w3m (w3m-img) could show images, but is a project whit not update from a long time.

Regards.
 
Thanks for your quick answer.

Unfortunately, feh and mupdf need X running, Not the case with mplayer. Can see videos just with one console with full resolution.

I love work in a console, letting an X session to some minor job.

Any other suggestion?

Best regards.
 
It is possible to use www/w3m-img to view images from your xterm terminal emulator
(doesn't work with all terminal emulators). Just disable "Use external image viewer" option in w3m settings
(launch w3m and press "o"). Also it is good idea to disable "Confirm when quitting with q" option.
To show image info, when viewing it with w3m, press "=".
wVtJ657.gif

Hold arrow keys or space, to play animated gifs.

Also it is possible to use misc/img2xterm, to view images with your console,
I used to use it before www/w3m-img. To use img2xterm, your terminal should
support 256 colors, it works with 16 or 8 colors also, but then it isn't very useful.
7HviwRW.png
 
This really should be easy. I only need to get a wifi QR code displayed on the hostAP machine to scan it into a client device. No one is going to install Xorg just for that. The only alternative is to move it to a USB thumb drive?
 
This really should be easy. I only need to get a wifi QR code displayed on the hostAP machine to scan it into a client device. No one is going to install Xorg just for that.

A while ago I made a fork of a gameboy emulator to run on the DRM framebuffer.

It isn't too tricky to load an image using i.e stb_image and the libdrm specific part of my project to do what is needed.

I did make some progress on getting the old vgl(3) library updated to use libdrm as a backend. However since GitHub has started requiring non-standard methods such as an insecure phone or sleazy authenticator to sign in, I kind of just lost interest in sharing so much of my code publicly.

but typing in an SSID and key into the client isn't too taxing for now...
 
A while ago I made a fork of a gameboy emulator to run on the DRM framebuffer.

It isn't too tricky to load an image using i.e stb_image and the libdrm specific part of my project to do what is needed.

I did make some progress on getting the old vgl(3) library updated to use libdrm as a backend. However since GitHub has started requiring non-standard methods such as an insecure phone or sleazy authenticator to sign in, I kind of just lost interest in sharing so much of my code publicly.

but typing in an SSID and key into the client isn't too taxing for now...
Oh, it would be pretty nice. I mean, if it's not too tolling on your time and you have something you could repurpose? Using a thumb drive for this is pretty accessible, but wouldn't it be nice to just scan your FreeBSD screen?

Typing a randomly generated, max allowed characters for WPA3 long password into a smartphone is not trivial.
 
Hi.

I like to know, is there is a chance to see images, pdf, and videos on the console (no X running) with the framebuffer on FreeBSD like there is on my Gentoo with fbi, fbgs and mplayer.

Looks like w3m (w3m-img) could show images, but is a project whit not update from a long time.

Regards.
dear takumi :
how to solve your requirement in freebsd shell ? thanks. please show me some solution .
 
Recently, searching for something else in the FreeBSD mailing lists, I stumbled over a mail asking about this very subject:

photo/video on tty console with the new VT/framebuffer

TL;DR

It's possible to view images and videos in the vt(4) console, provided a DRM (Direct Rendering Manager) KMS (Kernel Mode Setting) video driver is available, such as graphics/drm-kmod.

Videos and images can be viewed (only full-screen) with multimedia/mpv (didn't try multimedia/mplayer). I have full player control.

Videos: mpv --vo=drm <video_file>

Images: mpv --keep-open=yes <image_file>

q Stop playing and quit

For PDFs in console I don't have much use, but noticed that misc/lesspipe can display PDFs, text only, no images.
 
I made a port of a gameboy emulator to the libdrm / KMS layer which FreeBSD now uses for its VT framebuffer console.
There is a lot of boiler-plate to get access to a raw framebuffer, but once it is in place, it is very easy to display images. It might help?

I have been meaning to update (and perhaps reinstate) the old FreeBSD vgl(3) library to use libdrm underneath. But alas, I have had quite a few other projects to work on first. It would have been easier if it hadn't been removed from the FreeBSD tree.
 
Recently, searching for something else in the FreeBSD mailing lists, I stumbled over a mail asking about this very subject:

photo/video on tty console with the new VT/framebuffer

TL;DR

It's possible to view images and videos in the vt(4) console, provided a DRM (Direct Rendering Manager) KMS (Kernel Mode Setting) video driver is available, such as graphics/drm-kmod.

Videos and images can be viewed (only full-screen) with multimedia/mpv (didn't try multimedia/mplayer). I have full player control.

Videos: mpv --vo=drm <video_file>

Images: mpv --keep-open=yes <image_file>

q Stop playing and quit

For PDFs in console I don't have much use, but noticed that misc/lesspipe can display PDFs, text only, no images.
Dear t-daemon:
thanks for your help . yes, i can view image and saw movie in VT with mpv .......but i must info below imformation.
1. we have use nividia graphic . driver is nvidia-driver-550.54.14 , not drm driver. i still mpv image and video normal.
2. when we play video , the command is : mpv --vid=1 videofile.mkv or mpv videofile.mkv .............when you use mpv --vo=drm videofile.mkv will get errors,it's not work.

thanks. that will help everyone. thanks.
my version : freebsd14.1
 
Recently, searching for something else in the FreeBSD mailing lists, I stumbled over a mail asking about this very subject:

photo/video on tty console with the new VT/framebuffer

TL;DR

It's possible to view images and videos in the vt(4) console, provided a DRM (Direct Rendering Manager) KMS (Kernel Mode Setting) video driver is available, such as graphics/drm-kmod.

Videos and images can be viewed (only full-screen) with multimedia/mpv (didn't try multimedia/mplayer). I have full player control.

Videos: mpv --vo=drm <video_file>

Images: mpv --keep-open=yes <image_file>

q Stop playing and quit

For PDFs in console I don't have much use, but noticed that misc/lesspipe can display PDFs, text only, no images.
DEar t-daemon:
today is 2024-Aug-12d , i can't pkg search mpv from freebsd repos........
root@f233314:/home/ddd # pkg search mpv
p5-Devel-Dumpvar-1.06_3 Pure-OO reimplementation of dumpvar.pl
p5-Net-Frame-Layer-ICMPv6-1.09 Perl encoding/decoding implementation of the ICMPv6 layer

nothing be found for mpv
what happened to us ?
when i install mpv use ports. our country block some site, i can't finished it .it's sad ........
 
It doesn't seem to be in latest. A couple of people have talked about putting a sticky about this, though if it's done, probably most people won't see it. Sometimes packages fail to build on the build server, or a needed dependency won't build. You just have to be patient and wait. The package will show up. It might take as long as the next quarterly build, or it might be sooner.
I was going to say use mplayer in the interim, but mplayer seems to be missing as well.

For what it's worth, with an NVidia card and kmod loaded, I can play a video with mpv in console. However, after that, I'm unable to switch to a different vt, or startx and have to restart the machine. It's not something I do often (that is, playing video in console) so I haven't investigated it. My console, after the video is done, or I've stopped it, just leaves some colored streaks on the console and I can't do anything--it's unresponsive to keyboard input, I have to ssh in from another machine and reboot.

But, to answer your specific post, probably the package or necessary dependencies, failed to build and it will be along next quarter or sooner.
 
Last edited:
multimedia/mpv , multimedia/mplayer were skipped from building due to multimedia/x265 build failure (patch fetch problem, checksum mismatch, PR 280674.

multimedia/x265 is now fixed. You can expect packages from the next package buildings.
 
multimedia/mpv , multimedia/mplayer were skipped from building due to multimedia/x265 build failure (patch fetch problem, checksum mismatch, PR 280674.

multimedia/x265 is now fixed. You can expect packages from the next package buildings.
Dear t-daemon:
thanks for your reply.........i study more
 
Recently, searching for something else in the FreeBSD mailing lists, I stumbled over a mail asking about this very subject:

photo/video on tty console with the new VT/framebuffer

TL;DR

It's possible to view images and videos in the vt(4) console, provided a DRM (Direct Rendering Manager) KMS (Kernel Mode Setting) video driver is available, such as graphics/drm-kmod.

Videos and images can be viewed (only full-screen) with multimedia/mpv (didn't try multimedia/mplayer). I have full player control.

Videos: mpv --vo=drm <video_file>

Images: mpv --keep-open=yes <image_file>

q Stop playing and quit

For PDFs in console I don't have much use, but noticed that misc/lesspipe can display PDFs, text only, no images.
Dear T-daemon:
today ,i have got new problem, detail in below.
Code:
game@fb14:~/download $ mpv --vo=drm videoBG.17363418b3c2246a0e27.mp4
 (+) Video --vid=1 (*) (h264 1920x1080 30.000fps)
[vo/drm/drm] VT_GETMODE failed: Inappropriate ioctl for device
[vo/drm/drm] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/drm/drm] No primary DRM device could be picked!
[vo/drm/drm] Failed to find a usable DRM primary node!
Error opening/initializing the selected video_out (--vo) device.
Video: no video
No video or audio streams selected.
Exiting... (Errors when loading file)
game@fb14:~/download $ q
I have used intel i5-1135g7 has xe graphics drm driver. but when I play video in vt(4), it's show me no video_out device.
can you show me some solution about this ? thanks.
Code:
mpv -v
[cplayer] Command line options: '-v'
[cplayer] mpv 0.38.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Aug 17 2024 01:31:55
[cplayer] libplacebo version: v7.349.0
[cplayer] FFmpeg version: 6.1.2
[cplayer] FFmpeg library versions:
[cplayer]    libavutil       58.29.100
[cplayer]    libavcodec      60.31.102
[cplayer]    libavformat     60.16.100
[cplayer]    libswscale      7.5.100
[cplayer]    libavfilter     9.12.100
[cplayer]    libswresample   4.12.100
 
I forgot to mention:

The user must be in the "video" group. If they are not, see pw(8) or vigr(8) how to add user to groups.

If the user is logged in, the groups change to take effect, the user must log out and log in again.
 
I forgot to mention:

The user must be in the "video" group. If they are not, see pw(8) or vigr(8) how to add user to groups.

If the user is logged in, the groups change to take effect, the user must log out and log in again.
Dear T-daemon:
now i meet new problem , i have used screen command and create 3 split terminal windows. now , i want to play video with mpv in one terminal window ... can we do it ? how can i configure mpv ? if we can't configure mpv , when i play video with mpv , will make full screen. thanks.
 
Back
Top