I am using flutter video_player plugin for camera video streaming. Camera streaming is from ESP32Cam hardware.
ESP32Cam is streaming video on network using http protocol and in mjpeg format
Verified in VLC media player, Codec information are as below:
Codec: Motion JPEG Video (MJPG)
Decoded format: Planar 4:2:2 YUV full scale
What are the configuration required in video_player plugin to stream the video?
Here is my flutter code for streaming initialization:
late VideoPlayerController _controller;
_controller = VideoPlayerController.network(
//'https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_20mb.mp4'
"http://192.168.216.40",
// formatHint: VideoFormat.hls,
)
..initialize().then((_) {
print("Streaming initialized...");
// Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.
});
Then I am using widget in my Container widget
Container(
child: VideoPlayer(_controller),
),
ESP32Cam setup for reference link