Raspberry Pi Play Network disk MP3 file

Source: Internet
Author: User
Tags save file pkill

  1. Raspberry Pi Mapped network disk

    sudo mount-t cifs-o username=jerry.huang,password=hello2014//10.10.0.1/public/eslpod.com/home/ pi/t/eslpod.com/

  2. Raspberry Pi save file with sudo nano edit
    Modify static IP, you need to modify the/etc/network/interfaces file
    Original file contents
    Auto loiface lo inet loopbackiface eth0 inet dhcpallow-hotplug wlan0iface wlan0 inetMANUALWPA-roam/etc /wpa_supplicant/wpa_supplicant.confiface default inet DHCP

    Modify to static IP

    10.10. 0.91  255.255. 255.0  10.10. 0.254 Allow-hotplug wlan0iface wlan0 inet manualwpa-roam/etc/wpa_supplicant/Wpa_ Supplicant.confiface Default inet DHCP

    Edit Auto-timer task /etc/crontab

    8, - 8- A, -- -* *1-5Root/home/pi/playeslpod.SH - 8- A, -- -* *1-5Root/home/pi/playnews.SH0  -* *1-5Root/home/pi/playnews.SH5  -* *1-5Root/home/pi/stopmplayer.SH -  -* *1-5Root/home/pi/stopmplayer.SH0 0* *6-7Root/home/pi/stopmplayer.SH -  -* *1-5Root/home/pi/playmusic.SH0  -* *1-5Root/home/pi/stopmplayer.SH
  3. Play a MP3, webcast script

    Play local music playeslpod.sh

    #!/bin/shsudo pkill-f mplayer; sudo mplayer-shuffle/home/pi/t/eslpod.com/*  </dev/null >/dev/null 2>1& 
    playeslpod.sh Code

    Play Network playnews.sh

    #!/bin/shsudo pkill-f mplayer; sudo 0 -playlist  "http://rthk.hk/live2.m3u" </dev/null >/dev/ NULL 2>1&
    playnews.sh Code

    Play runmplayer.sh

    #!/bin/shif (PS -a|  grep"mplayer");  Then sudo pkill-f mplayer; fi sudo 0 -playlist  "http://rthk.hk/live$1.m3u" </dev/NULL >/dev/null2>1&
    runmplayer.sh Code

    Stop stopmplayer.sh

    #!/bin/shsudo pkill-f mplayer;
    stopmplayer.sh Code

Raspberry Pi Play Network disk MP3 file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.