feat(video): Implement MP4 format support across frontend and backend
- Updated VideoModal to display web compatibility status for video formats. - Enhanced VideoPlayer to dynamically fetch video MIME types and handle MP4 streaming. - Introduced video file utilities for better handling of video formats and MIME types. - Modified CameraConfig interface to include new video recording settings (format, codec, quality). - Created comprehensive documentation for MP4 format integration and frontend implementation. - Ensured backward compatibility with existing AVI files while promoting MP4 as the preferred format. - Added validation and error handling for video format configurations.
This commit is contained in:
@@ -1,6 +1,38 @@
|
||||
# API Changes Summary: Camera Settings and Filename Handling
|
||||
# API Changes Summary: Camera Settings and Video Format Updates
|
||||
|
||||
## Overview
|
||||
This document tracks major API changes including camera settings enhancements and the MP4 video format update.
|
||||
|
||||
## 🎥 Latest Update: MP4 Video Format (v2.1)
|
||||
**Date**: August 2025
|
||||
|
||||
**Major Changes**:
|
||||
- **Video Format**: Changed from AVI/XVID to MP4/MPEG-4 format
|
||||
- **File Extensions**: New recordings use `.mp4` instead of `.avi`
|
||||
- **File Size**: ~40% reduction in file sizes
|
||||
- **Streaming**: Better web browser compatibility
|
||||
|
||||
**New Configuration Fields**:
|
||||
```json
|
||||
{
|
||||
"video_format": "mp4", // File format: "mp4" or "avi"
|
||||
"video_codec": "mp4v", // Video codec: "mp4v", "XVID", "MJPG"
|
||||
"video_quality": 95 // Quality: 0-100 (higher = better)
|
||||
}
|
||||
```
|
||||
|
||||
**Frontend Impact**:
|
||||
- ✅ Better streaming performance and browser support
|
||||
- ✅ Smaller file sizes for faster transfers
|
||||
- ✅ Universal HTML5 video player compatibility
|
||||
- ✅ Backward compatible with existing AVI files
|
||||
|
||||
**Documentation**: See [MP4 Format Update Guide](MP4_FORMAT_UPDATE.md)
|
||||
|
||||
---
|
||||
|
||||
## Previous Changes: Camera Settings and Filename Handling
|
||||
|
||||
Enhanced the `POST /cameras/{camera_name}/start-recording` API endpoint to accept optional camera settings (shutter speed/exposure, gain, and fps) and ensure all filenames have datetime prefixes.
|
||||
|
||||
## Changes Made
|
||||
@@ -44,7 +76,7 @@ Enhanced the `POST /cameras/{camera_name}/start-recording` API endpoint to accep
|
||||
|
||||
### Basic Recording (unchanged)
|
||||
```http
|
||||
POST http://vision:8000/cameras/camera1/start-recording
|
||||
POST http://localhost:8000/cameras/camera1/start-recording
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
@@ -56,7 +88,7 @@ Content-Type: application/json
|
||||
|
||||
### Recording with Camera Settings
|
||||
```http
|
||||
POST http://vision:8000/cameras/camera1/start-recording
|
||||
POST http://localhost:8000/cameras/camera1/start-recording
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
@@ -73,7 +105,7 @@ Content-Type: application/json
|
||||
|
||||
### Maximum FPS Recording
|
||||
```http
|
||||
POST http://vision:8000/cameras/camera1/start-recording
|
||||
POST http://localhost:8000/cameras/camera1/start-recording
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
@@ -91,7 +123,7 @@ Content-Type: application/json
|
||||
|
||||
### Settings Only (no filename)
|
||||
```http
|
||||
POST http://vision:8000/cameras/camera1/start-recording
|
||||
POST http://localhost:8000/cameras/camera1/start-recording
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user