Skip to content

skyzyx/multimedia-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multimedia Scripts

I have media files. I do some multimedia processing, and these scripts help me stay organized.

You can use these to write Automator-based services, for example.

Points of note

  • I only work with MP4 containers, so these are designed to work for that.
  • I am assuming you're putting metadata into your media files with Subler or a similar tool.
  • I have installed Bash 4 on my Mac, and some of these scripts may use Bash 4 features.

Prerequisites

Scripts

rename-movies.sh

After you have added metadata using Subler (or similar), look inside the media file to find the title of the movie and its resolution, and rename the file.

Pattern: ${TITLE} (${RESOLUTION}).mp4 (e.g., Something in the Public Domain (480p).mp4)

rename-episodes.sh

After you have added metadata using Subler (or similar), look inside the media file to find the title of the episode, season number, episode number, and its resolution, and rename the file.

Pattern: ${SEASON}.${EPISODE} - ${TITLE} (${RESOLUTION}).mp4 (e.g., 1.01 - Pilot (1080p).mp4)

rewrap-video.sh

Many media files exist where the person who did the encoding used H.264 video and AC3 audio inside of an MKV container. These are non-standard formats that are popular among open-source players. Most devices (iPhone, iPad, Apple TV, Xbox, Playstation, and others) support the ISO-backed trinity of H.264 video and AAC audio inside an MP4 container.

This will look inside the file for an AAC stream.

  1. If it finds one, cool. It'll just make sure that its wrapped in an MP4 container and move the moov atom to the front of the file.

  2. If not, it'll convert the audio to AAC — and also make sure that its wrapped in an MP4 container and move the moov atom to the front of the file.

Releases

No releases published

Packages

No packages published