mplayer

Android 7.0 Audio: Mediaplayer

℡╲_俬逩灬. 提交于 2019-12-03 18:31:04
1.1.1 播放代码 MediaPlayer类是android framework提供的多媒体类,可以用来播放音频、视频和流媒体,MediaPlayer包含了Audio和Video的播放功能。 其基本的方法和功能简介如下: MediaPlayer 构造方法 create 创建一个要播放的多媒体 getCurrentPosition 得到当前播放位置 getDuration 得到文件的时间 getVideoHeight 得到视频的高度 getVideoWidth 得到视频的宽度 isLooping 是否循环播放 isPlaying 是否正在播放 pause 暂停 prepare 准备(同步) prepareAsync 准备(异步) release 释放MediaPlayer对象 reset 重置MediaPlayer对象 seekTo 指定播放的位置(以毫秒为单位的时间) setAudioStreamType 设置流媒体的类型 setDataSource 设置多媒体数据来源 setDisplay 设置用SurfaceHolder来显示多媒体 setLooping 设置是否循环播放 setOnButteringUpdateListener 网络流媒体的缓冲监听 setOnErrorListener 设置错误信息监听 setOnVideoSizeChangedListener

BASH- Run MPlayer if either there are no users on display :0 or if there is more than one argument

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This is the script I currently have- #!/bin/bash if["$#" == "2" OR who | grep ":0" == ""] export DISPLAY=:0 xset dpms force on mplayer -fs $1.mp4 fi It doesn't work. Thanks for your help. 回答1: You should spend some time reading man test , it looks to me like you've got several problems here: if [ "$#" = "2" -o -z "$(who | grep ':0')" ]; then Notice the space after the [ . Notice the one equal sign for string compare. Notice that -o is the OR operator. Notice the -z for testing against the empty string. Notice the $(...) to execute the who

视频播放器实现原理

匿名 (未验证) 提交于 2019-12-03 00:22:01
最近刚刚开始接触视频,对于视频本身的基础知识非常匮乏,搜集整理一下自己的学习过程。这篇视频播放器实现的文章对于理解视频是如何传输、编码、解码、播放整个流程有不少帮助: 原文地址: http://blog.csdn.net/l_yangliu/article/details/13503823 ES流(Elementary Stream): 也叫基本码流,包含视频、音频或数据的连续码流. PES流(Packet Elementary Stream): 也叫打包的基本码流, 是将基本的码流ES流根据需要分成长 度不等的数据包, 并加上包头就形成了打包的基本码流PES流. TS流(Transport Stream): 也叫传输流, 是由固定长度为188字节的包组成, 含有独立时基的一个或 多个program, 一个program又可以包含多个视频、音频、和文字信息的ES流; 每个ES流会有不同的 PID标示. 而又为了可以分析这些ES流, TS有一些固定的PID用来间隔发送program和ES流信息的表格: PAT和PMT表. (在MPEG-2系统中,由视频, 音频的ES流和辅助数据复接生成的用于实际传输的标准信息流称为MPEG-2传送流) 封装 : 就是捆绑打包, 将画面视频文件和音轨文件打包在一起, 并按照一定规则建立排序和索引, 便 于播放器或播放软件来索引播放. 包括AVI \

exoplayer的使用简介和实测播放dash流、hls(一)

匿名 (未验证) 提交于 2019-12-03 00:18:01
一、exoplayer的相关库的集成关联 From JCenter 本人的是as3.1。我这里的exo库用的是2.8.0。取消其他版本的点这里: 历代exoplayer-release版本简介 。 git clone https://github.com/google/ExoPlayer.git git checkout release-v2 include ':app', ':library', ':library-dash', ':lib100' gradle.ext.exoplayerRoot = 'E:\\exo player\\ExoPlayer-release-v2' gradle.ext.exoplayerModulePrefix = 'exoplayer-' apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle') implementation project(':exoplayer-library-core') implementation project(':exoplayer-library-dash') implementation project(':exoplayer-library-ui') 二、exoplayer的使用。 <?xml version="1.0"

MPlayer音乐播放器项目讲解

匿名 (未验证) 提交于 2019-12-03 00:14:01
一、简要介绍 MPlyer 音乐播放器 MPlayer 是一款开源多媒体播放器,以 GNU 通用公共许可证发布。此款软件可在各主流操作系统使用,例如 Linux 和其他类 Unix 系统、 Windows 及 Mac OS X 系统。 二、在开发板实现 MPlayer 功能 具体如何实现 mute 0 静音,为什么用这个命令不用我们做,我们要做的是在开发板上获取出界面后,按下相应按钮实现相应的功能,即对这个命令的处理和调用。 三、思路 1 、画 glade 界面 2 、主函数分为父、子进程 父进程:开启 mplayer ,用到 execlp 命令 子进程:( 1 ) 搭 GTK 框架,创建背景窗口、布局以及控件的获取显示; ( 2 )写上一首、下一首、暂停的回调函数( g_signal_connect ); ( 3 ) 获取歌曲目录信息; DIR * dir ; struct dirent * dirp ; int i = 0 ; char * dd [ 100 ]={}; char ll [ 100 ]= "" ; if (( dir = opendir ( "./song" ))== NULL ) { printf ( "Open dir song fail\n" ); exit ( 1 ); } while (( dirp = readdir ( dir ))!= NULL

如何在MPlayer上支持RTSP

匿名 (未验证) 提交于 2019-12-02 23:57:01
http://www.live555.com/mplayer/ 请按照如下步骤 下载 " LIVE555 Streaming Media " l的库的源码, 解压后 将"live/" 目录移动到 "/usr/local/", "/usr/local/lib/", 或者是 "/usr/lib/". (注意:如果你不这么做, 则需要制定目录 "live/" ) 下载最新源码 MPlayer source code . 如果你在第一步的时候把 "live/"目录移动到"/usr/local/", "/usr/local/lib/", 或"/usr/lib/", 运行 cd MPlayer * ; ./ configure 如果移动 live555 目录了会自动发现, 否则需要运行 cd MPlayer * ; ./ configure -- extracflags =- I < path - to - LIVE555 - Streaming - Media - library - directory > 现在,构建和生成 MPlayer , make ; make install (构建MPlayer和 LIVE555 Streaming Media 的时候必须是相同的gcc版本.) 来源:博客园 作者: 麦壳饼 链接:https://www.cnblogs.com/MysticBoy

Mplayer ww 版本 SVN-r37370-ffmpeg n2.5.3 gcc 4.5.1

匿名 (未验证) 提交于 2019-12-02 23:57:01
缘起于更换工作环境到新的工作站,于无意中发现旧硬盘里的相关代码,又用着potplayer不爽。想着WW版自从2015年就不开始更新了… 神不在我们身边,所以朝圣的路很远,何不我自成神? 距mplayer最新的SVN版本还有700多个版本……等这些版本编译正常时,将把各种第三方库及GCC进行再一次更新……在此之前,请慢慢等待…不定时更新 根据Mplayer ww 版本 最后一个版本2015年的r37356 做了更新 SVN-r37370-ffmpeg n2.5.3 gcc 4.5.1 FFMPEG由n2.5-〉n2.5.3 下载地址: 链接:https://pan.baidu.com/s/1aQyKFy7fFlSHrpXNTFOD4w 提取码:hfp8 库及编译环境: glib_2.28.1 pkg-config_0.23-3 libintl-8 * compiler flags: -O3 -s -mms-bitfields -march=i386 -mtune=i686 mingw-full-20160707 * libtool-2.4.6 * autoconf-2.69 * automake-1.15 * m4-1.4.17 * binutils-2.26.1 * gmp-6.1.1 * mpfr-3.1.4 * mpc-1.0.3 mingw-full-20160704 *

Python: Send command to mplayer under slave mode

痴心易碎 提交于 2019-12-02 04:02:15
问题 I'm trying to send command via pipe to mplayer when running it under slave mode like this: import subprocess, time # start mplayer song = 'mysong.mp3' cmd = ['mplayer', '-slave', '-quiet', song] p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE) # send a command every 3 seconds. # Full command reference here: http://www.mplayerhq.hu/DOCS/tech/slave.txt while True: print('sleep 3 seconds ...') time.sleep(3) cmd = 'get_meta_artist' print('send command: {}'.format(cmd)) p

Python: Send command to mplayer under slave mode

久未见 提交于 2019-12-02 01:13:12
I'm trying to send command via pipe to mplayer when running it under slave mode like this: import subprocess, time # start mplayer song = 'mysong.mp3' cmd = ['mplayer', '-slave', '-quiet', song] p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE) # send a command every 3 seconds. # Full command reference here: http://www.mplayerhq.hu/DOCS/tech/slave.txt while True: print('sleep 3 seconds ...') time.sleep(3) cmd = 'get_meta_artist' print('send command: {}'.format(cmd)) p.stdin.write(cmd) output = p.communicate()[0] print(output) But the output was nothing. I took the

rtsp stream capturing

天大地大妈咪最大 提交于 2019-11-29 22:22:48
I'm looking for some universal way to dump rtsp stream. I want to figure out, that some rtsp stream is working well and server is sending some watchable video. openRTSP At first, google recommends me openRTSP tool. openRTSP -4 ${stream_link} > ${output_file} But output video file dumped by that tool is not really correct. Video decoder (ffdec) returns many errors like "Failed to decode video packet" and "[h264] no frame!", which don't suit me. ffmpeg Then I've tried to dump rtsp stream with ffmpeg tool. ffmpeg -loglevel debug -i "${stream_link}" -s 640x480 -vcodec copy -acodec copy -y ${output