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

video_processing_failed #68

Open
UjjawalPanchal opened this issue May 31, 2022 · 8 comments
Open

video_processing_failed #68

UjjawalPanchal opened this issue May 31, 2022 · 8 comments

Comments

@UjjawalPanchal
Copy link

Unhandled Exception: PlatformException(video_processing_failed, video processing is failed., null, null)

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(video_processing_failed, video processing is failed., null, null)
StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18)

VideoEditor.writeVideofile (package:tapioca/src/video_editor.dart:14:5)

Getting this error after selection of file and send "Cup" for Video editing.

try {
var tempDir = await getTemporaryDirectory();
final path = '${tempDir.path}/result2.mp4';
final tapiocaBalls = [
TapiocaBall.filter(Filters.pink),
//TapiocaBall.imageOverlay(imageBitmap, 300, 300),
TapiocaBall.textOverlay("text", 100, 10, 100, const Color(0xffffc0cb)),
];
final cup = Cup(Content(video.path), tapiocaBalls);
cup.suckUp(path).then((
) async {
print("finished");
print(path);
GallerySaver.saveVideo(path).then((bool? success) {
print(success.toString());
});

    setState(() {});
  });
} on Exception {
  print("error!!!!");
}
@UjjawalPanchal
Copy link
Author

I need help on this issue...
can anyone help on the same

Thanks.

@nur001
Copy link

nur001 commented Jun 27, 2022

I also encountered the same problem. How did you solve it

@anharu2394
Copy link
Owner

@UjjawalPanchal @nur001 on iOS or Android?

@UjjawalPanchal
Copy link
Author

I have tried it on Android.

@amrhassann
Copy link

i had the same problem but when i run the app on my real device it works good

@AmarchandK
Copy link

not working in emulator
work only in physical device

@MusabBoltX
Copy link

MusabBoltX commented Jan 8, 2024

Even I am still facing this issue on Android real device

@AakashKedari
Copy link

I am trying to apply tapioca filter to a video which was created using ffmpeg package in flutter. but it giving me the same above error. But when I try to apply regular camera generated videos, it works fine. Why? I am giving below the command I used to generate ffmpeg video :
String command = "-hide_banner -y " +
customImagePaths +
"-filter_complex " +
""[0:v]setpts=PTS-STARTPTS,scale=w='if(gte(iw/ih,640/427),min(iw,640),-1)':h='if(gte(iw/ih,640/427),-1,min(ih,427))',scale=trunc(iw/2)*2:trunc(ih/2)*2,setsar=sar=1/1,split=2[stream1out1][stream1out2];" +
"[1:v]setpts=PTS-STARTPTS,scale=w='if(gte(iw/ih,640/427),min(iw,640),-1)':h='if(gte(iw/ih,640/427),-1,min(ih,427))',scale=trunc(iw/2)*2:trunc(ih/2)*2,setsar=sar=1/1,split=2[stream2out1][stream2out2];" +
"[stream1out1]pad=width=640:height=427:x=(640-iw)/2:y=(427-ih)/2:color=#00000000,trim=duration=3,select=lte(n\,90)[stream1overlaid];" +
"[stream1out2]pad=width=640:height=427:x=(640-iw)/2:y=(427-ih)/2:color=#00000000,trim=duration=1,select=lte(n\,30)[stream1ending];" +
"[stream2out1]pad=width=640:height=427:x=(640-iw)/2:y=(427-ih)/2:color=#00000000,trim=duration=2,select=lte(n\,60)[stream2overlaid];" +
"[stream2out2]pad=width=640:height=427:x=(640-iw)/2:y=(427-ih)/2:color=#00000000,trim=duration=1,select=lte(n\,30),split=2[stream2starting][stream2ending];" +
"[stream2starting][stream1ending]blend=all_expr='if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)':shortest=1[stream2blended];" +
"[stream3starting][stream2ending]blend=all_expr='if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)':shortest=1[stream3blended];" +
"[stream1overlaid][stream2blended][stream2overlaid]concat=n=3:v=1:a=0,scale=w=640:h=424,format=" +
"yuv420p" +
"[video]"" +
" -map [video] -fps_mode cfr " +
"" +
"-c:v " +
"mpeg4" +
" -r 30 " +
output_path;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants