Convert Insta360 X4 .insv dual-fisheye videos into 9:16 vertical shorts for Instagram Reels and YouTube Shorts, with automatic splitting, lens selection, yaw control, and adjustable FOV.
- Proper fisheye-to-rectilinear reprojection using ffmpeg's
v360filter - Dual lens support (front and back camera streams from a single .insv file)
- Horizontal pan control (yaw) within each lens
- Adjustable field of view (zoom in/out)
- Automatic splitting of long videos into 2-minute segments
- Batch processing of multiple .insv files
- Three quality presets (high/medium/low)
- Fast-start enabled for web playback
- Preserves audio (192kbps AAC, 48kHz)
- Python 3.6+
- ffmpeg (with v360 filter support)
macOS:
brew install ffmpegUbuntu/Debian:
sudo apt-get install ffmpegWindows: Download from ffmpeg.org and add to PATH.
git clone https://github.com/JimWas/JimWas-Insta360-INSV-to-Shorts.git
cd JimWas-Insta360-INSV-to-Shortspython JimWas-INSTA360-INSV-TO-SHORTS.PYThe Insta360 X4 stores both lenses as separate video streams in a single .insv file.
# Front lens (screen side) - default
python JimWas-INSTA360-INSV-TO-SHORTS.PY --lens front
# Back lens (opposite side)
python JimWas-INSTA360-INSV-TO-SHORTS.PY --lens backControl which direction the camera faces within the fisheye. 0 = straight ahead, negative = left, positive = right.
# Pan left
python JimWas-INSTA360-INSV-TO-SHORTS.PY --yaw -40
# Pan right
python JimWas-INSTA360-INSV-TO-SHORTS.PY --yaw 40Usable range is roughly -80 to 80 degrees per lens. Beyond that you'll see black (edge of fisheye).
Lower FOV = zoomed in, higher FOV = wider angle.
# Zoomed in
python JimWas-INSTA360-INSV-TO-SHORTS.PY --fov 50
# Default
python JimWas-INSTA360-INSV-TO-SHORTS.PY --fov 80
# Wide angle
python JimWas-INSTA360-INSV-TO-SHORTS.PY --fov 110# Custom segment duration (60 seconds for YouTube Shorts)
python JimWas-INSTA360-INSV-TO-SHORTS.PY -d 60
# Medium quality for faster processing
python JimWas-INSTA360-INSV-TO-SHORTS.PY -q medium
# Specify output directory
python JimWas-INSTA360-INSV-TO-SHORTS.PY -o ./output
# Convert a specific file
python JimWas-INSTA360-INSV-TO-SHORTS.PY video.insv
# Combine options
python JimWas-INSTA360-INSV-TO-SHORTS.PY --lens back --yaw -20 --fov 90 -q medium -d 60| Option | Default | Description |
|---|---|---|
input |
. |
Input .insv file or directory |
-o, --output |
same as input | Output directory |
-d, --duration |
120 |
Max segment duration in seconds |
-q, --quality |
high |
Quality preset: high, medium, low |
--lens |
front |
Lens to use: front (screen side) or back |
--yaw |
0 |
Horizontal pan angle in degrees |
--fov |
80 |
Horizontal field of view (30-120) |
- The script reads the .insv file which contains two fisheye video streams (front and back lens)
- Selects the chosen lens stream using
-map - Applies ffmpeg's
v360filter to reproject from fisheye to rectilinear (flat) perspective - Outputs 1080x1920 portrait video with the specified yaw and FOV
- Automatically splits videos longer than the segment duration
- 10-minute video -> 5 segments (2 min each)
- 5-minute video -> 3 segments (2 min, 2 min, 1 min)
- 90-second video -> 1 segment
Segments are named: video_shorts_part1.mp4, video_shorts_part2.mp4, etc.
| Quality | CRF | Preset | File Size | Speed |
|---|---|---|---|---|
| high | 18 | slow | Largest | Slowest |
| medium | 23 | medium | Medium | Medium |
| low | 28 | fast | Smallest | Fastest |
- Resolution: 1080x1920 (9:16)
- Video Codec: H.264
- Audio Codec: AAC, 192kbps, 48kHz
- Container: MP4 with fast-start
"ffmpeg is not installed" - Install ffmpeg using the instructions above.
Black areas in output - Your yaw value is past the edge of the fisheye. Keep yaw between -80 and 80.
Wrong camera angle - Try --lens back to switch to the other lens, or adjust --yaw.
Video looks too zoomed in/out - Adjust --fov. Lower values zoom in, higher values zoom out.
Audio/video out of sync - Try -q high for better quality processing.
- Replaced simple crop method with proper
v360fisheye-to-rectilinear reprojection - Added dual lens support (
--lens front/back) by reading both video streams from .insv file - Added horizontal pan control (
--yaw) - Added adjustable field of view (
--fov) - Output now has correct flat perspective instead of distorted fisheye crop
- Initial release with basic crop-and-scale conversion
- Automatic video splitting into 2-minute segments
- Batch processing support
- Quality presets (high/medium/low)
Free to use and modify as needed.