Media Widgets¶
Media widgets in Fluvie allow you to embed external videos and create photo collages within your video compositions.
Overview¶
| Widget | Description | Use Case |
|---|---|---|
| EmbeddedVideo | Display video files in composition | Video clips, highlights |
| VideoSequence | Low-level video sequence | Custom video integration |
| Collage | Arrange photos in layouts | Photo grids, galleries |
Quick Examples¶
Embedded Video¶
EmbeddedVideo(
assetPath: 'assets/highlight.mp4',
width: 900,
height: 500,
startFrame: 40,
trimStart: Duration(seconds: 2),
fit: BoxFit.cover,
includeAudio: true,
)
Photo Collage¶
Collage.grid2x2(
spacing: 8,
children: [
Image.asset('photo1.jpg'),
Image.asset('photo2.jpg'),
Image.asset('photo3.jpg'),
Image.asset('photo4.jpg'),
],
)
Video Integration¶
Fluvie handles video embedding through frame extraction:
- Video frames are extracted using FFmpeg
- Frames are cached for smooth playback
- Audio can be included in the final render
- Timing is synchronized with the composition timeline
Supported Formats¶
FFmpeg handles video decoding, so most formats are supported: - MP4, MOV, AVI, MKV, WebM - H.264, H.265, VP8, VP9
Image Handling¶
Standard Flutter image widgets work in Fluvie:
// From assets
Image.asset('assets/photo.jpg', fit: BoxFit.cover)
// From network (cached)
Image.network('https://example.com/photo.jpg')
// From file
Image.file(File('/path/to/photo.jpg'))
For animated image effects, use helper widgets like: - KenBurnsImage - Pan and zoom effect - PhotoCard - Styled photo frame - PolaroidFrame - Polaroid-style frame
Related¶
- Embedding Videos - Detailed video guide
- Embedding Images - Image embedding guide
- Helper Widgets - Photo helpers