SDカードにビデオファイルがあります。ビデオファイルを3分から5分でエンコードしたいのですが、私が言おうとしているのは、
たとえば、完全なビデオ ファイルは 10 分です。ここで、エンコードするビデオの 3 ~ 5 分の時点でビデオ データを取得し、次のプロセスを実行する必要があります。
私は以前にそれを行ったことがありますが、完全なビデオファイルをエンコードしただけで、ビデオの特定の時間にビデオファイルをエンコードする考えはありません. これを手伝ってください。以下は、エンコードされた完全なビデオ ファイル コードです。
public void loadVideo(){        
    //convert whole file into byte
    File file = new File("/sdcard/videooutput.mp4");                
    byte[] fileData = new byte[(int) file.length()];
    FileInputStream in; 
    try {
        in = new FileInputStream(file);         
        try {
            in.read(fileData);
            for(int readNum; (readNum = in.read(fileData)) != -1;){                 
            }
        } catch (IOException e) {
            Toast.makeText(this, "IO exc READ file", 2500).show();
            e.printStackTrace();
        }
        try {
            in.close();
        } catch (IOException e) {
            Toast.makeText(this, "IO exc CLOSE file", 2500).show();
            e.printStackTrace();
        }
        String encoded = Base64.encodeToString(fileData, Base64.DEFAULT);
        hantar(encoded);
    } catch (FileNotFoundException e) {
        Toast.makeText(this, "FILE NOT FOUND", 2500).show();
        e.printStackTrace();
    }
これで私を導いてください。よろしくお願いします。
