# Compressor - video converter for mov, mp4, webm and mkv | Shortcuts Library

> An interface for ffmpeg that converts, compresses and remuxes videos

## What this shortcut does

This shortcut is an interface for ffmpeg video conversions. The free a-Shell mini app is required because it provides ffmpeg and ffprobe.
The shortcut was made using iOS 16. It also seems to run fine on iOS 17.
Instructions
Run the Compressor shortcut directly or from the share sheet
Choose video options
Start the job
Features
Dramatically compress file size (700MB 4K = 50MB 720p)
Convert from MOV, MP4, MKV & WEBM files
Video options: width, height, format, codec, bit rate, fps
Audio options: codec, bit rate, sample rate
Preserve HDR and GPS location metadata if possible
Remuxing MKV files to MP4 is super fast
Support for video shot in Cinematic format
Requirements
a-Shell mini app
a video to be converted
a little knowledge about video encoding helps
Permissions
Because this shortcut is an interface for ffmpeg, it may interact with a-Shell mini nearly 30 distinct times.
This means you can expect 20+ prompts for permissions the first time you use this shortcut.
The shortcut will ask for permissions...
to use the a-Shell mini app (20+ times)
to access files and folders (4-5 times)
to run Shortcuts (2 times)
to access Photos (2-3 times)
Encoder Settings
Output Video Name
- Change file extension to change format.
video_codec
- Usually hevc, h264 or copy
video_width
- Width in pixels. -1 for scaled.
video_height
- Height in pixels. -1 for scaled.
video_fps
- Video speed in frames per second
video_bit_rate
- Video bit rate in M/s
audio_codec
- Usually aac
audio_bit_rate
- Audio bit rate in k/s
audio_sample_rate
- Usually 44100 or 48000
Minimum Bit Rates
Here are the suggested minimum bit rates at 30 fps.
Resolution
Min. Bit Rate
720p
1.5 M/s
1080p
3 M/s
4K
6 M/s
Remuxing MKV to MP4
Use the fast "copy" codec with MKV files to remux to MP4 without any loss in video quality.
When using the video "copy" codec, all other video encoder values (width, height, fps, bit rate) should be set to "auto." Set the audio codec to "aac" for maximum compatibility.
HDR Compatibility
Choose the "hevc" codec (or "copy") to preserve HDR. Videos with HDR will be converted (tone mapped) to SDR when using the "h264" codec.
GPS Metadata
The shortcut will try to preserve any GPS location metadata during conversions.
Default Encoder Values
The default encoder settings can be changed by editing the "DefaultSettings" dictionary in the shortcut. The default video encoder settings are currently 720p, hevc, auto fps, 1.5M/s. Audio defaults to aac, 128k, 44100.
Advanced Options
Tap on "Start Job (advanced)" to edit the ffmpeg command before it is executed. Add filters and make other changes. Check the ffmpeg documentation for more information.
Known Issues
Encoding speed varies by device. Older devices may perform poorly.
a-Shell mini can't encode in the background.
a-Shell mini incorrectly reports "No space left on device" errors on some devices.
WEBM metadata is wrong or missing.
Some files cause the shortcut to crash while reading metadata
The AV1 codec is not supported
Cinematic video conversions lose GPS metadata
“Allow Sharing Large Amounts of Data” must be enabled in Settings.
Troubleshooting
Try jobs at least twice before giving up.
If a job fails, check a-Shell mini for error messages.
Force close a-Shell Mini if it hangs or shows a large number of error messages.
Try restarting device if a-Shell mini reports out of space error.
The shortcut saves your session settings to make restarting jobs easier.
If the shortcut fails from the share sheet, try running the shortcut directly.
If the shortcut fails, try disabling metadata analysis for that file.

## Compatibility

iPhone, iPad

## Required apps

a-Shell mini

[View this page](https://shortcutlibrary.app/shortcuts/compressor-video-converter-for-mov-mp4-webm-and)

[Download Shortcuts Library on the App Store](https://apps.apple.com/app/id6759494377)
