android視頻開發
『壹』 android視頻誰講的比較好
看android視頻可以看Mars系列的android視頻教程,一般學員認為比較好的視頻教程,非常有名的。
Mars論壇上找的視頻教程,都是關於Mars老師的,還有網盤里也有android游戲開發相關視頻教程。
即使毫無編程基礎的學員也能輕松的掌握。視頻當中包含了java基礎語法、面相對象語法、面相對象編程思想、IO流和多線程等等內容,涵蓋了從基礎到高級的所有Java特性。完整的學員本套視頻之後,就可以開始Android開發之旅了。
『貳』 android開發 關於視頻 存放位置以及讀取方法
LZ應該知道android的四大存儲方式,文件系統,資料庫,sharepreference和網路存儲。如果LZ不願意放到asssets或者raw裡面,那就只有放到那四個裡面去了,看LZ自己取捨把
『叄』 安卓開發如何實現播放網路視頻用什麼思路
用android Library的mediaplayer class
// steps show as following
1 Create a MediaPlayer instance through the create() method (idle state).
2 Initialize the MediaPlayer with the media source to play (initialized state).
3 Prepare the MediaPlayer for playback through the prepare() method (preparing
and prepared states).
4 Play the MediaPlayer through the start() method (started state).
5 Duringplayback,ifdesired,youcanpause,stop,orreplaytheMediaPlayer(started,
paused, playback complete, and stopped states).
6 Once playback is finished, make sure to release the MediaPlayer』s associated re-
sources by calling release() (end state).
『肆』 Android短視頻開發哪家做的比較好
騰訊微視比較好,
微視是騰訊公司開發的一個短視頻分享軟體,
你可以通過該軟體上傳一個8秒的短視頻,各種創意,美女,圖片等等,
還可以分段的拍攝,很多明星都在玩。可以支持相片、微視頻、長視頻的拍攝。
『伍』 Android開發視頻通話怎麼實現
/** 
* Android視頻聊天 
* 1、初始化SDK 2、連接伺服器、 3、用戶登錄;4、進入房間;5、打開本地視頻;6、請求對方視頻 
*/ 
public class VideoChatActivity extends Activity implements AnyChatBaseEvent 
{ 
private AnyChatCoreSDK anychat; // 核心SDK 
private SurfaceView remoteSurfaceView; // 對方視頻 
private SurfaceView localSurfaceView; // 本地視頻 
private ConfigEntity configEntity; 
private boolean bSelfVideoOpened = false; // 本地視頻是否已打開 
private boolean bOtherVideoOpened = false; // 對方視頻是否已打開 
private TimerTask mTimerTask; // 定時器 
private Timer mTimer = new Timer(true); 
private Handler handler; // 用Handler來不間斷刷新即時視頻 
private List<String> userlist = new ArrayList<String>();//保存在線用戶列表 
private int userid; // 用戶ID 
@Override 
public void onCreate(Bundle savedInstanceState) 
{ 
super.onCreate(savedInstanceState); 
setContentView(R.layout.activity_video_chat); 
remoteSurfaceView = (SurfaceView) findViewById(R.id.surface_remote); 
localSurfaceView = (SurfaceView) findViewById(R.id.surface_local); 
configEntity = ConfigService.LoadConfig(this);//載入視頻通話設置 
loginSystem();// 初始化SDK 連接伺服器 
mTimerTask = new TimerTask(){ 
public void run(){ 
Message mesasge = new Message(); 
handler.sendMessage(mesasge); 
} 
}; 
mTimer.schele(mTimerTask, 1000, 100); 
handler = new Handler(){ 
@Override 
public void handleMessage(Message msg){ 
VideoChat();// 不間斷顯示即時視頻通話畫面 
super.handleMessage(msg); 
} 
}; 
} 
// 初始化SDK 連接伺服器 
private void loginSystem(){ 
if (anychat == null){ 
anychat = new AnyChatCoreSDK(); 
anychat.SetBaseEvent(this); // 設置基本事件回調函數 
if (configEntity.useARMv6Lib != 0) // 使用ARMv6指令集 
anychat.SetSDKOptionInt(AnyChatDefine. 
BRAC_SO_CORESDK_USEARMV6LIB, 1); 
anychat.InitSDK(android.os.Build.VERSION.SDK_INT, 0); // 初始化SDK 
} 
anychat.Connect("demo.anychat.cn", 8906);// 連接伺服器 
} 
// 顯示即時視頻通話畫面 
public void VideoChat(){ 
if (!bOtherVideoOpened){ 
if (anychat.GetCameraState(userid) == 2 
&& anychat.GetUserVideoWidth(userid) != 0){ 
SurfaceHolder holder = remoteSurfaceView.getHolder(); 
holder.setFormat(PixelFormat.RGB_565); 
holder.setFixedSize(anychat.GetUserVideoWidth(userid), 
anychat.GetUserVideoHeight(userid)); 
Surface s = holder.getSurface(); // 獲得視頻畫面 
anychat.SetVideoPos(userid, s, 0, 0, 0, 0); // 調用API顯示視頻畫面 
bOtherVideoOpened = true; 
} 
if (!bSelfVideoOpened){ 
if (anychat.GetCameraState(-1) == 2 
&& anychat.GetUserVideoWidth(-1) != 0){ 
SurfaceHolder holder = localSurfaceView.getHolder(); 
holder.setFormat(PixelFormat.RGB_565); 
holder.setFixedSize(anychat.GetUserVideoWidth(-1), 
anychat.GetUserVideoHeight(-1)); 
Surface s = holder.getSurface(); 
anychat.SetVideoPos(-1, s, 0, 0, 0, 0); 
bSelfVideoOpened = true; 
} 
} 
} 
public void OnAnyChatConnectMessage(boolean bSuccess){ 
if (!bSuccess){ 
Toast.makeText(VideoChatActivity.this, "連接伺服器失敗,自動重連,請稍後...", Toast.LENGTH_SHORT).show(); 
} 
anychat.Login("android", ""); // 伺服器連接成功 用戶登錄 
} 
public void OnAnyChatLoginMessage(int dwUserId, int dwErrorCode){ 
if (dwErrorCode == 0) { 
Toast.makeText(this, "登錄成功!", Toast.LENGTH_SHORT).show(); 
anychat.EnterRoom(1, ""); // 用戶登錄成功 進入房間 
ApplyVideoConfig(); 
} else { 
Toast.makeText(this, "登錄失敗,錯誤代碼:" + dwErrorCode, Toast.LENGTH_SHORT).show(); 
} 
} 
public void OnAnyChatEnterRoomMessage(int dwRoomId, int dwErrorCode){ 
if (dwErrorCode == 0) { // 進入房間成功 打開本地音視頻 
Toast.makeText(this, "進入房間成功", Toast.LENGTH_SHORT).show(); 
anychat.UserCameraControl(-1, 1); // 打開本地視頻 
anychat.UserSpeakControl(-1, 1); // 打開本地音頻 
} else { 
Toast.makeText(this, "進入房間失敗,錯誤代碼:" + dwErrorCode, Toast.LENGTH_SHORT).show(); 
} 
} 
public void OnAnyChatOnlineUserMessage(int dwUserNum, int dwRoomId){ 
if (dwRoomId == 1){ 
int user[] = anychat.GetOnlineUser(); 
if (user.length != 0){ 
for (int i = 0; i < user.length; i++){ 
userlist.add(user[i]+""); 
. } 
String temp =userlist.get(0); 
userid = Integer.parseInt(temp); 
anychat.UserCameraControl(userid, 1);// 請求用戶視頻 
anychat.UserSpeakControl(userid, 1); // 請求用戶音頻 
} 
else { 
Toast.makeText(VideoChatActivity.this, "當前沒有在線用戶", Toast.LENGTH_SHORT).show(); 
} 
} 
} 
public void OnAnyChatUserAtRoomMessage(int dwUserId, boolean bEnter){ 
if (bEnter) {//新用戶進入房間 
userlist.add(dwUserId+""); 
} 
else { //用戶離開房間 
if (dwUserId == userid) 
{ 
Toast.makeText(VideoChatActivity.this, "視頻用戶已下線", Toast.LENGTH_SHORT).show(); 
anychat.UserCameraControl(userid, 0);// 關閉用戶視頻 
anychat.UserSpeakControl(userid, 0); // 關閉用戶音頻 
userlist.remove(userid+""); //移除該用戶 
if (userlist.size() != 0) 
{ 
String temp =userlist.get(0); 
userid = Integer.parseInt(temp); 
anychat.UserCameraControl(userid, 1);// 請求其他用戶視頻 
anychat.UserSpeakControl(userid, 1); // 請求其他用戶音頻 
} 
} 
141. else { 
userlist.remove(dwUserId+""); //移除該用戶 
} 
} 
} 
public void OnAnyChatLinkCloseMessage(int dwErrorCode){ 
Toast.makeText(VideoChatActivity.this, "連接關閉,error:" + dwErrorCode, Toast.LENGTH_SHORT).show(); 
} 
@Override 
protected void onDestroy(){ //程序退出 
anychat.LeaveRoom(-1); //離開房間 
anychat.Logout(); //注銷登錄 
anychat.Release(); //釋放資源 
mTimer.cancel(); 
super.onDestroy(); 
} 
// 根據配置文件配置視頻參數 
private void ApplyVideoConfig(){ 
if (configEntity.configMode == 1) // 自定義視頻參數配置 
{ 
// 設置本地視頻編碼的碼率(如果碼率為0,則表示使用質量優先模式) 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_BITRATECTRL,configEntity.videoBitrate); 
if (configEntity.videoBitrate == 0) 
{ 
// 設置本地視頻編碼的質量 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_QUALITYCTRL,configEntity.videoQuality); 
} 
// 設置本地視頻編碼的幀率 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_FPSCTRL,configEntity.videoFps); 
// 設置本地視頻編碼的關鍵幀間隔 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_GOPCTRL,configEntity.videoFps * 4); 
// 設置本地視頻採集解析度 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_WIDTHCTRL,configEntity.resolution_width); 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_HEIGHTCTRL,configEntity.resolution_height); 
// 設置視頻編碼預設參數(值越大,編碼質量越高,佔用CPU資源也會越高) 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_PRESETCTRL,configEntity.videoPreset); 
} 
// 讓視頻參數生效 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_APPLYPARAM,configEntity.configMode); 
// P2P設置 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_NETWORK_P2PPOLITIC,configEntity.enableP2P); 
// 本地視頻Overlay模式設置 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_OVERLAY,configEntity.videoOverlay); 
// 迴音消除設置 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_AUDIO_ECHOCTRL,configEntity.enableAEC); 
// 平台硬體編碼設置 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_CORESDK_USEHWCODEC,configEntity.useHWCodec); 
// 視頻旋轉模式設置 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_ROTATECTRL,configEntity.videorotatemode); 
// 視頻平滑播放模式設置 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_STREAM_SMOOTHPLAYMODE,configEntity.smoothPlayMode); 
// 視頻採集驅動設置 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_CAPDRIVER,configEntity.videoCapDriver); 
// 本地視頻採集偏色修正設置 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_FIXCOLORDEVIA,configEntity.fixcolordeviation); 
// 視頻顯示驅動設置 
anychat.SetSDKOptionInt(AnyChatDefine.BRAC_SO_VIDEOSHOW_DRIVERCTRL,configEntity.videoShowDriver); 
} 
}
『陸』 Android 視頻開發中如何通過url或者本地視
第一步:將bitmap轉換成drawable對象,並設置給surfaceView視頻播放窗口作為背景圖片
//通過getVideoThumbnail方法取得視頻中的第一幀圖片,該圖片是一個bitmap對象Bitmap bitmap=getVideoThumbnail(String url);//將bitmap對象轉換成drawable對象Drawable drawable=new BitmapDrawable(bitmap);//將drawable對象設置給視頻播放窗口surfaceView控制項作為背景圖片surfaceView.setBackgroundDrawable(drawable);123456
第二部分:通過url網址或者本地文件路徑獲得視頻的第一幀圖片
public Bitmap getVideoThumbnail(String url) {
Bitmap bitmap = null;//MediaMetadataRetriever 是android中定義好的一個類,提供了統一//的介面,用於從輸入的媒體文件中取得幀和元數據;
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
try {
//()根據文件路徑獲取縮略圖//retriever.setDataSource(filePath);
retriever.setDataSource(url, new HashMap());          //獲得第一幀圖片
bitmap = retriever.getFrameAtTime();
}
catch(IllegalArgumentException e) {
e.printStackTrace();
}
catch (RuntimeException e) {
e.printStackTrace();
}
finally {
try {
retriever.release();
}
catch (RuntimeException e) {
e.printStackTrace();
}
}
Log.v("bitmap", "bitmap="+bitmap);        return bitmap;
}
『柒』 安卓開發怎麼調用視頻
如果僅僅是播放一段視頻的話可以調用相關intent 讓別的app去播放這段視頻
Intentit=newIntent(Intent.ACTION_VIEW);
Uriuri=Uri.parse("
file:///sdcard/song.mp3
");
it.setDataAndType(uri,"audio/mp3");
startActivity(it);
Uriuri=Uri.withAppendedPath(
MediaStore.Audio.Media.INTERNAL_CONTENT_URI,"1");
Intentit=newIntent(Intent.ACTION_VIEW,uri);
startActivity(it);
『捌』 如何開發一個android視頻會議系統
全時雲會議完全滿足您的需求,而且在PC端不同系統windows和mac系統都有版本,移動端ios和安卓系統都有。並且可以一個賬號多個終端同時登陸
『玖』 基於Android開發一款視頻播放器
自己開發播放器,是不是太難了。你可以使用android自帶的mediaplayer。
『拾』 android 區域網視頻聊天 如何開發
我也想知道 如果發我一份 我也給財富值50
