How To Install Mplayer Raspberry Pi
Posted : admin On 26.08.2019To install MediaPlayer.
Download the latest MediaPlayer.zip from https://github.com/PeteManchester/MediaPlayer/releases
FFMPEG is one of those tools I use when I just want to quickly hack together a video and don’t need fancy things like editing, titles, or a user-interface. Compiling on a regular computer isn’t easy, but compiling for the Raspberry Pi takes a little more patience and care.I also wanted to include support for H264 video, which needs to be installed before compiling FFMPEG.
Check if you have Java installed enter
java -version
If you don't already have Java installed you will need to Install Java.
Once you have Java installed you can start the installation.
Install either MPD or MPlayer, if you already know which player you are going to use you don't need to install both, just the one you want to use.
Install MPD
sudo apt-get install mpd
Or install MPlayer
sudo apt-get install mplayer
Extract the MediaPlayer.zip to the /home/pi/ directory (this should include the mediaplayer_lib directory)
Change directory to /home/pi/mediaplayer
cd /home/pi/mediaplayer
Make the run.sh executable
sudo chmod +x run.sh
To test run the mediaplayer
sudo /home/pi/mediaplayer/run.sh
Install Mplayer On Raspberry Pi
Some people have experienced issue with ^M characters being present in the run.sh after copying on the raspi (seems to be when copying from a Mac). You can check by using vi (sorry!!), if they are present you need to edit them out. (All scripts should not contain any ^M characters now)
Or to clean a file of ^M characters use the following command:
sed -i 's/r$//g' <filename>
Or you can create your own run.sh by using nano, enter the text:
Ian has supplied some scripts that configure mediaplayer as a service:
Edit the scripts in the mediaplayer/scripts folder.
In the mediaplayer.sh script put the correct path to your mediaplayer directory.
In the mediaplayer.init script edit the USER and GROUP
Some of the scripts now seem to have got ^M characters in them, to clean a file of ^M characters use the following commands:
Raspberry Pi Os Download
and then run the following commands:
Once the service is installed mediplayer will be started when the raspberry pi boots up.You can also run the following commands
sudo service mediaplayer status/start/stop/restart
If for any reason you need to remove the mediaplayer service, use the following command
insserv -r mediaplayer
For those who are using only a Wifi connection you might need to disable the Power Management of your Wifi Adapter.If you run iwconfig
`iwconfig'
You can see if Power Management is enabled:
If it is enabled you might need to disable it by editing the rc.local file:
sudo nano /etc/rc.local
And add the lines:
For example:
If you are using a USB DAC on Wheezy or before you may need to edit the /etc/modprobe.d/alsa-base.conf to enable the USB DAC.
nano /etc/modprobe.d/alsa-base.conf
And comment out the line
Raspbian Download
options snd-usb-audio index=-2
so it will be
#options snd-usb-audio index=-2
If you are using a DAC on Jessie then you need to follow these instructions to make your USB SoundCard the default sound card:
First of all, check to see what order your cards have been loaded in:
$ cat /proc/asound/modules
0 snd_bcm2835
1 snd_usb_audio
Counting cards begins from 0 so the default bcm2835 is loaded first and my USB card which has my mic is loaded second.
To reorder my cards, I first create a file named /etc/modprobe.d/alsa-base.conf. It can be named anything you want as long as it ends with .conf. I then added the following:
# This sets the index value of the cards but doesn't reorder.
options snd_usb_audio index=0
options snd_bcm2835 index=1
# Does the reordering.
options snd slots=snd_usb_audio,snd_bcm2835
The comments should explain what each line does. Once you do that, it seems you have to reboot your machine for it to work.
If you are using an ArchLinux Raspi, please note, that you need to have the package binutils (we need the binary readelf) installed, to automatically detect the ABI (HardFloat or SoftFloat). Furthermore (on all platforms) you can link the corresponding lib directory to the default directory, e.g.
Currently we do provide the ohNet Libs for Win x86, Win x64, Linux i386, Linux x64, Linux Arm v5sf, Linux Arm v6sf, Linux Arm v6hf and Linux Arm v7.