embeded VLC Player opens a DOS ASII video

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Quillion
New Cone
New Cone
Posts: 3
Joined: 30 Aug 2011 15:02

embeded VLC Player opens a DOS ASII video

Postby Quillion » 02 Sep 2011 14:51

I have multicast stream being played on the website, but the problem is that 10% of the time when I visit the page instead of the video being played on the website, a DOS window opens up and starts playing video using ASCII characters. IT is pretty neat and I found it to be awesome the first hundred or so times, but now it is getting really troublesome because my computer starts to lag, and nothing besides the DOS video is functioning, even the mouse freezes. Anyone has any idea why this might be?

This is the source I use (The video plays in a new window that opens up, so the whole code is not that big anyways). Also I use VLC version 1.1.11 if that is of any help.

Code: Select all

<html> <head> </head> <body> <?php $ip = $_GET['ip']; $port = $_GET['port']; if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) { ?> <OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" width="460" height="300" id="vlc" events="True" target="udp://@<?=$ip;?>:<?=$port;?>"> <param name="Src" value="udp://@<?=$ip;?>:<?=$port;?>" /> <param name="ShowDisplay" value="True" /> <param name="AutoLoop" value="True" /> <param name="AutoPlay" value="True" /> </OBJECT> <?php } else { ?> <embed type="application/x-vlc-plugin" name="video1" autoplay="yes" loop="yes" width="460" height="300" target="udp://@<?=$ip;?>:<?=$port;?>" /> <?php } ?> </body> </html>
Thanks to anyone for their help

npmaster
Blank Cone
Blank Cone
Posts: 21
Joined: 16 Sep 2011 16:15
VLC version: 1.1.11
Operating System: Linux/ Windows/ Mac

Re: embeded VLC Player opens a DOS ASII video

Postby npmaster » 16 Sep 2011 16:24

Hey,

I have seen a similar problem, if you got any additional information. Like what browser you are using (IE7/8/9) and also are you using any javascript (like to open the new window). Any other information would be great, example: does it work once then closing the window and re-opening the window cause the browser to crash.

If your problem is the same as mine then i may have a workaround (not a fix)

bruno.bozic
Blank Cone
Blank Cone
Posts: 13
Joined: 28 Sep 2011 11:47

Re: embeded VLC Player opens a DOS ASII video

Postby bruno.bozic » 28 Sep 2011 11:49

Any idea what causes this?

npmaster
Blank Cone
Blank Cone
Posts: 21
Joined: 16 Sep 2011 16:15
VLC version: 1.1.11
Operating System: Linux/ Windows/ Mac

Re: embeded VLC Player opens a DOS ASII video

Postby npmaster » 29 Sep 2011 12:32

Have you seen a similar problem bruno.bozic?

I am truly not sure that this is the same problem as mine. I found my issue was caused by caching the AJAX script I was using to render the page and only on IE9. What changed in IE9 to cause this I have no idea? I am still looking into it so if anyone has seen this problem, post any information about what browser your using, VLC version etc.. That might help it working it out.

bruno.bozic
Blank Cone
Blank Cone
Posts: 13
Joined: 28 Sep 2011 11:47

Re: embeded VLC Player opens a DOS ASII video

Postby bruno.bozic » 30 Sep 2011 10:04

Seems to me that we are observing a similar end effect, it seems that when a massive error occurs, or the plugin runs out of local machine resources (whatever they may be, ram, cpu, cache, tcp connections to X11 on ubuntu) it will automatically "freeze" the plugin (which by default uses a resource expensive output display adapter) and default to the LEAST resource expensive output mode - which is ASCII color art.

Different causes, same end effect. I am interested in workarounds. I am using the said plugin on my kiosk web app that uses embedded firefox plugin (both XP/7 and ubuntu) that runs RTP stream, and if I shedule a restart every 8hrs I can avoid the problem (resetting releases the resources that got eaten by the plugin/firefox). However I would still like to get a fix for this issue.

npmaster
Blank Cone
Blank Cone
Posts: 21
Joined: 16 Sep 2011 16:15
VLC version: 1.1.11
Operating System: Linux/ Windows/ Mac

Re: embeded VLC Player opens a DOS ASII video

Postby npmaster » 30 Sep 2011 11:55

I worked on those lines as well. That how i discovered the caching i had caused the problem.

Interesting you mention ubuntu, On load testing I discovered that fedora (gnome based) would crash in firefox after around 8 hours when cycling though a playlist of UDP streams. I was unable to come to the bottom of that one either. Instead was able to discover that setting the browser to reload the page after cycling though the playlist solved the issue. I set a cron job to log memory, cpu usage but got nothing that gave away a clear indication of the problem.

The firefox I used was 3.6.17 and the VLC was 1.1.10. Any firefox version later i found the issue worse. Out of curiosity what version of ff & vlc did you use?

bruno.bozic
Blank Cone
Blank Cone
Posts: 13
Joined: 28 Sep 2011 11:47

Re: embeded VLC Player opens a DOS ASII video

Postby bruno.bozic » 30 Sep 2011 12:29

We used Ubuntu 10.04, as we had more problems on newer versions, also we use firefox 3.6 (latest sub upgrade) as newer versions would not display any stream at all (plugin broken).
One guy on Ubuntu forums said that the OS communicates with X/X11 server via sockets, and once it uses up all the sockets (256) VLC will no longer be able to play the stream through the default (resource intensive) mode, and will revert to ASCII color art.

I have just started 4x firefox windows displaying the same kiosk web app, and sure enough it crashed a lot sooner, as expected. The weird thing being - I could not detect any culprit, memory and cpu usage was within expected limits. It must be some underlying resource that gets eaten.

Whilst writing this mail, we killed a few of processes and one of the plugins came back to life (but not for long, a soon as it depleted some unknown resource it died again).
The sound keeps playing (thru HDMI), the video goes blank. Really weird behavior.

npmaster
Blank Cone
Blank Cone
Posts: 21
Joined: 16 Sep 2011 16:15
VLC version: 1.1.11
Operating System: Linux/ Windows/ Mac

Re: embeded VLC Player opens a DOS ASII video

Postby npmaster » 30 Sep 2011 13:03

That is exactly the same issue i found. Video would be blank and sound would keep playing. Then i upgraded from 1.0.9 to 1.1.10 and instead the browser would crash. I haven't done any testing on a KDE environment so no idea if it happens there. Sockets could be an explanation to the issue, I never monitored those. I only monitored memory, processes and cpu and and like wise found them all fine.

I will quickly install KDE on a machine and give that a test to see if it also happens (if it is x that is causing it then probably will happen). No idea how to monitor sockets so time i did some research to see if possible. If anyone has any ideas that would be appreciated.

** edit to correct version number
Last edited by npmaster on 30 Sep 2011 14:26, edited 1 time in total.

bruno.bozic
Blank Cone
Blank Cone
Posts: 13
Joined: 28 Sep 2011 11:47

Re: embeded VLC Player opens a DOS ASII video

Postby bruno.bozic » 30 Sep 2011 14:09

Exact Ubuntu specs on my test machine are:
Ubuntu 10.04.3
VLC 1.1.11 Luggage
Firefox 3.6.23
nVidia X server 195.36.24 / 11.0 / 1.7.6


You can find more info on VLC eating up X server connections by searching these forums for a post names "Mozilla plugin consumes X connections" by durzagott

bruno.bozic
Blank Cone
Blank Cone
Posts: 13
Joined: 28 Sep 2011 11:47

Re: embeded VLC Player opens a DOS ASII video

Postby bruno.bozic » 30 Sep 2011 14:12

I also tried KDE, didn't work.
The problem may also be with overlay video acceleration under Ubuntu - nVidia X-server propriety driver.

Anyhow, the weirdest thing is that I can see the very same issue on Windows 7 clients :)
Same deal...a new windows opens (plugin windows embedded into html stays frozen on last frame or blank) and in it you can see lovely ASCII art.

BTW, once the error manifests on my Ubuntu, I get a gazillion of screen saver processes, don't know why.

npmaster
Blank Cone
Blank Cone
Posts: 21
Joined: 16 Sep 2011 16:15
VLC version: 1.1.11
Operating System: Linux/ Windows/ Mac

Re: embeded VLC Player opens a DOS ASII video

Postby npmaster » 30 Sep 2011 14:58

thanks that saves me installing KDE.

I only seen the video popping into a separate window and running as ASCII art on windows 7. On linux i found the sound would cut out and the video would play only.

On Windows 7 I did select to use directX rendering to try and solve the issue but that didn't stop it from occurring. On a side note, I have found both problems to occur on intel & ati cards. So i don't think it is GPU specific.

As i said earlier when i stopped caching the ajax page that contain the code for vlc player (including the javascript object that i used to interact with the player) I stopped getting the issue. Are you doing anything similar at all?

bruno.bozic
Blank Cone
Blank Cone
Posts: 13
Joined: 28 Sep 2011 11:47

Re: embeded VLC Player opens a DOS ASII video

Postby bruno.bozic » 30 Sep 2011 15:24

The entire web app that plays our stream is comprised of javascript / jquery, and is served by asp.net, I am unaware of any type, we did our best to make it as simple as possible - exactly to avoid this kind of problems. If I can remember correctly, the html gets served by the server, it of course contains some java scripts and jquery and ofc the embedded plugin. After it loads, there are no AJAX scripts nor postbacks.
Shouldn't be a problem but I will triple check.

