Terminal & Command Prompt Basics For Media Workflows

Terminal & Command Prompt Basics For Media Workflows

Beginner-friendly terminal primer for creators—organize files, rename clips, convert audio/video, and run safe overnight jobs with simple commands.

Gentle introduction for creators — no coding degree required.

What this article is (and isn’t)

This is a practical, beginner-friendly introduction to the terminal — Command Prompt or PowerShell on Windows. You’ll copy-paste tiny commands, learn what they do in plain English, and use them to speed up everyday media work.

What it’s not: a deep dive into programming, server administration, or anything “hacker-y.”

By the end of part one you’ll be able to: open a terminal, install a couple of tools, move around folders confidently, run programs like ffmpeg and yt-dlp, and keep long jobs running while you do something else. (Part two builds on this with batching, loops, and checklists.)


Why creators should care

Creators repeat lots of small chores: renaming files, pulling subtitles, exporting audio, resizing for Shorts, moving finished renders into neat folders. Doing it with clicks is fine — until you have 50 items. The terminal turns those 50 clicks into one reliable command.

Benefits

Concrete examples you’ll use soon

Hook & format breakdown

Getting a terminal on your computer

macOS

Windows

A quick comfort tour

💡 Tip: Keep a “Terminal Testing” folder on your Desktop. You can’t break anything important while you’re practicing.


Package managers in one minute

Installing apps with clicks is fine; installing tools (like ffmpeg) is faster and safer with a package manager — an app that installs other apps correctly.

Hook & format breakdown

macOS (Homebrew)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install ffmpeg yt-dlp

Windows (Chocolatey)

Set-ExecutionPolicy Bypass -Scope Process -Force; `
[System.Net.ServicePointManager]::SecurityProtocol = `
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

choco install ffmpeg yt-dlp -y

Safety notes


How folders and paths work

Commands act on paths — addresses to files/folders. Understanding these ideas will prevent 90% of newbie issues.

Working directory (“Where am I?”)

Absolute vs relative paths

Spaces in names

Path separators

If you get “No such file or directory,” check:

  1. spelling, 2) quotes for spaces, 3) your folder (pwd / Get-Location).
Hook & format breakdown

Commands you’ll actually use

Below are everyday commands you’ll reuse. Each has a macOS and a Windows version that do the same thing.

# macOS
pwd
ls
cd Projects
cd ..
open .

# Windows
Get-Location
dir
cd Projects
cd ..
start .

Files (copy / move / delete / make folder)

# macOS
cp input.mp4 copy.mp4
mv copy.mp4 clips/
rm old.mp3
mkdir assets

# Windows
Copy-Item input.mp4 copy.mp4
Move-Item copy.mp4 .\clips\
Remove-Item old.mp3
New-Item -ItemType Directory assets

Run programs & get help

# macOS
ffmpeg -version
yt-dlp --version
yt-dlp --help | less

# Windows
ffmpeg -version
yt-dlp --version
yt-dlp --help | more

History, tab-complete, clear screen

# macOS
clear

# Windows
cls

Open the current folder in your GUI

open .    # macOS Finder
start .   # Windows Explorer

Quick “what is this file?” check

ffprobe -hide_banner -i "My Clip.mp4"   # macOS or Windows (ffprobe ships with ffmpeg)

Save output to a file (logging)

# macOS
yt-dlp https://… > download_log.txt
yt-dlp https://… >> download_log.txt

# Windows
yt-dlp https://… > download_log.txt
yt-dlp https://… >> download_log.txt

Batch renaming & simple loops

Renaming files one-by-one is painful. Here are safe, repeatable patterns.

Hook & format breakdown

Add a prefix to every .mp4

# macOS (dry run, then do it)
for f in *.mp4; do echo mv -- "$f" "clip_$f"; done
for f in *.mp4; do mv -- "$f" "clip_$f"; done

# Windows (preview with -WhatIf, then run)
Get-ChildItem *.mp4 | Rename-Item -NewName { "clip_$($_.Name)" } -WhatIf
Get-ChildItem *.mp4 | Rename-Item -NewName { "clip_$($_.Name)" }

Change extensions (e.g., .mov.mp4 names only)

This just renames the file; it doesn’t convert media. Use ffmpeg to transcode.

# macOS
for f in *.mov; do mv -- "$f" "${f%.mov}.mp4"; done

# Windows
Get-ChildItem *.mov | Rename-Item -NewName { $_.BaseName + ".mp4" } -WhatIf
# then run again without -WhatIf

Replace spaces with dashes (good for scripts)

# macOS
for f in *\ *; do new="${f// /-}"; echo mv -- "$f" "$new"; done
for f in *\ *; do new="${f// /-}"; mv -- "$f" "$new"; done

