brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: make a smaller copy of a media file with avconvert on your Mac

Media
~/tips/tip-media-avconvert-720p

avconvert -s clip.mov -o clip-720.m4v -p Preset1280x720

Re-encodes a large video to 720p with a tool that ships with macOS.

A phone clip too big to send does not require installing anything on a Mac. avconvert is already there, and it works with named presets.

Give it a source, an output and a preset:

avconvert -s clip.mov -o clip-720.m4v -p Preset1280x720

That produces a 720p H.264 copy with AAC sound. See every preset with avconvert --help. There are 1080p and HEVC variants, and PresetAppleM4A gives you an audio only file. Add --progress for long videos so you can see it moving.

The tool never scales a video up. A source smaller than the preset keeps its own dimensions.

A detail I appreciate for sharing: by default it filters out privacy sensitive source metadata, such as where and when the video was recorded and on what device. If you want those kept, say for your own archive, there is --disableMetadataFilter.

Check the result before you throw anything away. A preset sets the quality for you, so there’s no dial for bitrate, and an already well compressed clip can come out larger than it went in. Only one video and one audio track survive the conversion, so extra languages are dropped.

It refuses to overwrite an existing output unless you add --replace, which I’d leave off until you’re sure of the names.

Further reading: avconvert man page

More Media tips avmediainfo holiday.mov ffmpeg -f lavfi -i testsrc2=size=1280×720:rate=30 \ rpicam-still --timeout 30000 --timelapse 2000 -o timelapse/image%04d.jpg wp media regenerate --only-missing --yes All Media tips (5) All topics

Link