What is STR Video?
STR files are mixed-mode video streams that:- Contain MDEC-compressed video frames
- Interleave XA audio for synchronized sound
- Use alternating Mode 2 Form 1 (video) and Form 2 (audio) sectors
- Stream directly from CD during playback
- Support various resolutions and frame rates
STR File Structure
STR files contain interleaved sectors:- Mode 2 Form 1 sectors: MDEC video data + error correction
- Mode 2 Form 2 sectors: XA ADPCM audio data
- Subheaders: Define each sector’s type and parameters
Adding STR Video to Your ISO
Prepare STR Video Files
Ensure your STR files are properly formatted:
- Files must be in raw 2336-byte sector format
- Must contain valid MDEC video frames
- Must have proper sector subheaders
- Audio and video must be correctly interleaved
Add STR Files to XML
Define STR files with
type="mixed" in your directory tree:You can use
type="str" as an alias for type="mixed". All three types (mixed, str, xa) are functionally identical and just tell mkpsxiso to handle the file as mixed-mode.STR Sector Details
Mixed Mode Encoding
mkpsxiso automatically handles mixed-mode encoding:- Reads each sector’s subheader
- Detects Form 1 (video) vs Form 2 (audio)
- Applies appropriate encoding:
- Form 1: Adds error detection (EDC) and error correction (ECC)
- Form 2: Adds only EDC, no ECC
Subheader Information
Each sector’s subheader contains:- File Number: Stream identifier
- Channel Number: For multi-stream files
- Submode Byte: Form 1 or Form 2 flag
- Coding Info: Audio parameters (for audio sectors)
Data Sector Detection
mkpsxiso uses improved logic to identify:- Mode 2 Form 1 sectors (video data)
- Mode 2 Form 2 sectors (audio data)
- Proper interleaving patterns
Creating STR Files
From Video Sources
Convert standard video formats to STR:From PlayStation SDK
Use official SDK tools:Extracting from Games
Extract STR files from existing games:- Format references
- Templates for your own videos
- Test cases for playback code
Common STR Patterns
Opening Cinematic
Level Transitions
Multiple Endings
Audio in STR Files
Synchronized Audio
STR audio is interleaved with video:Audio Parameters
XA audio in STR files typically uses:- Sample Rate: 37800 Hz
- Channels: Stereo
- Compression: ADPCM Level C
- Bits: 4-bit ADPCM
Silent Video
STR files can contain video-only (no audio):- Only Mode 2 Form 1 sectors
- No audio sectors interleaved
- Simpler structure, slightly higher video data rate
Video Parameters
Resolution
Common PlayStation STR resolutions:- 320x240: Standard quality, lower data rate
- 320x224: NTSC-friendly resolution
- 384x240: Higher quality, more data
- 640x240: High quality, requires careful optimization
Frame Rate
Typical frame rates:- 15 fps: Standard for PlayStation FMV
- 20 fps: Smoother motion
- 30 fps: High quality, requires more disc space
Color Depth
MDEC video uses:- 15-bit color (5-5-5 RGB)
- 24-bit color (8-8-8 RGB) with quantization
EDC and ECC Handling
Form 1 Sectors (Video)
Video sectors receive full error protection:- EDC: Error Detection Code
- ECC: Error Correction Code
Form 2 Sectors (Audio)
Audio sectors receive only EDC:The
xa_edc attribute controls EDC generation for all Form 2 sectors, including those in STR files.Troubleshooting
Video Playback Issues
If video doesn’t play correctly:- Verify sector format: Ensure file is in 2336-byte sector format
- Check subheaders: Validate Form 1/Form 2 flags are correct
- Test source file: Try playing in jPSXdec or other STR player
- Examine interleaving: Confirm audio/video sectors alternate properly
Audio Desynchronization
If audio drifts out of sync:- Check frame rate matches expected value
- Verify audio sample rate is correct
- Ensure no sectors are missing or corrupted
- Test on actual hardware (emulators may behave differently)
Stuttering or Dropped Frames
If playback stutters:- Optimize file placement: Move STR closer to related content
- Reduce data rate: Use lower resolution or frame rate
- Check disc layout: Ensure no excessive seeking required
- Test on hardware: CD drive speed affects streaming performance
Incorrect Sector Detection
If mkpsxiso reports sector errors:- Files may have been incorrectly extracted
- Sector headers might be malformed
- File might not be genuine STR format
Performance Optimization
Bitrate Considerations
PlayStation CD streaming limits:- Maximum: ~300 KB/s (2x speed)
- Safe rate: ~150 KB/s (1x speed)
- Conservative: ~100 KB/s (with seek overhead)
File Size Management
Strategic Placement
Best Practices
Quality Guidelines
- Use 320x240 at 15 fps for standard cutscenes
- Reserve higher quality for important cinematics
- Test on real hardware to verify streaming performance
- Include audio sync markers for long videos
File Organization
Compression Balance
Find the right balance:- Too much compression: Visual artifacts, blocky video
- Too little compression: Files too large, streaming issues
- Optimal: Just enough compression to maintain quality at target bitrate
Next Steps
- Combine STR video with XA Audio for rich multimedia
- Add CDDA Audio tracks for opening themes
- Optimize all media with LBA placement
- Learn about Building ISOs for complete projects