# Windows
Get-ChildItem | Where-Object Name -match " " |
  Rename-Item -NewName { $_.Name -replace ' ','-' } -WhatIf
# then without -WhatIf

Safety tips

# macOS
: > rename_map.csv
for f in *.mp4; do echo "$f,clip_$f" >> rename_map.csv; done

# Windows
Get-ChildItem *.mp4 |
  Select-Object @{n='Old';e={$_.Name}}, @{n='New';e={"clip_$($_.Name)"}} |
  Export-Csv rename_map.csv -NoTypeInformation

Pipes & redirection

Terminals shine when you chain small tools so the output of one becomes the input of another.

# Show output on screen and save it
# macOS
yt-dlp "AUTHORIZED_OR_CC_URL" | tee log.txt
yt-dlp "AUTHORIZED_OR_CC_URL" | tee -a log.txt

# Windows
yt-dlp "AUTHORIZED_OR_CC_URL" | Tee-Object -FilePath log.txt
yt-dlp "AUTHORIZED_OR_CC_URL" | Tee-Object -FilePath log.txt -Append

# Keep errors separate (useful for debugging)
ffmpeg -i input.mp4 2> errors.txt   # macOS or Windows

Chaining is how you build mini-assembly lines: download → log → convert → move — each step simple and visible.


A tiny script, explained

Scripts are just saved commands. Start tiny: one script for macOS, one for Windows.

# macOS (convert_audio.sh)
#!/usr/bin/env bash
set -euo pipefail

in="$1"
out_folder="Audio"
mkdir -p "$out_folder"

# extract audio as high-quality AAC
ffmpeg -y -i "$in" -vn -acodec aac -b:a 192k "$out_folder/${in%.*}.m4a"

echo "Saved to $out_folder/${in%.*}.m4a"

# Run it:
# chmod +x convert_audio.sh
# ./convert_audio.sh "My Clip.mp4"
# Windows (Convert-Audio.ps1)
param(
  [Parameter(Mandatory=$true)][string]$In
)

$OutFolder = "Audio"
New-Item -ItemType Directory -Force -Path $OutFolder | Out-Null

# extract audio as high-quality AAC
ffmpeg -y -i "$In" -vn -acodec aac -b:a 192k (Join-Path $OutFolder ("{0}.m4a" -f [System.IO.Path]::GetFileNameWithoutExtension($In)))

Write-Host "Saved to $OutFolder"

# Run it:
# Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
# .\Convert-Audio.ps1 -In "My Clip.mp4"
Hook & format breakdown

Day-one practice lab

Goal: run a four-step mini-pipeline on a file you’re allowed to use (your clip).

  1. Prepare a sandbox
    Create Desktop/Terminal Testing/ and put sample.mp4 inside.

  2. Inspect the media

ffprobe -hide_banner -i "sample.mp4"

Look for resolution, duration, and audio stream info.

  1. Extract audio
# macOS
./convert_audio.sh "sample.mp4"

# Windows
.\Convert-Audio.ps1 -In "sample.mp4"
  1. Rename & organize
# macOS
mv -- "sample.mp4" "clip_sample.mp4"
mkdir -p Assets && mv -- Audio "clip_sample.mp4" Assets/

# Windows
Rename-Item "sample.mp4" "clip_sample.mp4"
New-Item -ItemType Directory -Force -Path Assets | Out-Null
Move-Item -Path Audio, "clip_sample.mp4" -Destination Assets

Checklist (expected outputs)


Printable cheat sheet

NAVIGATION
  macOS: pwd | ls | cd <folder> | cd .. | open .
  Win:   Get-Location | dir | cd <folder> | cd .. | start .

FILES
  macOS: cp a b | mv a b | rm a | mkdir new
  Win:   Copy-Item a b | Move-Item a b | Remove-Item a | New-Item -ItemType Directory new

RUN PROGRAMS & HELP
  ffmpeg -version | yt-dlp --version | <command> --help

CLEAR SCREEN
  macOS: clear
  Win:   cls

LOGGING
  Overwrite: > log.txt    Append: >> log.txt    Errors only: 2> errors.txt

BACKGROUND/LONG JOBS
  macOS: command &    nohup command >> log.txt 2>&1 &
  Win:   Start-Process <exe> -ArgumentList "<args>"

SAFE BATCH RENAME
  macOS: for f in *.mp4; do mv "$f" "clip_$f"; done
  Win:   Get-ChildItem *.mp4 | Rename-Item -NewName { "clip_$($_.Name)" } -WhatIf

Troubleshooting & confidence builders

Search errors by pasting the exact message into a search engine with the tool name (e.g., “ffmpeg Invalid data found”). Someone has had this problem before.


Glossary