Strange display issue with VLC

25

1

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.

Andrei Tapia

Posted 2015-10-12T21:25:44.527

Reputation: 271

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 – 2015-10-12T21:57:36.723

24The hint would appear to be in the titlebar..... – Lightness Races with Monica – 2015-10-12T23:18:49.087

1@misha256, the icon in the title bar looks like putty – Holloway – 2015-10-13T10:05:17.317

Answers

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.

rr-

Posted 2015-10-12T21:25:44.527

Reputation: 518

2I 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 – 2015-10-13T12:20:28.193

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. – Michael Becker – 2015-10-13T15:02:06.317

Thanks for pointing it out. On top of being more lightweight, it looks much better too. – rr- – 2015-10-13T16:55:37.970

2thinking 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ă – 2015-10-13T17:19:46.727

@Ciprian Tomoiaga MobaXterm is merely a repackaged Cygwin, lagging (expectedly) behind the most recent Cygwin version. – oakad – 2015-10-14T00:17:28.650

@Ciprian Tomoiaga MobaXterm worked for me :). I explained in more detail below. – Andrei Tapia – 2015-10-14T21:29:42.953

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

misha256

Posted 2015-10-12T21:25:44.527

Reputation: 10 292

1You beat me by 20 seconds ... ;) – DavidPostill – 2015-10-12T21:56:30.293

Hmm. I'm running Windows as well. I wonder why I have tabs on top and you have them on the left? – DavidPostill – 2015-10-12T21:57:58.783

@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 – 2015-10-12T22:01:51.293

I'm running 2.2.1 – DavidPostill – 2015-10-12T22:02:59.347

@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 – 2015-10-13T11:11:48.453

@OrangeDog I switched to Aero. It made no difference to the VLC dialog layout. – DavidPostill – 2015-10-13T11:16:20.873

In that case, ¯_(ツ)_/¯. – OrangeDog – 2015-10-13T11:18:05.417

VLC is built with Qt; it doesn't use any native Win32 GUI code. Also, Aero adds a few effects, notably changing the way the window border renders, but beyond that doesn't touch the GUI controls. It certainly wouldn't change the layout of tabs from top to left. I did confirm, however, that VLC 2.0.8 has the tabs on the left, while 2.2.1 (at least) has the tabs on the top. I generally have all settings shown (which displays categories in a tree view rather than a toolbar) so I've never noticed this before. – Michael Becker – 2015-10-13T15:09:24.950

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.

DavidPostill

Posted 2015-10-12T21:25:44.527

Reputation: 118 938

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

Andrei Tapia

Posted 2015-10-12T21:25:44.527

Reputation: 271

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ă – 2015-10-15T10:58:29.387