anharu2394 / tapioca

a Flutter plugin for video editing on Android and iOS.
https://pub.dev/packages/tapioca
MIT License
123 stars 54 forks source link

Code stucks at cup.suckUp methord ??? #79

Open AmarchandK opened 1 year ago

AmarchandK commented 1 year ago

try { final String path = await _getTempPath(); log('applyFiltersToVideo Filter Index ${state.filterIndex}'); Cup cup = Cup( Content(state.videoFile!.path), tapiocaBalls[state.filterIndex]); log('cup created'); await cup.suckUp(path).then((value) => log('suckUp value: $value'));/////// stucks here ///// log('return value'); return path; } catch (e) { log("error on filter applying ==================$e"); } }

randabt commented 1 year ago

same problem for me, I hope someone has an answer

MusabBoltX commented 9 months ago

I was hanged up on this issue too for past 3 days. The basic issue is from video codecs and the only temporary fix I got is to decrease the bitrate of recorded video and it started to work. 👍

tiltmaster commented 9 months ago

I was hanged up on this issue too for past 3 days. The basic issue is from video codecs and the only temporary fix I got is to decrease the bitrate of recorded video and it started to work. 👍

Bro I have been facing this for a while now, can you please tell me what exactly have you used/done to decrease the bitrate of the recorded video?

MusabBoltX commented 9 months ago

I was hanged up on this issue too for past 3 days. The basic issue is from video codecs and the only temporary fix I got is to decrease the bitrate of recorded video and it started to work. 👍

Bro I have been facing this for a while now, can you please tell me what exactly have you used/done to decrease the bitrate of the recorded video?

So, I used camera plugin to record videos. It ResolutionPreset was set to max I just downgraded it to keep things working. That's why I mentioned it's a temporary fix but, it works.

NachoL24 commented 9 months ago

I was hanged up on this issue too for past 3 days. The basic issue is from video codecs and the only temporary fix I got is to decrease the bitrate of recorded video and it started to work. 👍

Bro I have been facing this for a while now, can you please tell me what exactly have you used/done to decrease the bitrate of the recorded video?

So, I used camera plugin to record videos. It ResolutionPreset was set to max I just downgraded it to keep things working. That's why I mentioned it's a temporary fix but, it works.

Hey i have the same problem, i'm trying to build an app with camera plugin to record videos and then i want to add an overlay text to the video. Can we talk of how did you do that?

MusabBoltX commented 9 months ago

I was hanged up on this issue too for past 3 days. The basic issue is from video codecs and the only temporary fix I got is to decrease the bitrate of recorded video and it started to work. 👍

Bro I have been facing this for a while now, can you please tell me what exactly have you used/done to decrease the bitrate of the recorded video?

So, I used camera plugin to record videos. It ResolutionPreset was set to max I just downgraded it to keep things working. That's why I mentioned it's a temporary fix but, it works.

Hey i have the same problem, i'm trying to build an app with camera plugin to record videos and then i want to add an overlay text to the video. Can we talk of how did you do that?

No worries, share me the issue you are facing.

NachoL24 commented 8 months ago

I was hanged up on this issue too for past 3 days. The basic issue is from video codecs and the only temporary fix I got is to decrease the bitrate of recorded video and it started to work. 👍

Bro I have been facing this for a while now, can you please tell me what exactly have you used/done to decrease the bitrate of the recorded video?

So, I used camera plugin to record videos. It ResolutionPreset was set to max I just downgraded it to keep things working. That's why I mentioned it's a temporary fix but, it works.

Hey i have the same problem, i'm trying to build an app with camera plugin to record videos and then i want to add an overlay text to the video. Can we talk of how did you do that?

No worries, share me the issue you are facing.

Can you pass me an email so we can talk?

MusabBoltX commented 8 months ago

I was hanged up on this issue too for past 3 days. The basic issue is from video codecs and the only temporary fix I got is to decrease the bitrate of recorded video and it started to work. 👍

Bro I have been facing this for a while now, can you please tell me what exactly have you used/done to decrease the bitrate of the recorded video?

So, I used camera plugin to record videos. It ResolutionPreset was set to max I just downgraded it to keep things working. That's why I mentioned it's a temporary fix but, it works.

Hey i have the same problem, i'm trying to build an app with camera plugin to record videos and then i want to add an overlay text to the video. Can we talk of how did you do that?

No worries, share me the issue you are facing.

Can you pass me an email so we can talk?

You can connect me via my LinkedIn: https://www.linkedin.com/in/syed-musab/

eokdev commented 4 months ago

@MusabBoltX it didnt work for me even after downgrading. Any fix? Mine is also stucked at cup.suckUp method

sobuur0 commented 4 months ago

Adding it here also that my code also gets stuck at the cup.suckUp method. my video assets are bundled into my flutter app in the pubspec.yaml file.

my current implementation: _videoControllers = await Future.wait(_videoPaths.map((path) async { try { final tapiocaBalls = [ TapiocaBall.textOverlay( "Your Text", 100, 10, 100, Colors.white), ]; final cup = Cup(Content(path), tapiocaBalls); videoPlayerController = VideoPlayerController.asset(path); log('assigned $videoPlayerController'); try { log('Cup suck up started'); /////This here is printed to my logs await cup.suckUp(path); log('Cup suck up successful'); /////i am not gettin this in my logs } catch (e) { log('Error: $e'); } // Initialize the video player controller // videoPlayerController = VideoPlayerController.asset(path); videoPlayerController!.initialize().then((_) { setState(() {}); videoPlayerController!.setVolume(0); videoPlayerController!.play(); videoPlayerController!.setLooping(true); }); } on PlatformException { print("error!!!!"); } return videoPlayerController!; }).toList()); cc: @anharu2394 @MusabBoltX

MusabBoltX commented 4 months ago

@MusabBoltX it didnt work for me even after downgrading. Any fix? Mine is also stucked at cup.suckUp method

Can you explain how did you record the video and if using camera plugin please attach video controller properties?

MusabBoltX commented 4 months ago

Adding it here also that my code also gets stuck at the cup.suckUp method. my video assets are bundled into my flutter app in the pubspec.yaml file.

my current implementation: _videoControllers = await Future.wait(_videoPaths.map((path) async { try { final tapiocaBalls = [ TapiocaBall.textOverlay( "Your Text", 100, 10, 100, Colors.white), ]; final cup = Cup(Content(path), tapiocaBalls); videoPlayerController = VideoPlayerController.asset(path); log('assigned $videoPlayerController'); try { log('Cup suck up started'); /////This here is printed to my logs await cup.suckUp(path); log('Cup suck up successful'); /////i am not gettin this in my logs } catch (e) { log('Error: $e'); } // Initialize the video player controller // videoPlayerController = VideoPlayerController.asset(path); videoPlayerController!.initialize().then((_) { setState(() {}); videoPlayerController!.setVolume(0); videoPlayerController!.play(); videoPlayerController!.setLooping(true); }); } on PlatformException { print("error!!!!"); } return videoPlayerController!; }).toList()); cc: @anharu2394 @MusabBoltX

Looks like your video format is not supported. Do try lower quality mp4 videos, there will be a certain threshold upto where the certain video quality will work.

eokdev commented 4 months ago

I got mine to work by doing this in my pubspec.yaml.

tapioca: git: url: https://github.com/anharu2394/tapioca.git ref: tags/1.0.6

Hope this helps