qfjp / MediaLibraryCompression

A script to convert video files to x265 codec in mp4 containers. Forces hvc1 for MacOS Big Sur compatibility
GNU General Public License v3.0
2 stars 1 forks source link

Ungodly mess - separated mediainfo #1

Open qfjp opened 1 year ago

qfjp commented 1 year ago

The code is horrible and ad-hoc. The first step to fixing this is to unify the four mediainfo functions while adding Enumerations for everything possible within a video file's JSON.

qfjp commented 1 year ago

Unifying items in metadata and the like has been partially accomplished:

  1. Unifying the mediainfo functions was done in commit 67d8dde, where all mediainfo_<typ> functions have become mediainfo(..., typ: StreamIndex). That is, they actually take the type as the parameter instead of hardcoding it into the name of the function.
  2. Generating the arguments to encode various streams for FFMPEG has been unified under generate_conversions(...typ: StreamType) in commit 60f1c09