这个帖子没有图,好吧,找一张小的帖上,要不对不起大家了
够小吧,手里是根大葱,对,就是根葱,好啦,香蕉到手已经有一段时间啦,听说M2要出来啦,学生套又涨价啦,闲话少说,香蕉有3.5的音频输出口怎么让她输出音乐呢,查资料,很简单
参考了这篇文章,就不做链接了,防止被吃掉:
http://www.phpbulo.com/archives/430.html
1、测试
root@bananapi:~# mplayer test.mp3
-bash: mplayer: command not found
2、安装
root@bananapi:~# apt-get install mplayer
3、播放
root@bananapi:~# mplayer test.wav
据说这个播放器很强大,可以播放网络上的音乐
root@bananapi:~# mplayer "http://yinyueshiting.baidu.com/data2/music/124574160/49046814400128.mp3?xcode=631ddae65590b6ba250388445b5acdc7b88a242702f69397&song_id=490468"
注意要加引号,原文中没有说,否则会报错的,这个是《独脚戏》估计是百度临时的url所以过一段时间试不一定有效,找新的吧
既然强大,应该也能播放avi,不过还是报错了
root@bananapi:~# mplayer miku.avi
MPlayer svn r34540 (Raspbian), built with gcc-4.6 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing miku.avi.
libavformat version 53.21.1 (external)
Mismatching header version 53.19.0
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [FMP4] 512x288 24bpp 15.000 fps 541.6 kbps (66.1 kbyte/s)
Clip info:
Software: Lavf55.22.103
Load subtitles in ./
vo: couldn't open the X11 display ()!
vo: couldn't open the X11 display ()!
SDL SetVideoMode failed: Couldn't set console screen info
vo: couldn't open the X11 display ()!
VO XOverlay need a subdriver
[VO_SDL] Using driver: fbcon.
vo: couldn't open the X11 display ()!
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 53.35.0 (external)
Mismatching header version 53.32.2
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Unsupported PixelFormat 81
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 24000 Hz, 2 ch, floatle, 64.0 kbit/4.17% (ratio: 8000->192000)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 24000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [sdl] 512x288 => 512x288 Planar YV12
[VO_SDL] Set_fullmode: SDL_SetVideoMode failed: Couldn't set console screen info.
[VO_SDL] Failed to set video mode: Couldn't set console screen info.
FATAL: Cannot initialize video driver.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [sdl] 512x288 => 512x288 Planar YV12
[VO_SDL] Set_fullmode: SDL_SetVideoMode failed: Couldn't set console screen info.
[VO_SDL] Failed to set video mode: Couldn't set console screen info.
FATAL: Cannot initialize video driver.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [sdl] 512x288 => 512x288 Planar YV12
[VO_SDL] Set_fullmode: SDL_SetVideoMode failed: Couldn't set console screen info.
[VO_SDL] Failed to set video mode: Couldn't set console screen info.
FATAL: Cannot initialize video driver.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [sdl] 512x288 => 512x288 Planar YV12
[VO_SDL] Set_fullmode: SDL_SetVideoMode failed: Couldn't set console screen info.
[VO_SDL] Failed to set video mode: Couldn't set console screen info.
FATAL: Cannot initialize video driver.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [sdl] 512x288 => 512x288 Planar YV12
[VO_SDL] Set_fullmode: SDL_SetVideoMode failed: Couldn't set console screen info.
[VO_SDL] Failed to set video mode: Couldn't set console screen info.
FATAL: Cannot initialize video driver.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [sdl] 512x288 => 512x288 Planar YV12
[VO_SDL] Set_fullmode: SDL_SetVideoMode failed: Couldn't set console screen info.
[VO_SDL] Failed to set video mode: Couldn't set console screen info.
FATAL: Cannot initialize video driver.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [sdl] 512x288 => 512x288 Planar YV12
[VO_SDL] Set_fullmode: SDL_SetVideoMode failed: Couldn't set console screen info.
[VO_SDL] Failed to set video mode: Couldn't set console screen info.
FATAL: Cannot initialize video driver.
FATAL: Could not initialize video filters (-vf) or video output (-vo).
Exiting... (End of file)
一堆洋文,看不懂,似乎是支持的,可能是没有地方显示,好吧,看看help,应该是可以加个参数关掉视频的
root@bananapi:~# mplayer -vo null miku.avi
MPlayer svn r34540 (Raspbian), built with gcc-4.6 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing miku.avi.
libavformat version 53.21.1 (external)
Mismatching header version 53.19.0
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [FMP4] 512x288 24bpp 15.000 fps 541.6 kbps (66.1 kbyte/s)
Clip info:
Software: Lavf55.22.103
Load subtitles in ./
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 53.35.0 (external)
Mismatching header version 53.32.2
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Unsupported PixelFormat 81
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 24000 Hz, 2 ch, floatle, 64.0 kbit/4.17% (ratio: 8000->192000)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 24000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [null] 512x288 => 512x288 Planar YV12
A: 3.7 V: 3.7 A-V: 0.001 ct: 0.000 57/ 57 7% 0% 2.0% 1 0
MPlayer interrupted by signal 2 in module: sleep_timer
A: 3.8 V: 3.8 A-V: -0.001 ct: -0.000 58/ 58 7% 0% 2.0% 1 0
Exiting... (Quit)
果真响起了音乐
阿拉嚓嚓拉力拉力令 拉巴力刚丁刚丁刚多 巴巴力巴巴巴力巴力 巴力力力力力力力力 斯挺丁刚多 呀巴令刚丁刚丁阿罗 哇巴巴噜噜噜噜噜噜噜噜跌呀噜 哇令刚令刚丁刚多 哒哒哒哒哒哒嘟嘟跌呀嘟 阿拉嚓嚓拉力拉力令 拉巴力刚丁刚丁刚多 巴巴力巴巴巴力巴力 巴力力力力力力力力 斯挺丁刚多 呀巴令刚丁刚丁阿罗 哇巴巴噜噜噜噜噜噜噜噜跌呀噜 哇令刚令刚丁刚多 哒哒哒哒哒哒嘟嘟跌呀嘟 吆! 阿拉嚓嚓拉力拉力令 拉巴力刚丁刚丁刚多 巴巴力巴巴巴力巴力 巴力力力力力力力力 斯挺丁刚多 呀巴令刚丁刚丁阿罗 哇巴巴令刚丁刚丁阿罗 哇巴巴令刚丁刚令刚丁刚 令刚令刚令令令令令 阿拉嚓嚓拉力拉力令 拉巴力刚丁刚丁刚多 巴巴力巴巴巴力巴力 巴力力力力力力力力 斯挺丁刚多 呀巴令刚丁刚丁阿罗 哇巴巴噜噜噜噜噜噜噜噜跌呀噜 哇令刚令刚丁刚多 哒哒哒哒哒哒嘟嘟跌呀嘟 阿拉嚓嚓拉力拉力令 拉巴力刚丁刚丁刚多 巴巴力巴巴巴力巴力 巴力力力力力力力力 斯挺丁刚多 呀巴令刚丁刚丁阿罗 哇巴巴噜噜噜噜噜噜噜噜跌呀噜 哇令刚令刚丁刚多 哒哒哒哒哒哒嘟嘟跌呀嘟