flutter_ffplay
flutter_ffplay copied to clipboard
How to play live stream video from the internet?
I have web camera and it is streaming video, but stream can be played only by ffmpeg (because stream in mjpeg format), so how can I play stream on my device? I found something like that but it dosen't work, could you help me, please?
void initState() {
FFmpegKitConfig.registerNewFFmpegPipe().then((pipePath) {
var values = 'ffmpeg -i webcam.mkv -vcodec mjpeg -an $url';
print("=> pipePath: " + pipePath.toString());
FFmpegKit.executeAsync(values, (Session session) async {}, (Log log) {
print(log.getMessage());
}, (Statistics statistics) {
(statistics) async {
Mjpeg(
stream: values,
);
};
});
});
super.initState();
}