1. 树莓派映射网络磁盘

    sudo mount -t cifs -o username=jerry.huang,password=Hello2014 //10.10.0.1/Public/ESLPod.com  /home/pi/t/ESLPod.com/
    树莓派分区参考:
    http://bbs.ickey.cn/group-topic-id-35428.html

  2. 树莓派使用 sudo nano 编辑保存文件
    修改静态IP,需要修改/etc/network/interfaces文件
    原文件内容
    auto lo
    
    iface lo inet loopback
    iface eth0 inet dhcp allow-hotplug wlan0
    iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp

    修改为静态IP

    auto lo
    
    iface lo inet loopback
    iface eth0 inet static address 10.10.0.91
    netmask 255.255.255.0
    gateway 10.10.0.254 allow-hotplug wlan0
    iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp

    编辑自动定时任务/etc/crontab

    , -,- * * - root /home/pi/playESLPod.sh
    -,- * * - root /home/pi/playNews.sh
    * * - root /home/pi/playNews.sh
    * * - root /home/pi/stopMplayer.sh
    * * - root /home/pi/stopMplayer.sh
    * * - root /home/pi/stopMplayer.sh
    * * - root /home/pi/playMusic.sh
    * * - root /home/pi/stopMplayer.sh
  3. 播放MP3、网络广播的脚本

    播放本地音乐playESLPod.sh

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

    playESLPod.sh Code

    播放网络playNews.sh

    #!/bin/sh
    sudo pkill -f mplayer;
    sudo mplayer -loop -playlist "http://rthk.hk/live2.m3u" < /dev/null > /dev/null >&

    playNews.sh Code

    播放runMplayer.sh

    #!/bin/sh
    if (ps -A|grep "mplayer");then
    sudo pkill -f mplayer;
    fi
    sudo mplayer -loop -playlist "http://rthk.hk/live$1.m3u" < /dev/null > /dev/null >&

    runMplayer.sh Code

    停止stopMplayer.sh

    #!/bin/sh
    sudo pkill -f mplayer;

    stopMplayer.sh Code

树莓派播放网络磁盘MP3文件的更多相关文章

  1. Android开发 MediaPlayer播放raw资源MP3文件

    代码 private MediaPlayer mRingPlayer; /** * 播放铃声 */ private void startRing(){ if (mRingPlayer != null) ...

  2. 读取SD卡文件夹下的MP3文件和播放MP3文件

    首先获取SD卡path路径下的所有的MP3文件,并将文件名和文件大小存入List数组(此代码定义在FileUtils类中): /** * 读取目录中的Mp3文件的名字和大小 */ public Lis ...

  3. Atitit.android播放smb 网络邻居视频文件解决方案

    Atitit.android播放smb 网络邻居视频文件解决方案 Android4.4 1.1. Android4视频播放器不能直接地支持smb协议..子好先转换成个http流 1.2. ES文件浏览 ...

  4. Unity3d:播放物理目录下的MP3文件

    u3d里,是支持播放MP3文件的,但要放到资源里,不支持播放物理目录下的MP3文件.由于界面上无需显示,只是当作背景音乐来播放,所以想到调用c#的组件来解决此问题.主要代码都在附件中,根据需要加到自己 ...

  5. 实现php获取mp3文件元信息如播放时间歌曲作者等

    最近收集到一个php获取mp3文件元信息的类,感觉比较方便.现在分享给大家! 下面是使用方式和测试方式: <?php include_once 'mp3file.class.php'; func ...

  6. 关于linux下firefox无法播放mp3文件

    起因是发现在线翻译的网站没法发音. F12调出console,发现是没法解码mp3文件. 尝试安装deadbeef包,发现安装之后推荐安装的软件列表中有个名为ffmpeg的包.安装上之后,重启fire ...

  7. UIwebview 文件的下载与保存,以及mp3文件的播放

    这里只是说说异步 单线程下载与文件的保存 以下载一个mp3文件并保存为例: -(void)loading { //设置文件下载地址 NSString *urlString = [NSString st ...

  8. vc中播放mp3文件的方法小结

    一般播放MP3常见的有两种方法,一种是自己解码,另外一种用系统的库,比如MCI,当然如果可以用控件直接用个控件会更方便. 1.      使用mci #include <windows.h> ...

  9. amr格式转mp3和直接播放amr格式的文件-sunziren

    原创文章,转载请注明出处! 前言: amr作为一种高压缩比的音频格式,受到很多客户的青睐.本文主要涉及两部分的内容,一是amr如何转为mp3格式,二是如何直接播放amr格式的文件. 1. 如何使用Ja ...

随机推荐

  1. <iOS开发>之App上架流程(2017)

    本文主要介绍了App上架流程,以及上架过程中会遇到的一些问题. 一.App上架前的准备. 上架前,需要开发人员有苹果开发者账号,具体请阅读苹果开发者账号注册申请流程.本文是在已经拥有开发者账号的前提下 ...

  2. No enclosing instance of type is accessible. Must qualify the allocation with an enclosing instance of type LeadRestControllerTest (e.g. x.new A() where x is an instance of ).

    java - No enclosing instance is accessible. Must qualify the allocation with an enclosing instance o ...

  3. Docker防主机意外断电导致容器实例无法驱动解决方案:UPS || write barrier || 上btrfs定期snapshot

    Write barrier - Wikipediahttps://en.wikipedia.org/wiki/Write_barrier R大在在介绍CMS时提到了write barrier写屏蔽的概 ...

  4. python中$和@基础笔记

    python 2.4以后,增加了@符号修饰函数对函数进行修饰,python3.0/2.6又增加了对类的修饰. $ 在正则表达式中,匹配一个字符串的末尾.(参考http://www.runoob.com ...

  5. 2 Interrupting Appropriately

    1 Interrupting someone politely e.g. Excuse me for interrupting, but may I ask a question? Sure. Of ...

  6. mysql [assword expired

    mysql 5.6 在使用Navicat在其他机器上进行远程登录数据库时 会出现 password expired ,需要重新设置一下密码. SET PASSWORD FOR 'root'@'%' = ...

  7. git format-patch制作内核补丁

    git init git add ./ git commit 之后修改代码 修改代码后执行 git add ./ git commit 执行完成后执行git log查询commit 的id 执行git ...

  8. Python2.7从入门到精通

    快速入门 1.程序输出print语句 (1)使用print语句可查看对象的值:在交互式解释器使用对象本身则输出此对象的字符串表示: (2)使用print语句调用str()显示对象:在交互式解释器使用对 ...

  9. Java使用RabbitMQ之整合Spring(消费者)

    依赖包: <!--RabbitMQ集成spring--> <!-- https://mvnrepository.com/artifact/org.springframework.am ...

  10. 二、K8S镜像问题

    根据前面错误信息来看我们需要下载的镜像.就当前来说,用户 mirrorgooglecontainers 在 docker hub 同步了所有 k8s 最新的镜像,先从这儿下载,然后修改 tag 即可. ...