riverpod required for statenotifier and transcode/upload progress notifications.You'll see my simple solution to displaying transcoding progress. It became very important, due to the amount of time to transcode, to display a progress meter so the user does not give up on the process. I've provided sample code (not full classes) to give anyone looking to implement my solution a try. For me 720p looks perfect for video playback on a mobile phone and 1080p or higher was big time overkill. So, you'll have to decide if the pros outweighs the cons and if 720p is high enough quality for playback. The second pass with ffmpeg on GCF gains another 77% reduction in size taking a video of 100's of MB's down to just 10-20 MB max for eventually delivery.Large videos will transcode and ffmpegkit does not crash like other flutter packages I've tried.Low bandwidth connections will operate much better after a video is reduced in size by 90%.A two minute video can take up to 60 seconds to transcode.Doubled my app size to use ffmpeg, because I needed access to both lame and x264 so I had to install the full-gpl package to gain access to these libraries.That being said, I used ffmpeg_kit_flutter to build my solution on the client side, rather than the server side, and transcode the video before uploading. In total a 93% reduction in size while keep high quality 720p video.įlutter_ffmpeg is archived, the new ffmpeg flutter package is ffmpeg_kit_flutter.onFinalized GCF ffmpeg transcode: 19MB (77% reduction in size).After client side transcode: 25MB (90% decrease in size before upload).Transcoding results stats for 2 minute video: Flutter camera package ResolutionPreset to high.On the client side, this solution requires setting the camera ResolutionPreset to high (720p), rather than max, which can be a minimum of 1080p, and setting the ffmpeg -preset veryfast rather than the medium default.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |