Skip to content

Instantly share code, notes, and snippets.

@deanputney
Created June 15, 2012 00:09
Show Gist options
  • Save deanputney/2933760 to your computer and use it in GitHub Desktop.
Save deanputney/2933760 to your computer and use it in GitHub Desktop.
Convert video for Apple TV
#!/bin/bash
read -p "Input file: " input_file;
read -p "Title: " title;
read -p "Show name: " show;
read -p "Episode ID: " eid;
read -p "Season: " season;
read -p "Episode: " episode;
ffmpeg -i "$input_file" -r 30 -vcodec libx264 -acodec libfaac -threads 0 -ar 48000 -ab 128k -ac 2 -y -crf 21 \
-metadata title="$title" \
-metadata show="$show" \
-metadata episode_id="$eid" \
-metadata season_number="$season" \
-metadata episode_sort="$episode" \
test.mp4
# -metadata author="Unknown Artist" \
# -metadata composer="Composer Unknown" \
# -metadata album="Tracer Video Game Soundtrack" \
# -metadata year="1996" \
# -metadata track="5" \
# -metadata comment="This is redbook CD audio track #5 from the Windows 95 game \"Tracer\"" \
# -metadata genre="Game Soundtrack" \
# -metadata copyright="Copyright 1996 Future Endeavors, Inc." \
# -metadata description="Nifty techno background tune for a futuristic video game" \
# -metadata synopsis="Hey, is this thing on? This is where the 'synopsis' field shows up." \
# -metadata show="Tracer" \
# -metadata episode_id="102" \
# -metadata season_number="1" \
# -metadata episode_sort="2" \
# -metadata network="Some network" \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment