News Categories |
Main /
Mplayer
On this page… (hide) 1. About MPLAYERNote: Have you known that the DJGPP version of MPLAYER supports playing of streamed internet radios ?! (needs internet connection and packet driver) Note: Since MPLAYER DOS port doesn’t support many sound cards, try SB Live! PCI card. This card has a driver which is able to emulate SB 16. The card has also a good quality and is very inexpensive now ! 2. Project origin and historyMPLAYER is an open source GPL multimedia/audio/video/”movie” player, based on the FFMPEG codec library, originating from Linux and supporting some other platforms as well. It supports a huge amount of codecs, actually almost all except few most exotic ones, thus, most of them are proprietary (thanks to those who reversed the closed binaries :-) ), and of course the few free ones as well. All the support is compiled into one executable (for DOS or Win32) of cca 17 MiB size (2011 versions) - this is the “full” size, so it can compress down to cca 6…8 MiB with UPX, ZIP or 7-ZIP. The size is further growing as codecs and features are being added, on the other side of course in the past it was significantly smaller, cca 10 MiB for version 1.0RC1 back in 2006. Project started in year 2000, in 2006-Oct-23 version 1.0RC1 was released (severe “CPUID-bug”), 2007-Oct-07 version 1.0RC2 (pretty stable, Theora playing worked at the time (see Video ), no Theora encoding in MENCODER, no Dirac and “experimental” only Snow support), 1.0RC3 and 1.0RC4 also do exist, but were never announced or advertised (“forgot to release”), instead SVN versions were used. After 6 years of waiting for 1.0 , 2012-Jun-10 the developers announced release of version 1.1 (source code), so there is no and there never will be any 1.0-final version. Supports many fileformats/”containers” and codecs, so it can play almost every audio/video file: WMV x264 xvid libavcodec faad2 faac musepack libmpeg2 liba52 mp3lib libtheora vorbis flac speex MPEG 1/2/4, ASF/WMV 1/2/3, MOV, AVI (with almost all the possible codecs), FLV, OGG/OGV Theora, HuffYUV, WebM/VP8, …). Some packages contain a related product: MENCODER . See Video and DevelLibs for additional MENCODER and FFMPEG info. 3. Features
Playing MPLAYER can play virtually any audio/video fileformat (like OGV, AVI, MPG,…) in most of existing variants. In computer terminology, the variants of multimedia fileformats are called codecs . MPLAYER supports almost all codecs internally so you don’t need any DLL libraries and external codecs, as opposite to the most of Windows players. For very exotic and obscure fileformats/codecs which support isn’t built-in you actually can use the external codecs from Windows DLL’s , however this feature is controversial among the developers (GPL compliant or not ? Useful or disturbing ?) and highly experimental, especially in DOS, where as far known nobody tested it so far. A list of all native or externally supported fileformats/codecs can be found on MPLAYER website. Decompresion & decomposition MPLAYER supports frame decomposition into series of images (PNG, uncompressed by default, and also, less useful, JPG), and decompression into “raw” YUV4MPEG video format, also it can output animated GIF (probably not very useful). Similarly, the sound can be extracted into a WAV file. This feature is included as “faked output driver” - specify -vo help or -ao help on the commandline to see the list of supported “drivers” - some of them “connect” to video or sound hardware, some do save into a file, “ null ” completely disables the output. When a file-based or “null” video output is specified, then no graphics / GUI support (HX GUI, VESA, CVidix) is required and MPLAYER acts like a pure commandline application - this works very well both (see below) via HX and using the DGJPP port. Extracted frames can be viewed, edited or re-merge later. This feature can also be useful for conversion from problematic format to a more comfortable / compatible / free format, later you will probably want to recompress using APEG encoder, FFMPEG, FFMPEG2THEORA or MENCODER. Another use is when testing some “buggy” video - when MPLAYER runs in pure commandline mode, you can better check the arising error messages and don’t risk “follow-up” trouble (like GPF in Ring0). Personally I (Laaca?) use this feature for striping the audio stream from youtube videos for other editation in sound editors. Most often striping the songs from feary tales. 4. Project pages
Some DJGPP ports by Michael Kostylev , including MPLAYER 1.0RC2 , MPLAYER SVN 2008 versions, FFMPEG2THEORA 0.19 (all very obsolete now), and later MPLAYER versions (download doesn’t work ???). Unfortunately, Michael ’s pages are often offline so you maybe rather use this unofficial mirror: glennmcc.org/download/mik (latest version of MPLAYER is 2008-Oct, of FFMPEG 2009-Jan).
5. MPLAYER usable in DOS ?End of 2006, after 1.0RC1 release, the idea came up to use the Win32 port (starting from commandline, using low-level GUI API only) in DOS with help of HX-DOS extender, but it didn’t work. In begin of 2007, new fixed Win32 versions compiled from SVN came up, and on 2007–03–10, MPLAYER was found to WORK on DOS via HX using the -vo gl driver. The stability and performance however were bad, and although Japheth did put some efforts into getting it better, it remained suboptimal, and even worse, the 1.0RC2 version stopped working with HX. Fortunately, on 2007–10–23, Michael Kostylev released a DJGPP port, very buggy at the beginning, but fixed soon, later very good versions (from 2008) became available. According to Mik ’s history document (mik.mkw.ru/dos-stuff/doc/NEWS-draft.MPlayer) , his port started already in 2007 March, and 2007-Mar-09 a “public release” happened, but nobody noticed at that time. ;-) Thanks to this port, the previous HX approach became obsolete, but since end of 2008, no updates are available anymore. End of 2009, Sherpya ’s Win32 binaries got “DOS support” by enabling -vo sdl driver, and in 2013 versions, even -vo sdl and -vo directx can can be used. There are 5 “era” ’s of MPLAYER usage with “true” video output in DOS:
All variants have several issues common:
To debug such crashes, it is a good idea (for Win32 version via HX) to set SET DKRNL32=32 preventing MPLAYER (with help of DKRNL32) to catch them and output useless bug reporting hints specific to Linux, and get more useful crash reports from HDPMI32 (check whether the crash comes from MPLAYER at all, it can be some of the HX DLL’s too). Also you can try to specify an alternative codec implementation (see below).
6. Specific info for the Win32 port on HX6.1 Versions available or testedSome historical 2007 versions verified to work (slowly) via HX in DOS:
Some 2010 versions working:
Some 2013 versions working:
6.2 Requirements and syntaxRequires HX-DOS Extender 2.17 (2.16 exposes ignorable missing imports, experimental support of 2007 versions since 2.11 and 2.11-pre) with HX GUI and some support files and DLL’s , for 2010–08 versions of MPLAYER and HX:
See “External files” in HXDOScomplists#toc13 . Starts from commandline. Usage (assuming executable name MP.EXE (patching with PESTUB or having HXLDR32 installed is not a good idea here - see below about “-g” ) : “ -g ” is the “force-GUI” switch for HX / DPMILD32 (running without it or using PESTUB or HXLDR32 for “direct” start can work or not, nonrecommended) “ -vo sdl ” selects the SDL video “driver” (SDL.DLL file is NOT needed, SDL code included in the MPLAYER binary in 2010 versions) “ -really-quiet ” or “ > NUL ” is a disposal against disturbing text messages. Note: make sure to write “NUL” and not “NULL” (DOS “faked device providing data vanish” has one L only, while MLAYER’s audio or video “driver” with this functionality has 2 L ’s). Historical “-vo gl” support: “ -vo gl ” selects the OpenGL video “driver” (SDL not involved / SDL.DLL not required). MPLAYER itself always could use also other video outputs but OpenGL was the only working “true” video output in HX-DOS emulation in 2007 versions (they didn’t support SDL). If you don’t hear any sound you can try to explicitly specify the -ao win32 audio output but it is not usually needed as this is the default setting. 6.3 Video size: “fullscreen vs unfullscreen”Maybe you could ask: “Well, but which video resolution will be used ?” For Win32 port, it is specified in one file in HX-DOS distribution, in HXGUIHLP.INI . There you can specify the used video mode (640×480×16bpp is the minimum) and few other settings. For DGJPP port, 640×480 is the default. An issue is the “fullscreen vs unfullscreen”. MPLAYER itself prefers fullscreen using hardware scaling, but availability of that as well as behavior in this area are very dependent from the platform and video “driver” selected. Switch -fs selects fullscreen. In 2007 versions using -vo gl it was optional, both fullscreen and unfullscreen did work (some problems with unfullscreen reported ???), same for 2008 DGJPP versions (both work well), note that fullscreen is slower - can be significantly slower, since scaling is done by software in this case, while QV (see Mediaplayers ) and players on non-DOS systems usually use hardware scaling. Fullscreen does NOT work this way for the 2010 versions using -vo sdl , however you can specify -zoom (enable software scaling) and -x and -y (specify screen size, not automatically “peeked” when using SDL ???) followed by X and Y size, values can be equal or smaller than the used screen resolution, this way you can try to zoom up a small video as well as zoom down a too big one, it may work well or not, some mysteries left. 7. Specific info for DJGPP version7.1 FeaturesIt is a native port for DOS so it works much better (no DLL’s needed) and faster than (previous 2007) HX emulation. Sound output is done (in Mik ’s public versions) by Allegro library, so it supports all “important” ISA soundcards standards, thus only very old ones (SB16, SBPro, Gravis), suboptimal, an “emulation driver” could help for a few PCI cards (SB 512 / Live24) - so the problem with most integrated and PCI soundcards remains. A list of supported features is/was available at the official site of the DJGPP port. Pretty all codecs and fileformats are enabled (Theora support inferior, WebM/VP8 didn’t exist at that time, missdetected as “broken MP3″), as well as support of DVD and network. Among other, it’s the only real-time DVD player for DOS by now, and can be used to play streamed internet radio sound (but ISA cards only). 7.2 Video outputVery interesting is the video output (Allegro is not used). You have two choices:
REM set mode SETVMODE 0x111 REM start MPLAYER with all parameters MP %1 %2 %3 %4 %5 %6 %7 %8 %9 REM return into text mode SETVMODE 0x3 Better: -vesa:vidix
8. Usage examplesNow I describe some typical cases of using MPLAYER. For Win32 port via HX the additional content as mentioned above must be added into the commandline. Following are some examples of .BAT files which sets the necessary switches about stream input and video and sound output: REM playing audio/video file REM this one needs at least 2010 version of MPLAYER REM official extension is "webm" but we have only 3 letters in DOS MP EXAMPLE.WEM -really-quiet REM playing video file having sound REM we have no ISA card so we can disable decoding of sound MP video.avi -ac null > NUL REM playing a audio/video file from internet MP http://www.somesite.com/somefile.avi > NUL REM playing a streamed internet radio: radio Echo Moskvy (Russian) MP http://radio.echo.msk.ru:8000 REM playing a streamed internet radio: radio Ultra (Russian) MP http://mp3.radioultra.ru/ultra-96 REM playing a DVD REM supposing that we have our DVD drive on letter F: REM and want to play the first track MP -zoom -dvd-device F: dvd://%1 > NUL REM playing a DVD REM here we prefer to just select the .VOB file by name: MP F:\video_ts\vts_01_1.vob > NUL REM playing a film with subtitles MP titanic.avi -sub titanic.srt > NUL REM decompose into frames REM challenges filesystem's limits REM needs very much space and directory will be very long REM can cause very slow access or trouble MP -vo png -ac null JURAPARK.MPG REM uncompress and split into audio and video stream REM needs very much space REM challenges filesystem's defragmentation prevention strategy REM or exposes lack of thereof, as well as maximal file size REM YUV4MPEG file will be always "420" format (subsampled by factor REM 2 both horizontally and vertically) even if input is not subsampled REM output video file name is always "STREAM.YUV" and posible previous REM file is replaced, audio file name is fixed to "AUDIODUM.WAV" REM note the switch is "-ao pcm" rather than "-ao wav" but REM file is WAV rather than raw PCM audio nevertheless MP -vo yuv4mpeg -ao pcm JURAPARK.MPG For advanced options look at manual of MPLAYER. For subtitles you have to prepare the TTF font which contains your language set and place it into right directory. Lets assume that you have the MPLAYER.EXE in C:\MPLAYER directory. You have to create and provide following subdirectories and files:
Then you have to set the environment variable DJDIR : SET DJDIR=C:\MPLAYER This settings will work but you can additionally specify the codepage set and other settings. To do it you have to edit the C:\MPLAYER\MPLAYER\CONFIG file. Add following lines: #character set subcp = cp1250 #font size subfont-text-scale = 4 9. Few hints9.1 Downloading videos from YouTube:(posts deleted) 9.2 Multiple decodersFor some audio and video codecs there are multiple decoder implementations included in the binary. One of them is the default, but there are commandline switches -vc and -ac to pick another one (use -vc help or -ac help to get the list). This way one can try to fix codec problems like crashes, poor performance, and garbage or bad quality output. Also one can specify -vc null or -ac null to completely suppress decoding of a stream to speed up processing of the other one (may not work for all containers). 9.3 FiltersCan you use the filters? MPLAYER has lots of possibilities for advanced video processing. For list of them just write MPLAYER -vf help . 9.4 Removing artifacts when playing a DVDWhen playing DVDs you often see ugly image artifacts caused by video interlacing. To remove them use: MPLAYER -vf deinterlace -zoom -dvd-device F: dvd://%1 10. See also
|
Recent Comments