How to convert image to 3/sec video as mp4 in flutter - flutter

How to convert image to 3/sec as mp4 file video in flutter.
my question looks so simple , but i spent many days searching , cannot find way

Your question looks really simple, but it isn't. A video file can be much more complicated than a simple Image. Flutter on its own can't do this. You would need to use an external encoder that creates the h264 video from your pixeldata.
I couldn't find a dart package that can do this so you would probably need to write some platform specific code using platform channels or wrap a library using dart FFI. Keep in mind that encoding a video file requires a lot of performance or a hardware encoder that differs on each platform. Since you didn't provide any information about your target platform or specific usecase there isn't much more I can help with.
The best approach is probably to look into FFMPEG and its CLI and look there for an encoder.

Related

Using flutter how to merge audio file with sync of any video like camera action like that there is any specific package is available in flutter

I have been searching for the packages or any method for the particular problem, i googled but i didn't find any solution ,
So my issue is , i want functionality like ticktock App , user can select any music audio and they can play according to that user can do action, with sync of both audio and video i want output file as video. how can i achieve this , is there any method or any packages are avalibale in flutter .
i have done selecting audio and video recording feature but i ma stuck with the merging both , if FFmpeg package we can use means , how to use that packages .. please explain me guys.
In FFmpeg You can do it by playing the audio, recording video and then merging two files like
final FlutterFFmpeg _ffMpeg = FlutterFFmpeg();
_ffMpeg.execute("-i video.mp4 -i audio.mp4 -c copy output.mp4")
.then((return_code) => print("Return code $return_code"));
With FFmpeg You need to find the command that suits You the best.
But...
Personally I think FFmpeg isn't a good choice:
It is heavy
You can't use it in commercial projects (I might be wrong, please correct me if I am)
What I suggest
You can record video and have audio file and video with Flutter. Then use platform specific code.
Even if you don't have experience in specific language I found those two libraries that could help:
iOS: https://github.com/dev-labs-bg/swift-video-generator
(does exactly what You need).
Android: https://github.com/israel-fl/bitmap2video
(I'm not sure if works with videos, but it accepts bitmaps)

How to fetch mp3 metadata in dart/flutter?

I am making a music player app. It is able to read the files but I am not sure how to extract the metadata. I want to be able to fetch the song length and the album image mainly. Though the album image might be a problem I am also happy with other data like the song duration and album name and other stuff.
I would be really helpful if someone could provide me a way. I referred to id3 package but there isnt much written as to how to handle the output. A proper code example would be really helpful. I am a complete beginner in dart.
THANKS WORLD.
Similar question Local Audio files metadata in flutter.
Right now you can use flute_music_player package for achieving the said task but it is only available in Android as of now. So my best guess will be for you to write Platform channel for iOS
You can try this package and check if it still works. It's not updated recently media_metadata_plugin

Video streaming solutions

I am attempting to stream a video, in a format unity3d can access, like an mjpg. I have gone through several possible solutions, including gstreamer(only does client side as far as I could tell by the examples), yawcam(I couldn't find a way to access the image directly), and silverlight(due to simply not being able to find how the heck webcam streaming was doable) I am currently just looking for any more methods of getting video over from one side to the other. Could I possibly simply read the images into a byte array and send it over a socket? Maybe I missed something in the previous three possible solutions?
If you are looking to stream video from a server than you can use Ogg encoding + WWW.movie to map it to a texture. Assuming you have a Pro license, as I think this is a Pro only feature. If this is a local file, either bundled with the app or in external folder, we use the brilliant AVPro Windows Media or AVPro QuickTime. MJPEG does offers super smooth scrubbing with AVPro but generates enormous files. Definitely not ideal for streaming or even download!
Finally RenderHead also has a Live Camera capture plugin that could meet your needs.

Where to start for making a program to convert MP3 files to iphone audiobook (M4B) format?

I'm new to programming and want to find something that I can work on to help learn more about it. I want to do this is C++ if possible. What i want to do is start working on developing a program that has a user interface and will convert an mp3 into an m4b (the format iphone uses for audiobooks. I have been looking for some source code examples but have had no luck. If anyone can give me some places to start that would be great. Thanks
This is really trivial with the Audio Converter Services that are part of Core Audio.
I know it is not cool to just post a book reference but I really highly recommend Learning Core Audio: A Hands-on Guide to Audio Programming for Mac and iOS if you want to do Core Audio stuff.
Chapter 6 is all about audio conversion from one format to another.
M4B simply is a MP4 file (AAC encoded) with the extension M4B. So it basically is an MP4 file with a renamed file extension.
Perhaps consider using an encoding library such as ffmpeg.

Create video in iPhone

I need to convert image sequences(ie,png) to video file in iPhone. How i can convert the images to video.
Regards,
Just ignore bad advice like "use ffmpeg". That would work on the desktop, but the license issue makes including ffmpeg source code in your iPhone app legally questionable. Apple provides a class named AVAssetWriter that you would use in your app to encode a series of images as h.264 stored in a .m4v quicktime container file. While the apple provided logic does work, it is not so easy to actually use and you will need to read quite a lot of documentation to get the code working. If you want to skip implementing it yourself (and likely save yourself 3 or 4 days of work), please consider using my AVAnimator library for iOS as the h.264 encoding logic is already implemented in the class AVAssetWriterConvertFromMaxvid. Once encoded as h.264, the video can be played with the standard player and it is small enough to upload to a remote server.
You are likely going to need something like FFMPEG