Actually I will run a test by designing a minimal html not served by asp, one that contains ONLY the embedded plugin and a simple autoplay + MRL instruction and see if I can reproduce the problem.

I have one question though, does the stream that you played feature a playlist?
are the items on the playlist encoded in different codecs, aspect ratios and sizes of display?
mine ARE, and I have set up a simple test, I will leave the test machine running a simple DVBT stream (continous, no switching of aspect ratios or resolutions) to see whether I can reproduce the error.

bruno.bozic
Blank Cone
Blank Cone
Posts: 13
Joined: 28 Sep 2011 11:47

Re: embeded VLC Player opens a DOS ASII video

Postby bruno.bozic » 30 Sep 2011 15:27

On second reading I noticed that you mention the javascript object that is used to communicate to the plugin, THAT is cached. How did you "turn off" caching? I seem to remember that there is an option in IE to prevent caching, is that the one I should use, ofc, if I manage to find it in firefox ;)

npmaster
Blank Cone
Blank Cone
Posts: 21
Joined: 16 Sep 2011 16:15
VLC version: 1.1.11
Operating System: Linux/ Windows/ Mac

Re: embeded VLC Player opens a DOS ASII video

Postby npmaster » 30 Sep 2011 15:53

The playlist was multiple different streams, they were the same codec, but different aspect ratios. On terms with your testing of a single DVB-T stream. I did another load test stream a single DVB-T stream via a mutlicast UDP stream and never found a problem (win7, linux & mac osX). Don't know if you will get the same result as me.

One type of caching i used was to store the javascript into the DOM for quick retrieval and the second type i can't remember at this moment. I have to come back to you when i rechecked that out. Though i don't know if it changes much cause i still cache in FF and don't experience a problem.

also the xdg_screensaver calls could be a clue. VLC creates an instance to set the screensaver to not start whilst video plays. Looking at previous logs i do see the number of xdg_screensaver instances increase over the duration of testing. I am going to look at the code later to see if i can remove this feature then compile it and see what happens. I will let you know what happens.

bruno.bozic
Blank Cone
Blank Cone
Posts: 13
Joined: 28 Sep 2011 11:47

Re: embeded VLC Player opens a DOS ASII video

Postby bruno.bozic » 03 Oct 2011 09:47

After 3 continuous days of DVBT stream, the plugin still works, tested on Ubuntu, not yet on Windows XP/7.

From this I can deduce that switching videos (making changes in aspec, resolution, bit rate, codec...) slowly eats away at some at this moment unknown resource. Perhaps on Ubuntu it consumes socket connections to X server, perhaps each time it makes a transition it fires a screen saver "don't run" instruction which eats away resources...it is quite difficult to say what goes wrong.

One option to test (which will make my life miserable) is recoding each and every video into the same output format, but before this I will make a playlist that has 10 of the same video on it and put that in a loop. If that works after 24hrs then I see no other way than to recode everything and see what happens.

npmaster
Blank Cone
Blank Cone
Posts: 21
Joined: 16 Sep 2011 16:15
VLC version: 1.1.11
Operating System: Linux/ Windows/ Mac

Re: embeded VLC Player opens a DOS ASII video

Postby npmaster » 03 Oct 2011 10:52

Might be able to save you the pain of that test. I did a load test which had the plugin playing the same video over and over again and it acted the same again. As it was the same video, there was no changing of the bit rate or resolution. Unless the small gap whilst the next video is buffered in counts?

I give you update if i make any more progress.

bruno.bozic
Blank Cone
Blank Cone
Posts: 13
Joined: 28 Sep 2011 11:47

Re: embeded VLC Player opens a DOS ASII video

Postby bruno.bozic » 03 Oct 2011 11:01

The small gap COULD be the problem. Certainly would begin to explain the appearance of screensaver processes on Ubuntu.

npmaster
Blank Cone
Blank Cone
Posts: 21
Joined: 16 Sep 2011 16:15
VLC version: 1.1.11
Operating System: Linux/ Windows/ Mac

Re: embeded VLC Player opens a DOS ASII video

Postby npmaster » 05 Oct 2011 11:15

I recompiled the mozilla plugin trying to remove the calls to xdg_screensaver. This didn't sort out the issue. Still lots of xdg_screensaver and xprop connections persist. So I have mess that up. Still going to keep trying. It just takes along time.

Meanwhile, I looked though the bug tracker and found this: http://trac.videolan.org/vlc/ticket/4201. Looks like the same problem. The trouble is, that bug is apparently fixed 1.1.6 and we are both seeing it in later editions :/ .

