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:
Alireza Vaezi
2025-08-04 16:21:22 -04:00
parent 551e5dc2e3
commit 1aaac68edd
36 changed files with 1446 additions and 4578 deletions

View File

@@ -97,11 +97,11 @@ python test_system.py
### Dashboard Integration
```javascript
// React component example
const systemStatus = await fetch('http://vision:8000/system/status');
const cameras = await fetch('http://vision:8000/cameras');
const systemStatus = await fetch('http://localhost:8000/system/status');
const cameras = await fetch('http://localhost:8000/cameras');
// WebSocket for real-time updates
const ws = new WebSocket('ws://vision:8000/ws');
const ws = new WebSocket('ws://localhost:8000/ws');
ws.onmessage = (event) => {
const update = JSON.parse(event.data);
// Handle real-time system updates
@@ -111,13 +111,13 @@ ws.onmessage = (event) => {
### Manual Control
```bash
# Start recording manually
curl -X POST http://vision:8000/cameras/camera1/start-recording
curl -X POST http://localhost:8000/cameras/camera1/start-recording
# Stop recording manually
curl -X POST http://vision:8000/cameras/camera1/stop-recording
curl -X POST http://localhost:8000/cameras/camera1/stop-recording
# Get system status
curl http://vision:8000/system/status
curl http://localhost:8000/system/status
```
## 📊 System Capabilities
@@ -151,7 +151,7 @@ curl http://vision:8000/system/status
### Troubleshooting
- **Test Suite**: `python test_system.py`
- **Time Check**: `python check_time.py`
- **API Health**: `curl http://vision:8000/health`
- **API Health**: `curl http://localhost:8000/health`
- **Debug Mode**: `python main.py --log-level DEBUG`
## 🎯 Production Readiness