You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
Hi first of all , thank you for your library . Im using your library to let my users crop their video in variables aspect ratio , im using this This CropVideoView as a replacement for your Simplecropview , the crop is not working corretly as it should , what im doing wrong ? Here s my code ` Uri fileUri = Uri.fromFile(new File(FinalSingleNewPath));
String destPath = getVideoFilePath();
Log.e(TAG, "translateX = "+ mVideoCropView.getRealPositionX() + " translateY = "+ mVideoCropView.getRealPositionY() );
Log.e(TAG, "resolution.width = "+mVideoCropView.getWidth()+" resolution.getHeight = "+mVideoCropView.getHeight());
FillModeCustomItem fillModeCustomItem = new FillModeCustomItem(
mVideoCropView.getScaleX(),
mVideoCropView.getRotate(),
(int) mVideoCropView.getRealPositionX(),
(int) mVideoCropView.getRealPositionY(),
mVideoCropView.getVideoWidth() ,
mVideoCropView.getVideoHeight()
);
aftercorp.final_flash.EditPostFile.GlFilterGroup glFilterGroup;
if(composerGlFilter == null) {
composerGlFilter = new GlFilter();
}
glFilterGroup = new GlFilterGroup(new GlFilter()); // the default filter
Log.e(TAG, "currentGlFilter is null");
final Logger mylogger = new Logger() {
@Override
public void debug(String tag, String message) {
Log.d(tag, message);
}
@Override
public void error(String tag, String message, Throwable error) {
Log.e(tag, "Message: "+message + ". Error: "+error.getLocalizedMessage());
}
@Override
public void warning(String tag, String message) {
Log.w(tag, message);
}
};
mp4Composer = null;
mp4Composer = new Mp4Composer(fileUri, destPath, SinglePicture.this, mylogger);
mp4Composer
.size(mVideoCropView.getWidth(), mVideoCropView.getHeight()) // Dont fake it anymore
.fillMode(FillMode.CUSTOM)
.customFillMode(fillModeCustomItem);
if(composerGlFilter != null){
mp4Composer.filter(composerGlFilter);
}else{
mp4Composer.filter(glFilterGroup);
}
mp4Composer.trim(0, mVideoCropView.getDuration())
.listener(new Mp4Composer.Listener() {
@Override
public void onProgress(double progress) {
Log.d(TAG, "onProgress = " + progress);
new Thread()
{
public void run()
{
CropVIdeo.this.runOnUiThread(new Runnable()
{
public void run()
{
//Do your UI operations like dialog opening or Toast here
Toast.makeText( CropVIdeo.this, "onProgress = " + progress, Toast.LENGTH_SHORT).show();
}
});
}
}.start();
}
@Override
public void onCompleted() {
Log.d(TAG, "onCompleted()");
new Thread()
{
public void run()
{
CropVIdeo.this.runOnUiThread(new Runnable()
{
public void run()
{
//Do your UI operations like dialog opening or Toast here
Toast.makeText( CropVIdeo.this, "codec complete path = " + destPath, Toast.LENGTH_SHORT).show();
}
});
}
}.start();
}
@Override
public void onCanceled() {
Log.d(TAG, "onCanceled");
new Thread()
{
public void run()
{
CropVIdeo.this.runOnUiThread(new Runnable()
{
public void run()
{
//Do your UI operations like dialog opening or Toast here
Toast.makeText( CropVIdeo.this, "videoProcessing onCanceled", Toast.LENGTH_SHORT).show();
}
});
}
}.start();
}
@Override
public void onFailed(Exception exception) {
Log.e(TAG, "onFailed()", exception);
new Thread()
{
public void run()
{
CropVIdeo.this.runOnUiThread(new Runnable()
{
public void run()
{
//Do your UI operations like dialog opening or Toast here
Toast.makeText( CropVIdeo.this, exception.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
}.start();
}
});
mp4Composer.start();
`
The text was updated successfully, but these errors were encountered:
Hi first of all , thank you for your library . Im using your library to let my users crop their video in variables aspect ratio , im using this This CropVideoView as a replacement for your Simplecropview , the crop is not working corretly as it should , what im doing wrong ? Here s my code ` Uri fileUri = Uri.fromFile(new File(FinalSingleNewPath));
String destPath = getVideoFilePath();
`
The text was updated successfully, but these errors were encountered: