導航:首頁 > 文件教程 > android視頻文件壓縮

android視頻文件壓縮

發布時間:2021-12-05 00:39:31

⑴ android開發,如何將視頻大小,和解析度壓縮例如1000p壓縮成600p,1000M壓縮成600M

有個免費的好軟體 格式工廠

⑵ 求一款可以在安卓手機上用的視頻壓縮軟體,視頻文件太大幾個GB想讓它變小點,不方便用電腦。。

MP4格式的視頻太大怎麼在線壓縮變小?視頻分為不同格式,最常見的就是MP4,當我們想要保存MP4視頻的時候,有什麼樣的方法?下面小編就簡單給大家介紹一下。

這個時候就需要將視頻壓縮了,如果格式不適合,放網站上也會播放不了,那麼也要將視頻轉格式才可以,轉格式壓縮,迅捷視頻壓縮軟體可以。

⑶ Android怎麼對錄制好的視頻進行壓縮

3樓說的只是輸出格式,跟輸出文件大小是沒有關系的,只是容器的表現形式。樓主要想控制輸出文件大小可以將自己的編碼參數進行修改,例如:碼率,畫面尺寸,幀率,編碼的量化參數,IDR等等。自己調試一下就可以了。

⑷ 問題,android如何壓縮視頻文件質量

系統級別的api,只能通過錄制視頻調整分辨了,格式等盡量降低視頻的大小
系統api是沒辦法壓縮視頻大小的,除非使用第三方編譯的庫如FFMPEG,等但是這些都沒有標準的,自己研究需要懂音視頻C代碼
反正很麻煩,我反正沒有在網上找到合適的第三方

⑸ 手機裡面怎麼把視頻變成壓縮包

只需使用手機自帶的文件管理軟體,進入您需要壓縮文件的路徑中找到回該文件,長按文答件之後就可以打開菜單,點擊菜單中的【壓縮】選項即可壓縮文件。詳細步驟如下:

1、打開手機自帶的文件管理軟體,進入您所需要的壓縮文件的路徑;

2、長按需要壓縮的文件,在彈出的菜單中選擇【壓縮】,完成之後一般會在同一路徑創建一個同名的.rar壓縮文件;

3、如果自帶的文件管理軟體沒有該功能,可以安裝第三方如360手機助手,X-plore文件管理器等。

⑹ android中如何代碼壓縮音頻視頻文件呢

知道怎麼壓縮文件,音視頻文件應該差不多吧O.O
package com.once;

import java.io.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;

/**
* Java utils 實現的工具
*
* @author once
*/
public class ZipUtils {
private static final int BUFF_SIZE = 1024 * 1024; // 1M Byte

/**
* 批量壓縮文件(夾)
*
* @param resFileList 要壓縮的文件(夾)列表
* @param zipFile 生成的壓縮文件
* @throws IOException 當壓縮過程出錯時拋出
*/
public static void zipFiles(Collection<File> resFileList, File zipFile) throws IOException {
ZipOutputStream zipout = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(
zipFile), BUFF_SIZE));
for (File resFile : resFileList) {
zipFile(resFile, zipout, "");
}
zipout.close();
}

/**
* 批量壓縮文件(夾)
*
* @param resFileList 要壓縮的文件(夾)列表
* @param zipFile 生成的壓縮文件
* @param comment 壓縮文件的注釋
* @throws IOException 當壓縮過程出錯時拋出
*/
public static void zipFiles(Collection<File> resFileList, File zipFile, String comment)
throws IOException {
ZipOutputStream zipout = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(
zipFile), BUFF_SIZE));
for (File resFile : resFileList) {
zipFile(resFile, zipout, "");
}
zipout.setComment(comment);
zipout.close();
}

/**
* 解壓縮一個文件
*
* @param zipFile 壓縮文件
* @param folderPath 解壓縮的目標目錄
* @throws IOException 當解壓縮過程出錯時拋出
*/
public static void upZipFile(File zipFile, String folderPath) throws ZipException, IOException {
File desDir = new File(folderPath);
if (!desDir.exists()) {
desDir.mkdirs();
}
ZipFile zf = new ZipFile(zipFile);
for (Enumeration<?> entries = zf.entries(); entries.hasMoreElements();) {
ZipEntry entry = ((ZipEntry)entries.nextElement());
InputStream in = zf.getInputStream(entry);
String str = folderPath + File.separator + entry.getName();
str = new String(str.getBytes("8859_1"), "GB2312");
File desFile = new File(str);
if (!desFile.exists()) {
File fileParentDir = desFile.getParentFile();
if (!fileParentDir.exists()) {
fileParentDir.mkdirs();
}
desFile.createNewFile();
}
OutputStream out = new FileOutputStream(desFile);
byte buffer[] = new byte[BUFF_SIZE];
int realLength;
while ((realLength = in.read(buffer)) > 0) {
out.write(buffer, 0, realLength);
}
in.close();
out.close();
}
}

