How to implement Tiktok like video streaming and video scrolling in Flutter - flutter

I am trying to replicate the TikTok app UI with Flutter. Can anyone suggest to me how to replicate the video streaming/scrolling feature of the TikTok app in fluter? Till now I manage to Stream videos by embedding in PageView.builder() library. I am facing some problems for:
Streaming videos like Tiktok.
Videos are not loading properly.
Scrolling like TikTok App
Camera filters
Here is what I have done till now :
https://drive.google.com/file/d/1EA1eykmlwJeJr6B-WFsuV87Yp-vgihPC/view?usp=sharing

i am working on a similar system in my flutter app.
Basically I used video_player plugin with caching feature, You can get it this way. Put this in your Puspec.yaml.
video_player:
git:
url: https://github.com/999eagle/plugins.git
ref: feature/caching
path: packages/video_player
Then use PageBuilder and make a system to load and unload videos from memory while scrolling.

Related

How do we integrate flutter with mux data?

I am trying to create a video streaming app in Flutter, using Mux. I also want to track user data to help recommend more specific videos per user. However, I do not know how exactly to integrate mux/data with the video_player plugin in flutter. Have I misunderstood how exactly these plugins/services work? I am using flutter for my frontend and python for the backend.
Links:
video_player: https://pub.dev/packages/video_player
mux/data: https://docs.mux.com/guides/data/track-your-video-performance
You could use this player instead which is functional: https://pub.dev/packages/mux_player
However, I'm struggling to make it autoplay and not go fullscreen when you play it as it feels kind of weird. It does track all data as you would expect.

Block video recording during execution of flutter app

I have a flutter application which uses youtube_player_flutter: ^7.0.0+7 to play YouTube videos. This is an educational app and I don't want anyone to record my video lectures through any screen recorder. Is there anything I can do to block users recording my videos? Any kind of help is much appreciated. Thank you!
You have to add the FLAG_SECURE which will prevent the screenshot and video recording.
await FlutterWindowManager.addFlags(FlutterWindowManager.FLAG_SECURE);
This an example of how to disable Screenshot and Video Capture and also see this video.
Also, if you face a problem and if it is not working in the current version, I will recommend you to read the discussion on GitHub about the FLAG_SECURE don't work on Flutter application

Is there any way we could add video filters in flutter?

Can we create a video streaming app in flutter.I am trying to make a video streaming app but can find filters in flutter.
As far as I know, there is what we call Deep AR that could provide filter for your video just like in Snapchat:
DeepAR is a web platform that provides an SDK for Snapchat kind of 3D
face filters, face lenses, and effects for any iOS, Android, Unity, or
HTML5 app. The platform makes use of a technology called Augmented
Reality (AR).
So you need to setup an account here. For a more detailed process on adding filter in your video, you can visit this blog.
For creating livestream alone, check this out: Live Streaming With Mux, Stream, and Flutter

Adaptive HLS Streaming - Flutter video_player

I am developing a new native App. I have chosen Flutter for it (over React Native). In this app, there will be a section for video streaming. These videos will have HLS streaming.
I am using video_player package in Flutter for it. I am able to play the video successfully but there is no option to change the quality (1080p, 720p etc.). How can I implement video quality selection in video_player package? Also, does video_player have adaptive bitrate streaming for HLS?
You can use stack widget adding there video player and button. After pressing button you change url of video from 1080 p to 720 p.
There's a package which you can use to change the quality from 1080p to 720p, here's the package's link: yoyo_player
For those that might come here looking for a solution. It is a pretty trivial solution using the default video_player or even yoyo player. In front of the url, just add the file format type that you desire. For example for HLS just add ".m3u8" and for dash add ".mpd" and the video will work and still be adaptive.
So your full url should be something like this:
For HLS
https://itvnnowoptimised-sano1.streaming.media.azure.net/3c0ecaef-002f-461f-854a-2397449d351f/thestoryofjoseph.ism/manifest(format=m3u8-aapl).m3u8
For dash
https://itvnnowoptimised-sano1.streaming.media.azure.net/3c0ecaef-002f-461f-854a-2397449d351f/thestoryofjoseph.ism/manifest(format=mpd-time-cmaf).mpd
This was using azure Media Services.

Flutter chewie slow with large videos

now I'm making a videos app using flutter and chewie
all my videos get from Server through API based on Laravel. but all videos has large size for example 500MB, 600MB, or 700MB. the problem is when play the video it playing very slowly. although internet speed in fine.
How i can solve this issue ?