-
Notifications
You must be signed in to change notification settings - Fork 82
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
Saving story as Draft/Gif/Video #9
Comments
hello @RoyalCoder88, later I will try to give support to video/gif saving, I haven't had much time to continue with this project but I will try as soon as possible. |
Video support would be awesome |
@camilo1498 Any updates on this? RenderRepaintBoundary should not really work for converting as it is just for one frame. How do we combine those different mediums (image + gif + video)? Maybe something like ImageMagick? |
+1 Video support add |
I am currently working on a flutter rendering package (gif, video incl. audio, image) as a side project, so it might take about two months until it is usable. Please feel free to join the contribution, so we can finish sooner. |
@polarby Hi Paul sounds great, good luck I starred you as well ;) let me know if I can help somehow ;) |
@RoyalCoder88 @nhtlquan @camilo1498 I have released the new rendering package. I am not interested in adding this to the story_editor, but if somebody has some time, it sure would be great for others who need this. It should be quite easy to implement this. Use as follows: import 'package:render/render.dart';
final controller = RenderController();
Render(
controller: controller,
child: StoryEditorView(),
),
final result = await controller.captureMotion(Duration(seconds: 4));
final result = await controller.captureImage(format: ImageFormat.png, settings: ImageSettings(pixelRatio: 3),);
|
Hi @polarby thanks for the example. Where should i exactly add this snippet in sotries_editor package? |
Replace the Now you just have to render the story content as image or gif with the controller. (Sorry for bad presentation, I am on mobile) |
Thank you alot for your answer @polarby its working perfectly now, But i have some other issues, which is when i try to add a video and edit it and then try to capture it as motion. It takes me alot of time to save it. Basically it takes the duration of the video. i am using the expecting behavior
I have achieved the first two points but i have no idea how to achieve the last two point. i have no problem with saving the result of images or gifs its working perfectly and also not take too much time to save it because gifs are not very long |
@FaisalMohammadi yes, you have archived everything the package provides you. The The audio should be in sync if there is only one video. If there are more and they start playing at different times during the overall recording, you can set the time offset for audios as well. For each step of rendering (capturing, frame processing & post-processing) the documentation is available in the package docs. For (almost) instant conversion, you are looking for a package that processes the position of layers and its content directly to ffmpeg - meaning it’s not rendering, but rather smartly importing each video/gif into ffmpeg(a mix out of capturing single flutter widgets and importing files at a certain position). Bonus tip:To save on conversion time, start converting while the user is adjusting the post title, or even let it keep running in background (capture from widget) while the user is able to continue on the app. Many apps, such as TikTok choose to have asynchronous loading times after confirming the post (used for example for uploading). |
Thank you alot for your brief introductiona and very quick response i appreciate it. Yes i have now achieved everything what i want and the duration it would take is also understandable i would not need more then 20 second to 1 min duration for my stories, so it would be fine to make the users wait that time. Now i am able to take video, pic and edit it with texts, gifs and so on and get the result back. |
Hi Camilo, can you add please the saving story as Draft/Gif/Video also how to add video in the story?
Thanks in advance!
The text was updated successfully, but these errors were encountered: