25

I just set up a server and ran some sample video tests, but for some reason the video is showing characters and numbers instead of pixels. Here is an image of how I see it:

https://i.stack.imgur.com/KlOnO.png

Do you think it has anything to do with the video card configuration, or could it be a simple matter of setting VLC's properties correctly?

I can't install any other video player at the moment because I don't have administrator privileges, so I am stuck with VLC.

3
  • Your VLC window looks weird. Is this VLC running remotely? Or through some kind of terminal emulator? If so, VLC may be automatically falling back to a compatible display mode, in this case, ASCII! – misha256 Oct 12 '15 at 21:57
  • 24
    The hint would appear to be in the titlebar..... – Lightness Races in Orbit Oct 12 '15 at 23:18
  • 1
    @misha256, the icon in the title bar looks like putty – Holloway Oct 13 '15 at 10:05
23

Based on the icon in the screenshot:

enter image description here

I assume you use PuTTY on a Windows machine to connect to a remote host via an SSH session.

The thing you see in the screenshot is what happens if you use VLC through PuTTY, or any other SSH session for that matter. In general, SSH sessions are only capable of transmitting characters (and escape sequences, which do things such as setting colors etc.). VLC detects this as the only output available and plays it like that. (I bet it doesn't play audio too?) What you want requires graphical mode.

Graphical programs CAN be executed remotely on Linux machines, but it requires X11 forwarding. How does it work? The SSH server rather than transmitting characters (and escape sequences), transmits X11 messages. That way, your local window manager can parse these messages, interpret them and emulate the window locally. Events such as mouse clicks, key presses etc. are sent back to the server, which executes actual program code. I don't know of any other graphical environments that can work this way.

You'll be able to run a Linux X11 program on Windows if you run a local X11 server. The only software capable of doing this I know is Cygwin which can emulate X11 environment, I don't know of any other methods. (You'd need to start Cygwin, start X server inside, open terminal in X server, connect to remote host using SSH forwarding and execute the command from there.)

There's also the whole VNC / virtual desktop thing, but it works differently: you connect to the remote host, and it dumbly streams you the remote desktop. The differences are that you see the whole remote desktop inside a window (that will have different screen size if the remote monitor resolution doesn't match yours), rather than seeing remote programs normally as if they were executed locally. And since it's dumb, it'll compress the desktop as if it was video, on the fly, without understanding what really happens (save for things such as cursor pointer interaction.)

Both of these methods are very resource expensive when used for remote video playback, and it just ain't worth it.

What you might want is to grab the remote movie, download it to your local machine and play it locally. You can do so using scp or its equivalent from the PuTTY suite.

6
  • 2
    I know for a fact VLC does this, and I suspect this is the correct answer. The other ones arn't 'wrong' but this is more correct. In addition, the 'caca' is libcaca, which is a library used for things like this. – Journeyman Geek Oct 13 '15 at 12:20
  • Just wanted to point out, besides Cygwin, there is an excellent Windows program called Xming that provides an X server which is far easier to set up and get running, especially if you don't need the extra weight of a full Cygwin installation. – slickdeveloper Oct 13 '15 at 15:02
  • Thanks for pointing it out. On top of being more lightweight, it looks much better too. – rr- Oct 13 '15 at 16:55
  • 2
    thinking about X servers, I feel Xming is quite old. MobaXterm seems to do a great job at both emulating terminal and providing X support. – Ciprian Tomoiagă Oct 13 '15 at 17:19
  • @Ciprian Tomoiaga MobaXterm is merely a repackaged Cygwin, lagging (expectedly) behind the most recent Cygwin version. – oakad Oct 14 '15 at 0:17
25

VLC supports playing back videos as ASCII art (it does the conversion on the fly). Check your VLC settings, and ensure you choose something other than ASCII output.

The screenshot is Windows, but it's essentially the same in other operating systems.

NOTE: It's also possible that VLC is falling back to a display mode that will actually work in your setup. If you're running VLC through a terminal emulator or some kind of remoting/client-server setup, then ASCII might be the only display mode that VLC has established will work.

VLC Video Settings

8
  • 1
    You beat me by 20 seconds ... ;) – DavidPostill Oct 12 '15 at 21:56
  • Hmm. I'm running Windows as well. I wonder why I have tabs on top and you have them on the left? – DavidPostill Oct 12 '15 at 21:57
  • @DavidPostill I know, 20 seconds! And pretty much the same answer too. I might be running an older version of VLC than you, may explain the layout difference. – misha256 Oct 12 '15 at 22:01
  • I'm running 2.2.1 – DavidPostill Oct 12 '15 at 22:02
  • @DavidPostill is using "Classic" Windows GUI, while misha256 is using "Aero". This probably makes VLC use its Windows 98 (or whatever) GUI code rather than more modern APIs where it's easier to build side tabs. – OrangeDog Oct 13 '15 at 11:11
11

Could it be a simple matter of setting VLC's properties correctly?

You have selected "Color ASCII art video output" in your "Preferences" > "Video Settings".

To fix this:

  1. Select the menu "Tools" > "Preferences" or press CtrlP.
  2. Select the "Video" tab.
  3. Change "Output" from "Color ASCII art video output" to "Automatic".

    Where to change the output setting

  4. Click "Save".

  5. Restart VLC.
1

rr- answer and Ciprian Tomoiaga comment solved my problem! Both MobaXterm and Cygwin did the job. I downloaded MobaXterm Personal Edition v8.2 and Cygwin 2.2.1

MobaXterm has a friendlier interface and comes ready out of the box(at least for what I needed: file transfer, ssh communication, X11 server, saving sessions, and some other neat tools :)), so I think I will be using that for the moment. For Cygwin you need to:

  • install the following packages(openssh, xorg-server, xinit)
  • run XWin once everything is installed
  • right click on the X Server you just opened (located in the taskbar), and select Applications->xterm
  • in the new terminal session run an ssh command to connect to your server e.g ssh -X user@server.edu
  • -X the argument for x applications over ssh

On the other hand, Moba loaded my putty saved sessions, so I just had to double click, and... I was in :). But if you don't have any saved session, you need to create a new one, click on the ssh tab, specify the username and host, and save (x11 forwarding and sftp comes checked by default, and the port selected by default is 22)

One small issue I'm still experiencing is that I've only been able to work with low quality videos(i.e 360x240), because "higher" quality videos freeze on the first frame (i.e >640x360). Well, at least using vlc...

Even when I only want to record:

vlc videos/SampleVideo_720x480_50mb.mp4 --sout=file/ps:Sample.mpg

But well, here is what I have right now:

VLC reproducing video using MobaXterm

1
  • depending on what you need to do, it might be worth trying to copy the video and then play it locally (VLC runs on Windows too). Note that you can start playing it while the download is running. The only requirement is that the download speed >= playback speed. – Ciprian Tomoiagă Oct 15 '15 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.