So thinking of raising a new bug. But want to get the facts sorted out first. Tell me if this is the same as your issues and also anything you can add.

So the issue is that the video either turns into ASCII characters or just displays a blank screen after a period of time. The sound continues to be played perfectly fine.

This has happened on linux (ubuntu/fedora) that xdg_screensaver & xprop processes appear and increase each time a video is played.

Now as for Windows, I am not sure wherever what I saw was the same as yours. Essentially the video would play in colour ASCII art as an instance of VLC's ActiveX object was being cached by me in IE9. The caching I did was literally store the html code of the page that contained the plugin, The Javascript object that controlled the plugin, the Javascript object that represented the video into the DOM. Not sure if this is similar to anything you have done.

Anything you can add would have explain the issue for the bug tracker.

bruno.bozic
Blank Cone
Blank Cone
Posts: 13
Joined: 28 Sep 2011 11:47

Re: embeded VLC Player opens a DOS ASII video

Postby bruno.bozic » 05 Oct 2011 11:32

I have exactly the same issue on ubuntu, with the xprop and xdg_screensaver, so I think we covered that one in sufficient detail. I have reproduced the same issue when playing a continuous DVB-T stream albeit it took a little longer time to crash (could be a clue of some sort so VLC developers).

As for the Windows client, I haven't been testing activeX but mozilla plugin. On every client that uses our web app to display a stream the same thing happens - something crashes (not mozilla, I am guessing the mozilla vlc plugin crashes or runs out of resources) and the main window where the app should be embedded is blank and a new window (or MANY new windows) will appear in the top left corner of the screen, the foremost of these will play color ASCII art. I have schedules a 12hr restart which circumvents the problem. I would deduce that mozilla plugin eats resources while playing video, once it runs out it crashes or reverts to less resource hungry display mode which is ASCII, the thing I dont understand (on Windows) is that there are MANY windows opened and only the foremost of these plays ASCII, what are the other windows for?)
It is difficult for me to "be present" at the time when it crashes (moreso because I don't know WHAT crashes is) so I don't know what exactly happens (do the windows open simultaneously, or they keep popping up every time the plugin crashes/uses up all the remaining resources).

Taking in consideration that restarting firefox solves the issue, it must be an issue with resources (but which ones?) plaguing mozilla plugin (perhaps activex plugin as well). I have not tested (on windows) whether VLC player will start (not the plugin but the player) once I get the ASCII art, on Ubuntu it will not start - this leads me to conclude that it is already running in an unknown state (crashed?) and so it will not let another instance appear.

If I think of anything else, I will post.

npmaster
Blank Cone
Blank Cone
Posts: 21
Joined: 16 Sep 2011 16:15
VLC version: 1.1.11
Operating System: Linux/ Windows/ Mac

Re: embeded VLC Player opens a DOS ASII video

Postby npmaster » 05 Oct 2011 11:45

There is currently a stability bug in the latest mozilla Plugin that causes an issue to occur on Windows in Firefox. That issue is to do with reloading the page or changing page whilst the plugin is still receiving traffic. That was fixed in one of the git builds. Have you checked the nightlies to see if that fixs the issue for you.

Just to add when the ASCII art played on windows for me, it too appeared in a new window. Never seen many new windows. I wonder if that was because you switched video and it made new window appear. Also when I tested this on a pretty powerful machine it didn't display ASCII art in the new window but the actual video twice. The

It is strange, I am not sure whether it is two bugs or the same one. It is the same code for both Linux and Windows. So the issue could be in the code but changes behaviour on each platform.

bruno.bozic
Blank Cone
Blank Cone
Posts: 13
Joined: 28 Sep 2011 11:47

Re: embeded VLC Player opens a DOS ASII video

Postby bruno.bozic » 06 Oct 2011 10:32

I have tested a 24hr variable type loop rtsp multicast on VLC PLAYER (not the plugin) and confirmed that the player works on both Windows and Ubuntu. Its DEFINITELY a problem with mozilla plugin.

It is quite possible that the its the same problem in code manifesting differently on two different systems, and its also possible that we are dealing with separate bugs in code, manifesting similar effects.

npmaster
Blank Cone
Blank Cone
Posts: 21
Joined: 16 Sep 2011 16:15
VLC version: 1.1.11
Operating System: Linux/ Windows/ Mac

Re: embeded VLC Player opens a DOS ASII video

Postby npmaster » 06 Oct 2011 16:00

Good news is that one of the devs patched the issue last night. I compiled the new mozilla plugin and just tested it and it works pretty good. I had to update libxcb to 1.6 however but finally got it install and can confirm the X connection leak is gone. But of course that is for linux, Don't think that will work for the windows xp/7 issues. I'll check them out in a sec.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 10 guests