Skip to content

Error in merging videos #29

@nauman415

Description

@nauman415

String intermediate1 = getExternalFilesDir(null).getAbsoluteFile()+"/intermediate1.ts";
String intermediate2 = getExternalFilesDir(null).getAbsoluteFile()+"/intermediate2.ts";
String filein = getExternalFilesDir(null).getAbsoluteFile()+"/in.mp4";
String fileout = getExternalFilesDir(null).getAbsoluteFile()+"/out.mp4";
String fileouts = getExternalFilesDir(null).getAbsoluteFile()+"/outs.mp4";
/************************************************/
Controller.getInstance().run(new String[]{
"-i",
filein,
"-c",
"copy",
"-bsf:v h264_mp4toannexb",
"-f",
"mpegts",

            intermediate1
    });
    Controller.getInstance().run(new String[]{
            "-i",
            fileout,
            "-c",
            "copy",
            "-bsf:v h264_mp4toannexb",
            "-f",
            "mpegts",

            intermediate2
    });

[https://trac.ffmpeg.org/wiki/Concatenate]
/*****************************************/
below is your code

from this files are created but not merge into 1 file

Controller.getInstance().run(new String[]{
"-f",
"-i",
filein,
"-vcodec",
"copy",
"-an",
intermediate2
}); Controller.getInstance().run(new String[]{
"-f",
"-i",
fileout,
"-vcodec",
"copy",
"-an",
intermediate1
});
Controller.getInstance().run(new String[]{
"-i",
"concat:"+intermediate1+"|"+intermediate2,
"-c",
"copy",
"-bsf:a aac_adtstoasc",
fileouts
});
Application is closed when this code is run
Please help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions