How to play ASX using Mplayer
ASX is usually referred to a kind of media streaming service based on Microsoft protocol. It is not the standard format recognized in Linux environment. However, it is possible to play ASX on Linux using Mplayer with a simple trick.
Actually, ASX is just a plain text containing the real URL pointed to the streaming service. For example, 95.5 Virgin HitZ has a streaming URL for webcam. In wc95_5.asx
, it has a static content as follows.
version = "3.0"> > href = "mms://203.121.145.89/wc_Hitz"/>> 95.5 Virgin Hitz>> Virgin Radio Thailand>> >> > >> 95.5 Virgin Hitz>> Virgin Radio Thailand>> >> >href = ""/>
Honestly, its format is not well-form XML. Anyway, the essential part of this file is just what you see in ref
element. In this case, it is . If you try to play this ASX directly from Mplayer, you will get error message like below.
$ mplayer http://www.virginradiothailand.com/@WebCam/hitzWC/wc95_5.asx MPlayer dev-SVN-r22191-4.1.2 (C) 2000-2007 MPlayer Team CPU: Intel(R) Pentium(R) M processor 1.73GHz (Family: 6, Model: 13, Stepping: 8) CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled with runtime CPU detection. 107 audio & 227 video codecs Can't open joystick device /dev/input/js0: No such file or directory Can't init input joystick mplayer: could not connect to socket mplayer: No such file or directory Failed to open LIRC support. You will not be able to use your remote control. Playing http://www.virginradiothailand.com/@WebCam/hitzWC/wc95_5.asx. Resolving www.virginradiothailand.com for AF_INET6... Couldn't resolve name for AF_INET6: www.virginradiothailand.com Resolving www.virginradiothailand.com for AF_INET... Connecting to server www.virginradiothailand.com[203.121.145.211]: 80... Cache size set to 320 KBytes Cache fill: 0.11% (375 bytes) Win32 LoadLibrary failed to load: avisynth.dll, /usr/lib/win32/avisynth.dll, /usr/local/lib/win32/avisynth.dll Exiting... (End of file)
That's because ASX is not recognized by Mplayer as expect. However, it works if you specify mms://
instead as follow.
mplayer mms://203.121.145.89/wc_Hitz
For another example, let's try Eazy FM105.5. wc105_5.asx
contains below data.
version = "3.0"> > href = "mms://203.121.145.89/wc_Eazy"/>> Eazy FM105.5>> Virgin Radio Thailand>> >> > >> Eazy FM105.5>> Virgin Radio Thailand>> >> >href = ""/>
So I watch the streaming media using below command.
mplayer mms://203.121.145.89/wc_Eazy
- sugree's blog
- 19989 reads
An easier way to play
mplayer -playlist http://www.virginradiothailand.com/@WebCam/hitzWC/wc95_5.asx
downloading an asx stream
GREAT!!! THANKS A LOT!!!
Nope, that's not too
Thanks. One advantage of the
Good solutions! Thank you!
Post new comment