NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Mplayer
Contents
About[edit]
mplayer is a multimedia player available from http://www.mplayerhq.hu. It supports wide range of audio and video codecs like MPEG/VOB, AVI, Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia etc.
Visit http://www.mplayerhq.hu/DOCS/codecs-status.html for supported list of codecs
Another great feature of MPlayer is the wide range of supported output drivers
Visit http://www.mplayerhq.hu/design7/info.html to know more about mplayer and the supported devices and drivers.
Source Download Location[edit]
Visit Download mplayer source
Cross compiling[edit]
- ./configure --enable-cross-compile --cc=$(TOOL_CHAIN_PREFIX)-gcc --host-cc=gcc --as=$(TOOL_CHAIN_PREFIX)--as --ar=$(TOOL_CHAIN_PREFIX)--ar --ranlib=$(TOOL_CHAIN_PREFIX)--ranlib --target=arm-linux
- Make sure the tool chain prefix is correctly provided and the PATH variable includes the path to the tool chain binary. For eg on OMAP35x which uses code sourcery tool chain, the TOOL_CHAIN_PREFIX needs to be provided as arm-none-linux-gnueabi-
- make
NOTE- This will build the mplayer executable in default configuration. If you need to change any configuration, that needs to be provided as part of configure. For eg if you want to use ALSA use the configure command with --enable-alsa switch.
Test setup[edit]
- EVM booted up with NFS configuration and uImage having USB ISO support enabled.
- Connect a USB webcam to the USB port on the EVM. If its a MUSB OTG port, then connect the USB webcam via a self powered USB Hub(due to power constraints with OTG ports).Otherwise for OHCI,EHCI ports you can connect the USB webcam directly.
Execution[edit]
cd to the NFS path where mplayer exe is present and then issue the below command-
- ./mplayer -fps 30 tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video*
- The above command is for the input(capture) path only and will use the V4L2 driver. The device node is the V4L2 capture node that the mplayer app will use.
- The display will be based on the DISPLAY variable settings. This can be configured like - export DISPLAY=/dev/fb0 or if you have a x-server running on any Linux PC, you can configure it as export DISPLAY=(IP address of Linux PC):0.0.
- ./mplayer filename.wav
- The above command will play audio wave file.
- ./mplayer filename.mp3
- The above command will play MP3 audio
- ./mplayer videostream
- The above command will play video stream. It can play mjpeg,H.264,mpeg4 and avi streams. Just give the file name as argument to mplayer executable.
Similar Tools[edit]
General information on similar video tools can be found at Open Source Video Processing Tools - MPlayer, FFMpeg, AviSynth, MKVToolnix, MP4Box