Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compress video not play. #59

Open
mayursancheti opened this issue Sep 12, 2022 · 0 comments
Open

compress video not play. #59

mayursancheti opened this issue Sep 12, 2022 · 0 comments

Comments

@mayursancheti
Copy link

i am using your liabrary but it failed video to save, video just start 5 second and stop, not play.

is it really stores compress to any android version,

below is part my code
`VideoCompress.compressVideoLow(Util.getFilePath(step3_videoproductdetail.this, urlis), outputfile_compreess, new VideoCompress.CompressListener() {
@OverRide
public void onStart() {
tv_indicator.setText("Compressing..." + "\n"
+ "Start at: " + new SimpleDateFormat("HH:mm:ss", getLocale()).format(new Date()));
pb_compress.setVisibility(View.VISIBLE);
startTime = System.currentTimeMillis();
Util.writeFile(step3_videoproductdetail.this, "Start at: " + new SimpleDateFormat("HH:mm:ss", getLocale()).format(new Date()) + "\n");
}

                @Override
                public void onSuccess() {
                    String previous = tv_indicator.getText().toString();
                    tv_indicator.setText(previous + "\n"
                            + "Compress Success!" + "\n"
                            + "End at: " + new SimpleDateFormat("HH:mm:ss", getLocale()).format(new Date()));
                    pb_compress.setVisibility(View.INVISIBLE);
                    endTime = System.currentTimeMillis();
                    Util.writeFile(step3_videoproductdetail.this, "End at: " + new SimpleDateFormat("HH:mm:ss", getLocale()).format(new Date()) + "\n");
                    Util.writeFile(step3_videoproductdetail.this, "Total: " + ((endTime - startTime)/1000) + "s" + "\n");
                    Util.writeFile(step3_videoproductdetail.this);

                    uploadImage();
                }

                @Override
                public void onFail() {
                    tv_indicator.setText("Compress Failed!");
                    pb_compress.setVisibility(View.INVISIBLE);
                    endTime = System.currentTimeMillis();
                    Util.writeFile(step3_videoproductdetail.this, "Failed Compress!!!" + new SimpleDateFormat("HH:mm:ss", getLocale()).format(new Date()));
                }

                @Override
                public void onProgress(float percent) {
                    tv_progress.setText(String.valueOf(percent) + "%");
                }
            });`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant