# MULTEXPK Professional Screen Recorder

A comprehensive, professional-grade screen recording tool with webcam overlay, audio mixing, and server-side processing capabilities. Built with modern web technologies and branded for MULTEXPK LTD.

## 🚀 Features

### Core Recording Capabilities
- **Full Screen Recording**: Capture entire desktop, specific windows, or browser tabs
- **Webcam Overlay**: Professional picture-in-picture webcam integration
- **Audio Mixing**: Automatic mixing of system audio and microphone input
- **Real-time Composition**: Live canvas-based video composition with watermark

### Professional Branding
- **MULTEXPK Watermark**: Permanent branded watermark on all recordings
- **Corporate Design**: Professional UI using MULTEXPK brand colors and styling
- **Responsive Layout**: Mobile-friendly design that works across devices

### Export & Upload Options
- **MP4 Conversion**: Server-side WebM to MP4 conversion using FFmpeg
- **FTP Upload**: Direct upload to FTP servers with credential management
- **Google Drive Integration**: Placeholder for Google Drive upload functionality
- **Download Options**: Direct download with automatic file naming

### Advanced Features
- **Enhanced Error Handling**: Comprehensive error messages and recovery
- **Real-time Logging**: Detailed system log with timestamps
- **Device Management**: Automatic detection and selection of cameras/microphones
- **Recording Controls**: Start, stop, pause, and resume functionality
- **Timer Display**: Real-time recording duration display

## 📁 Project Structure

```
multexpk-screen-recorder/
├── improved_recorder.html          # Main application file
├── improved_recorder.php           # PHP version (same content)
├── upload_and_ftp.php             # FTP upload handler
├── upload_and_convert.php         # MP4 conversion handler
├── README.md                      # This documentation
├── analysis.md                    # Code analysis notes
├── brand_analysis.md              # MULTEXPK brand guidelines
└── todo.md                        # Project completion checklist
```

## 🛠 Installation & Setup

### Prerequisites
- Web server (Apache, Nginx, or Python HTTP server)
- PHP 7.4+ (for server-side features)
- FFmpeg (for video conversion)
- Modern web browser (Chrome, Firefox, Edge)

### Basic Setup
1. Clone or download the project files
2. Place files in your web server directory
3. Ensure PHP has write permissions for temporary directories
4. Install FFmpeg on your server:
   ```bash
   # Ubuntu/Debian
   sudo apt update && sudo apt install ffmpeg
   
   # CentOS/RHEL
   sudo yum install ffmpeg
   
   # macOS
   brew install ffmpeg
   ```

### Server Configuration
1. Enable CORS in your web server configuration
2. Set appropriate upload limits in PHP:
   ```ini
   upload_max_filesize = 500M
   post_max_size = 500M
   max_execution_time = 300
   memory_limit = 512M
   ```

## 🎯 Usage Instructions

### Starting a Recording
1. Open `improved_recorder.html` in a modern web browser
2. Grant permissions for screen, camera, and microphone when prompted
3. Select your preferred screen source (Entire Screen recommended)
4. Choose your camera and microphone from the dropdown menus
5. Click "🔴 Start Recording" to begin

### Important: Full Screen Capture
When the browser shows the screen sharing dialog:
- **Select "Entire screen"** for complete desktop recording
- This captures all applications, browser tabs, and desktop content
- Window or tab selection will limit the recording scope

### Recording Controls
- **Start**: Begin recording with all selected sources
- **Stop**: End recording and process the video
- **Pause/Resume**: Temporarily pause and resume recording
- **Timer**: Shows real-time recording duration

### Export Options
- **Download MP4**: Converts and downloads as MP4 file
- **FTP Upload**: Upload directly to FTP server
- **Google Drive**: Upload to Google Drive (placeholder)
- **Clear**: Remove recorded data and reset

## 🔧 Technical Details

### Browser Compatibility
- **Chrome/Chromium**: Full support (recommended)
- **Firefox**: Full support
- **Edge**: Full support
- **Safari**: Limited support (some features may not work)

### Video Specifications
- **Input Format**: WebM (VP8/VP9 with Opus audio)
- **Output Format**: MP4 (H.264 with AAC audio)
- **Resolution**: Matches screen resolution (up to 4K)
- **Frame Rate**: 30 FPS
- **Audio**: 48kHz stereo with mixing

### Watermark Details
- **Position**: Top-left corner
- **Text**: "MULTEXPK LTD ™ ® - SCREEN RECORDER"
- **Style**: Gradient background with MULTEXPK brand colors
- **Permanent**: Cannot be removed from recordings

## 🎨 Customization

### Brand Colors (CSS Variables)
```css
:root {
  --primary-blue: #1e1b4b;      /* MULTEXPK primary */
  --accent-green: #22c55e;      /* MULTEXPK accent */
  --secondary-teal: #14b8a6;    /* MULTEXPK teal */
  --secondary-orange: #f97316;  /* Warning/action color */
  --secondary-purple: #8b5cf6;  /* Additional accent */
}
```

### Watermark Customization
Edit the `drawWatermark()` function in the JavaScript:
```javascript
const watermarkText = 'YOUR COMPANY NAME - SCREEN RECORDER';
```

### UI Customization
- Modify CSS variables for colors
- Update header branding and links
- Customize button styles and layouts
- Add additional upload providers

## 🔒 Security Considerations

### Client-Side Security
- All media processing happens in the browser
- No data is stored permanently on the client
- Streams are cleaned up after recording

### Server-Side Security
- Validate all uploaded files
- Implement file size limits
- Use secure FTP connections when possible
- Sanitize FTP credentials
- Implement rate limiting for uploads

### Privacy
- No data is transmitted without user action
- FTP credentials are not stored
- Temporary files are cleaned up after processing

## 🐛 Troubleshooting

### Common Issues

**"No camera/microphone detected"**
- Grant browser permissions for media devices
- Check device connections and drivers
- Try refreshing the page

**"Screen capture permission denied"**
- Click "Allow" in the browser permission dialog
- Check browser settings for site permissions
- Try using Chrome or Firefox

**"Conversion failed"**
- Ensure FFmpeg is installed on the server
- Check server logs for detailed error messages
- Verify PHP has sufficient memory and execution time

**"FTP upload failed"**
- Verify FTP credentials and server accessibility
- Check firewall settings for FTP ports
- Ensure passive mode is supported

### Browser Console Debugging
Open browser developer tools (F12) and check the console for detailed error messages. The application provides comprehensive logging.

## 📈 Performance Optimization

### Client-Side
- Recording quality affects file size and performance
- Close unnecessary applications during recording
- Use wired internet connection for uploads
- Ensure sufficient RAM (4GB+ recommended)

### Server-Side
- Use SSD storage for temporary file processing
- Allocate sufficient CPU for FFmpeg conversion
- Implement caching for frequently accessed files
- Monitor disk space for temporary files

## 🔄 Updates & Maintenance

### Regular Maintenance
- Clean up temporary files in `/tmp/multexpk_*` directories
- Monitor server logs for errors
- Update FFmpeg for security patches
- Test browser compatibility with updates

### Feature Additions
The codebase is designed for extensibility:
- Add new upload providers in the upload section
- Implement additional video formats
- Add recording quality options
- Integrate with cloud storage APIs

## 📞 Support & Contact

**MULTEXPK LTD**
- Website: [https://multexpk.com](https://multexpk.com)
- Professional IT Services & Digital Transformation
- Screen Recording Solution v2.0

For technical support or customization requests, visit the MULTEXPK website or contact their development team.

## 📄 License

© 2024 MULTEXPK LTD ™ ® - All rights reserved.

This software is proprietary to MULTEXPK LTD. Unauthorized copying, modification, or distribution is prohibited.

---

**Built with modern web technologies for professional screen recording needs.**

