Git Product home page Git Product logo

media-library-to-heic-hevc's Introduction

Convert media library to HEIC/HEVC

This is a simple script to convert a media library with images and videos into more efficient formats without noticable quality loss nor loosing meta data like EXIF information.

HEIC images are compressed way more efficient compared to JPG. Same goes for videos, HEVC is way more efficient compared to e.g. H.264 or MPEG-2.

This script might also be useful when e.g. migrating from Adobe Lightroom to Apple Photos.

Features

  • converts non-HEIC images to HEIC while preserving meta data
  • converts non-HEVC videos to HEVC while preserving meta data
  • keeps original files in case they already do have the wanted format
  • sets EXIF date and file modify date to date if found in meta data, otherwise fall back to file modify date
  • keeps original folder structure, meaning input can be nested folders and output will have the same
  • shows a warning if output file is larger then original file (it happens rarely, mostly for videos)

Requirements

The script expects the following to be available:

  • NodeJS
  • ffmpeg
  • imagemagick

then install dependencies by calling

npm i

Usage

npm run convert <inputFolder> <outputFolder>

Notes for migrating from Adobe Lightroom Classic to Apple Photos

  • make sure your Lightroom catalog is in sync with the file system (just in case you've added files via other applications)
  • make sure all photos have EXIF capture date set. Even if Lightroom sorts them correctly, it can be that no capture date is set and it only uses the file modify date. In this case it won't export the date correctly.
  • for each Lightroom collection, select all photos and add a keyword with the name of the collection (so you can later filter by these keywords again and create an album in e.g. Apple Photos)
  • do the same for each of the star ratings (add keyword e.g. '1 star')
  • use 'Folder Publisher' Lightroom plugin to export while keeping the folder structure
  • in case you have HEIC images in your library and you want to keep e.g. depth information, export them as original files
  • now export images as JPG (100% quality) or PNG (8 bit), make sure including all meta data, and videos as original files

Notes for old videos

  • older videos might be interlaced, meaning you'll see some strange lines in the video. If so, you can manually convert them with de-interlace filter yadif:

    ffmpeg -i in.vob -vf yadif -c:v libx265 -x265-params preset=veryslow:crf=23 -vtag hvc1 -movflags faststart -n out.mov

media-library-to-heic-hevc's People

Contributors

jschroeter avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

nitatemic

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.