First Steps

Your first hands-on experience with MediaProc.

Welcome!

Let's process your first media file with MediaProc. This guide will walk you through the basics step-by-step.


Prerequisites Check

Before starting, ensure you have:

✅ MediaProc installed (run mediaproc --version)
✅ FFmpeg installed (run ffmpeg -version)
✅ A terminal/command prompt open
✅ Sample media files to process

Info

Need to install? See the Installation Guide for detailed setup instructions.


Your First Command

Let's start with the simplest possible command - getting help:

Terminal
$ mediaproc --help
MediaProc CLI v1.0.0
Universal media processing toolkit
Available plugins: image, video, audio, ...

What you should see:

  • MediaProc version number
  • List of available plugins
  • Global command options

Processing Your First Image

Step 1: Find an Image

Any image file will work. For this example, let's say you have photo.jpg.

Step 2: Resize the Image

Terminal
$ mediaproc image resize photo.jpg --width 1920
Processing: photo.jpg
Resizing to 1920×1080
✓ Created: photo-resized.jpg

What happened:

  • MediaProc read photo.jpg
  • Resized it to 1920 pixels wide (maintaining aspect ratio)
  • Saved as photo-resized.jpg

Step 3: Verify the Result

Open photo-resized.jpg in any image viewer to see the result!


Understanding the Command

Let's break down what we just did:

mediaproc image resize photo.jpg --width 1920
    │      │      │       │           │
    │      │      │       │           └─ Option: Target width
    │      │      │       └───────────── Input file
    │      │      └───────────────────── Command: What to do
    │      └──────────────────────────── Plugin: Media type
    └─────────────────────────────────── CLI tool

Try Different Options

Change Output Format

Terminal
$ mediaproc image resize photo.jpg --width 1920 --format webp
✓ Created: photo-resized.webp

Specify Both Width and Height

Terminal
$ mediaproc image resize photo.jpg --width 1920 --height 1080
✓ Created: photo-resized.jpg (1920×1080)

Custom Output Name

Terminal
$ mediaproc image resize photo.jpg --width 1920 --output thumbnail.jpg
✓ Created: thumbnail.jpg

Processing Multiple Files

Batch Processing

Process all JPGs in the current directory:

Terminal
$ mediaproc image resize *.jpg --width 1920
Processing 5 files...
photo1.jpg → photo1-resized.jpg
photo2.jpg → photo2-resized.jpg
photo3.jpg → photo3-resized.jpg
photo4.jpg → photo4-resized.jpg
photo5.jpg → photo5-resized.jpg
✓ Successfully processed 5 files

Output to Directory

Terminal
$ mediaproc image resize *.jpg --width 1920 --output ./resized/
✓ Created 5 files in ./resized/

Exploring Other Plugins

Video Processing

Trim a video segment:

Terminal
$ mediaproc video trim movie.mp4 --start 30 --duration 60
Trimming: 00:00:30 for 1:00
✓ Created: movie-trimmed.mp4 (60 seconds)

Audio Processing

Convert audio format:

Terminal
$ mediaproc audio convert song.mp3 --format flac
Converting: song.mp3 → FLAC lossless
✓ Created: song.flac

Getting Help

Plugin Help

See all available image commands:

Terminal
$ mediaproc image --help
Image Plugin Commands:
resize Resize images to specified dimensions
convert Convert images between formats
optimize Optimize images for web
...and 46 more commands

Command Help

See options for a specific command:

Terminal
$ mediaproc image resize --help
Resize images to specified dimensions
Options:
--width, -w Target width in pixels
--height, -h Target height in pixels
--fit How to fit the image (cover, contain, fill)
--format, -f Output format (jpg, png, webp)

Common Beginner Mistakes

1. Forgetting the Plugin Name

Wrong:

mediaproc resize photo.jpg --width 1920
# Error: Unknown command 'resize'

Correct:

mediaproc image resize photo.jpg --width 1920

2. Using Wrong Option Names

Wrong:

mediaproc image resize photo.jpg --size 1920
# Error: Unknown option '--size'

Correct:

mediaproc image resize photo.jpg --width 1920

3. Forgetting Input File

Wrong:

mediaproc image resize --width 1920
# Error: No input files specified

Correct:

mediaproc image resize photo.jpg --width 1920

Preview Before Processing

Use --dry-run to see what will happen without actually processing:

Terminal
$ mediaproc image resize photo.jpg --width 1920 --dry-run
Would process: photo.jpg
Would create: photo-resized.jpg
Operation: resize to 1920px width
(Dry run - no files modified)

Verbose Output

See detailed processing information with --verbose:

Terminal
$ mediaproc image resize photo.jpg --width 1920 --verbose
Loading image: photo.jpg
Original size: 4000×3000 (12 MP)
Target size: 1920×1440
Using Sharp 0.32.0
Resizing with Lanczos3 resampling
Writing: photo-resized.jpg
✓ Completed in 0.8s

Practice Exercises

Try these commands to practice:

Exercise 1: Image Formats

Convert an image to different formats:

# Original to WebP
mediaproc image convert photo.jpg --format webp

# Original to PNG
mediaproc image convert photo.jpg --format png

# Original to AVIF
mediaproc image convert photo.jpg --format avif

Exercise 2: Video Trimming

Extract different segments from a video:

# First 30 seconds
mediaproc video trim movie.mp4 --duration 30

# From 1 minute to 2 minutes
mediaproc video trim movie.mp4 --start 60 --end 120

# Last 30 seconds (requires knowing duration)
mediaproc video trim movie.mp4 --start -30

Exercise 3: Audio Conversion

Convert audio to different formats:

# MP3 to FLAC (lossless)
mediaproc audio convert song.mp3 --format flac

# WAV to Opus (modern compression)
mediaproc audio convert recording.wav --format opus

# FLAC to MP3 (for compatibility)
mediaproc audio convert master.flac --format mp3 --quality high

Quick Reference Card

Basic Pattern:

mediaproc <plugin> <command> <input> [options]

Common Commands:

# Image
mediaproc image resize photo.jpg --width 1920
mediaproc image convert photo.jpg --format webp
mediaproc image optimize photo.jpg

# Video
mediaproc video trim video.mp4 --start 30 --duration 60
mediaproc video resize video.mp4 --width 1280
mediaproc video transcode video.mp4 --codec h265

# Audio
mediaproc audio convert song.mp3 --format flac
mediaproc audio normalize podcast.mp3 --loudness -16
mediaproc audio trim song.mp3 --start 30 --duration 60

Helpful Options:

--help        Show help
--verbose     Detailed output
--dry-run     Preview only
--output      Specify output file/directory

What's Next?

You've successfully run your first MediaProc commands! 🎉

Continue Learning:

  1. Basic Concepts - Understand key terminology
  2. Quick Start - More comprehensive examples
  3. Plugin Guides - Deep dive into each plugin
  4. CLI Overview - Master the command-line interface

Try Advanced Features:

  • Batch processing multiple files
  • Chaining commands in workflows
  • Custom configurations for repeated operations
  • Creating plugins for custom processing

Getting Help

Stuck? Here's how to get help:

Command Help:

mediaproc --help                    # General help
mediaproc image --help              # Plugin help
mediaproc image resize --help       # Command help

Online Resources:


Ready to explore more?

View All Plugins → | Read CLI Guide →

Found an issue? Help us improve this page.

Edit on GitHub →