/**
* 解壓文件名包含傳入文字的文件
*
* @param zipFile 壓縮文件
* @param folderPath 目標文件夾
* @param nameContains 傳入的文件匹配名
* @throws ZipException 壓縮格式有誤時拋出
* @throws IOException IO錯誤時拋出
*/
public static ArrayList<File> upZipSelectedFile(File zipFile, String folderPath,
String nameContains) throws ZipException, IOException {
ArrayList<File> fileList = new ArrayList<File>();

File desDir = new File(folderPath);
if (!desDir.exists()) {
desDir.mkdir();
}

ZipFile zf = new ZipFile(zipFile);
for (Enumeration<?> entries = zf.entries(); entries.hasMoreElements();) {
ZipEntry entry = ((ZipEntry)entries.nextElement());
if (entry.getName().contains(nameContains)) {
InputStream in = zf.getInputStream(entry);
String str = folderPath + File.separator + entry.getName();
str = new String(str.getBytes("8859_1"), "GB2312");
// str.getBytes("GB2312"),"8859_1" 輸出
// str.getBytes("8859_1"),"GB2312" 輸入
File desFile = new File(str);
if (!desFile.exists()) {
File fileParentDir = desFile.getParentFile();
if (!fileParentDir.exists()) {
fileParentDir.mkdirs();
}
desFile.createNewFile();
}
OutputStream out = new FileOutputStream(desFile);
byte buffer[] = new byte[BUFF_SIZE];
int realLength;
while ((realLength = in.read(buffer)) > 0) {
out.write(buffer, 0, realLength);
}
in.close();
out.close();
fileList.add(desFile);
}
}
return fileList;
}

/**
* 獲得壓縮文件內文件列表
*
* @param zipFile 壓縮文件
* @return 壓縮文件內文件名稱
* @throws ZipException 壓縮文件格式有誤時拋出
* @throws IOException 當解壓縮過程出錯時拋出
*/
public static ArrayList<String> getEntriesNames(File zipFile) throws ZipException, IOException {
ArrayList<String> entryNames = new ArrayList<String>();
Enumeration<?> entries = getEntriesEnumeration(zipFile);
while (entries.hasMoreElements()) {
ZipEntry entry = ((ZipEntry)entries.nextElement());
entryNames.add(new String(getEntryName(entry).getBytes("GB2312"), "8859_1"));
}
return entryNames;
}

/**
* 獲得壓縮文件內壓縮文件對象以取得其屬性
*
* @param zipFile 壓縮文件
* @return 返回一個壓縮文件列表
* @throws ZipException 壓縮文件格式有誤時拋出
* @throws IOException IO操作有誤時拋出
*/
public static Enumeration<?> getEntriesEnumeration(File zipFile) throws ZipException,
IOException {
ZipFile zf = new ZipFile(zipFile);
return zf.entries();

}

/**
* 取得壓縮文件對象的注釋
*
* @param entry 壓縮文件對象
* @return 壓縮文件對象的注釋
* @throws UnsupportedEncodingException
*/
public static String getEntryComment(ZipEntry entry) throws UnsupportedEncodingException {
return new String(entry.getComment().getBytes("GB2312"), "8859_1");
}

/**
* 取得壓縮文件對象的名稱
*
* @param entry 壓縮文件對象
* @return 壓縮文件對象的名稱
* @throws UnsupportedEncodingException
*/
public static String getEntryName(ZipEntry entry) throws UnsupportedEncodingException {
return new String(entry.getName().getBytes("GB2312"), "8859_1");
}

/**
* 壓縮文件
*
* @param resFile 需要壓縮的文件(夾)
* @param zipout 壓縮的目的文件
* @param rootpath 壓縮的文件路徑
* @throws FileNotFoundException 找不到文件時拋出
* @throws IOException 當壓縮過程出錯時拋出
*/
private static void zipFile(File resFile, ZipOutputStream zipout, String rootpath)
throws FileNotFoundException, IOException {
rootpath = rootpath + (rootpath.trim().length() == 0 ? "" : File.separator)
+ resFile.getName();
rootpath = new String(rootpath.getBytes("8859_1"), "GB2312");
if (resFile.isDirectory()) {
File[] fileList = resFile.listFiles();
for (File file : fileList) {
zipFile(file, zipout, rootpath);
}
} else {
byte buffer[] = new byte[BUFF_SIZE];
BufferedInputStream in = new BufferedInputStream(new FileInputStream(resFile),
BUFF_SIZE);
zipout.putNextEntry(new ZipEntry(rootpath));
int realLength;
while ((realLength = in.read(buffer)) != -1) {
zipout.write(buffer, 0, realLength);
}
in.close();
zipout.flush();
zipout.closeEntry();
}
}
}

⑺ android調用攝像頭錄制的視頻如何進行壓縮

根據你自己的需求設置好編碼參數(量化參數,IDR,畫面尺寸,8*8宏塊,碼率控制等等),3樓說的3gp,mp4隻是視頻文件格式,跟文件大小沒有關系,只是一個容器的表現方式。

閱讀全文

與android視頻文件壓縮相關的資料

熱點內容
齊全超市小說 瀏覽:161
樂高機器人編程是什麼課程 瀏覽:935
手機如何製作網站鏈接 瀏覽:557
繁體字qq網名 瀏覽:17
貝殼網的原始登錄密碼 瀏覽:876
求一個能看各種小說的網站 瀏覽:953
ps中優化的文件格式包括 瀏覽:149
電影解析網站 瀏覽:24
hdf文件如何打開 瀏覽:208
ota升級712能越獄嗎 瀏覽:675
極品飛車9主程序是哪個 瀏覽:518
java官網下載不了 瀏覽:359
電影《Il guardaspalle 》羅莎卡拉喬洛(1993) 瀏覽:930
主角叫林飛的系統流小說 瀏覽:588
論文數據如何注冊 瀏覽:137
關於大數據的來源以下理解正確的是哪些 瀏覽:931
ae電子書教程 瀏覽:567
20部德國二戰電影十大經典 瀏覽:403
90分鍾高清完整版推薦 瀏覽:343

友情鏈接