Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# PlexCleaner

Utility to optimize media files for Direct Play in Plex, Emby, Jellyfin.

## Release History

- Version 2.4.5
- Update FFmpeg in Linux instructions and in Docker builds to version 5.0.
- Version 2.4.3
- Added more robust error and control logic for handling specific AVI files.
- Detect and ignore cover art and thumbnail video tracks.
- Perform conditional interlace detection using FFmpeg idet filter.
- Verify media tool track identification matches.
- Modify sidecar file hashing to support small files.
- Use C# 10 file scoped namespaces.
- Version 2.4.1
- Added `ProcessOptions:RestoreFileTimestamp` JSON option to restore the media file modified time to match the original value.
- Fixed media tool logic to account for WMV files with cover art, and added `wmv3` and `wmav2` codecs to be converted.
- Version 2.3.5
- Deprecation warning for `--mediafiles` option taking multiple paths, instead use multiple invocations.
- Old style: `--mediafiles path1 path2`
- New style: `--mediafiles path1 --mediafiles path2`
- Added `removesubtitles` command to remove all subtitles, useful when the media contains annoying forced subtitles with ads.
- Version 2.3.2
- Warn when the HDR profile is `Dolby Vision` (profile 5) vs. `Dolby Vision / SMPTE ST 2086` (profile 7).
- Unless using DV capable hardware, profile 5 may play but will result in funky colors on HDR10 hardware.
- The warning is only logged during the verify step, repair is not possible.
- To re-verify existing 4K files use the `verify` command, or reset the state using the `createsidecar` and `process` commands.
- Renamed `getsidecar` command to `getsidecarinfo` for consistency with other `getxxxinfo` commands.
- Added `gettoolinfo` command to print media info reported by tools.
- Refactored duplicate file iteration logic to use lambdas.
- Version 2.3:
- Migrated from .NET 5 to .NET 6.
- Version 2.1:
- Added backwards compatibility for some older JSON schemas.
- Added the `upgradesidecar` command to migrate sidecar files to the current JSON schema version.
- Sidecar JSON schema changes:
- Replaced the unreliable file modified timestamp state tracking with a SHA256 hash of parts of the MKV file.
- Replaced the `Verified` boolean with `State` flags to track more granular file state and modification changes.
- Run the `upgradesidecar` command to migrate sidecar files to the current schema version.
- Repairing metadata inconsistencies, e.g. MuxingMode not specified for S_VOBSUB subtitle codecs, by remuxing the MKV file.
- Added a `ToolsOptions:AutoUpdate` configuration option to automatically update the tools before each run.
- Version 2.0:
- Linux and Docker are now supported platforms.
- Automatic downloading of tools on Linux is not currently supported, tools need to be manually installed on the system.
- The Docker build includes all the prerequisite tools, and is easier to use vs. installing all the tools on Linux.
- Support for H.265 encoding added.
- All file metadata, titles, tags, and track names are now deleted during media file cleanup.
- Windows systems will be kept awake during processing.
- Schema version numbers were added to JSON config files, breaking backwards compatibility.
- Sidecar JSON will be invalid and recreated, including re-verifying that can be very time consuming.
- Tools JSON will be invalid and `checkfortools` should be used to update tools.
- Tool version numbers are now using the short version number, allowing for Sidecar compatibility between Windows and Linux.
- Processing of the same media can be mixed between Windows, Linux, and Docker, note that the paths in the `FileIgnoreList` setting are platform specific.
- New options were added to the JSON config file.
- `ConvertOptions:EnableH265Encoder`: Enable H.265 encoding vs. H.264.
- `ToolsOptions:UseSystem`: Use tools from the system path vs. from the Tools folder, this is the default on Linux.
- `VerifyOptions:RegisterInvalidFiles`: Add files that fail verify and repair to the `ProcessOptions:FileIgnoreList`.
- `ProcessOptions:ReEncodeAudioFormats` : `opus` codec added to default list.
- File logging and console output is now done using structured Serilog logging.
- Basic console and file logging options are used, configuration from JSON is not currently supported.
1 change: 1 addition & 0 deletions PlexCleaner.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
.gitattributes = .gitattributes
.gitignore = .gitignore
HISTORY.md = HISTORY.md
LICENSE = LICENSE
PlexCleaner.json = PlexCleaner.json
README.md = README.md
Expand Down
10 changes: 9 additions & 1 deletion PlexCleaner/PlexCleaner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Authors>Pieter Viljoen</Authors>
<Company>Pieter Viljoen</Company>
<Copyright>Pieter Viljoen</Copyright>
<Description>Utility to optimize media files for DirectPlay on Plex.</Description>
<Description>Utility to optimize media files for Direct Play in Plex, Emby, Jellyfin.</Description>
<PackageProjectUrl>https://github.com/ptr727/PlexCleaner</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/ptr727/PlexCleaner</RepositoryUrl>
Expand All @@ -26,8 +26,16 @@
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>latest</AnalysisLevel>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="InsaneGenius.Utilities" Version="2.5.6" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
Expand Down
2 changes: 1 addition & 1 deletion PlexCleaner/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
"Test": {
"commandName": "Project",
"commandLineArgs": "--settingsfile \"PlexCleaner.json\" --logfile \"PlexCleaner.log\" process --mediafiles \"D:\\Test\""
"commandLineArgs": "--settingsfile \"PlexCleaner.json\" --logfile \"PlexCleaner.log\" process --mediafiles \"D:\\Test\\MP4inMKV - La Révolution - S01E01 - Chapter One - The Origins.mkv\""
},
"Docker": {
"commandName": "Docker"
Expand Down
62 changes: 2 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ Docker images are published on [Docker Hub](https://hub.docker.com/u/ptr727/plex
- `"ReEncodeVideoCodecs": "*,dx50,div3,mp42,*,*,*,*,*,*"`
- `"ReEncodeVideoProfiles": "*,*,*,*,*,Constrained Baseline@30,*,*,*,*"`
- New: `"ReEncodeVideo": [ { "Format": "mpeg2video" }, { "Format": "mpeg4", "Codec": "dx50" }, ... ]`
- Replaced [GitVersion](https://github.com/GitTools/GitVersion) with [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning) as versioning tool, resolves [Release develop builds as pre-release #16](httpshttps://github.com/ptr727/PlexCleaner/issues/16).
- Replaced [GitVersion](https://github.com/GitTools/GitVersion) with [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning) as versioning tool, resolves [Release develop builds as pre-release #16](https://github.com/ptr727/PlexCleaner/issues/16).
- Main branch will now build using `Release` configuration, other branches will continue building with `Debug` configuration.
- Prerelease builds are now posted to GitHub releases tagges as `pre-release`, Docker builds continue to be tagged as `develop`.
- Docker builds are now also pushed to [GitHub Container Registry](https://github.com/ptr727/PlexCleaner/pkgs/container/plexcleaner).
- Builds will continue to push to Docker Hub while it remains free to use.
- Added a xUnit unit test project.
- Currently the only tests are for config and sidecar JSON schema backwards compatibility.
- Code cleanup and refactoring to make current versions of Visual Studio and Rider happy.
- See [Release History](#Release-History) for older Release Notes.
- See [Release History](./HISTORY.md) for older Release Notes.

## Use Cases

Expand Down Expand Up @@ -513,61 +513,3 @@ The `removesubtitles` command will remove all subtitle tracks.
- [JellyFish](http://jell.yfish.us/)
- [DemoWorld](https://www.demo-world.eu/2d-demo-trailers-hd/)
- [MPlayer](https://samples.mplayerhq.hu/)

## Release History

- Version 2.4.5
- Update FFmpeg in Linux instructions and in Docker builds to version 5.0.
- Version 2.4.3
- Added more robust error and control logic for handling specific AVI files.
- Detect and ignore cover art and thumbnail video tracks.
- Perform conditional interlace detection using FFmpeg idet filter.
- Verify media tool track identification matches.
- Modify sidecar file hashing to support small files.
- Use C# 10 file scoped namespaces.
- Version 2.4.1
- Added `ProcessOptions:RestoreFileTimestamp` JSON option to restore the media file modified time to match the original value.
- Fixed media tool logic to account for WMV files with cover art, and added `wmv3` and `wmav2` codecs to be converted.
- Version 2.3.5
- Deprecation warning for `--mediafiles` option taking multiple paths, instead use multiple invocations.
- Old style: `--mediafiles path1 path2`
- New style: `--mediafiles path1 --mediafiles path2`
- Added `removesubtitles` command to remove all subtitles, useful when the media contains annoying forced subtitles with ads.
- Version 2.3.2
- Warn when the HDR profile is `Dolby Vision` (profile 5) vs. `Dolby Vision / SMPTE ST 2086` (profile 7).
- Unless using DV capable hardware, profile 5 may play but will result in funky colors on HDR10 hardware.
- The warning is only logged during the verify step, repair is not possible.
- To re-verify existing 4K files use the `verify` command, or reset the state using the `createsidecar` and `process` commands.
- Renamed `getsidecar` command to `getsidecarinfo` for consistency with other `getxxxinfo` commands.
- Added `gettoolinfo` command to print media info reported by tools.
- Refactored duplicate file iteration logic to use lambdas.
- Version 2.3:
- Migrated from .NET 5 to .NET 6.
- Version 2.1:
- Added backwards compatibility for some older JSON schemas.
- Added the `upgradesidecar` command to migrate sidecar files to the current JSON schema version.
- Sidecar JSON schema changes:
- Replaced the unreliable file modified timestamp state tracking with a SHA256 hash of parts of the MKV file.
- Replaced the `Verified` boolean with `State` flags to track more granular file state and modification changes.
- Run the `upgradesidecar` command to migrate sidecar files to the current schema version.
- Repairing metadata inconsistencies, e.g. MuxingMode not specified for S_VOBSUB subtitle codecs, by remuxing the MKV file.
- Added a `ToolsOptions:AutoUpdate` configuration option to automatically update the tools before each run.
- Version 2.0:
- Linux and Docker are now supported platforms.
- Automatic downloading of tools on Linux is not currently supported, tools need to be manually installed on the system.
- The Docker build includes all the prerequisite tools, and is easier to use vs. installing all the tools on Linux.
- Support for H.265 encoding added.
- All file metadata, titles, tags, and track names are now deleted during media file cleanup.
- Windows systems will be kept awake during processing.
- Schema version numbers were added to JSON config files, breaking backwards compatibility.
- Sidecar JSON will be invalid and recreated, including re-verifying that can be very time consuming.
- Tools JSON will be invalid and `checkfortools` should be used to update tools.
- Tool version numbers are now using the short version number, allowing for Sidecar compatibility between Windows and Linux.
- Processing of the same media can be mixed between Windows, Linux, and Docker, note that the paths in the `FileIgnoreList` setting are platform specific.
- New options were added to the JSON config file.
- `ConvertOptions:EnableH265Encoder`: Enable H.265 encoding vs. H.264.
- `ToolsOptions:UseSystem`: Use tools from the system path vs. from the Tools folder, this is the default on Linux.
- `VerifyOptions:RegisterInvalidFiles`: Add files that fail verify and repair to the `ProcessOptions:FileIgnoreList`.
- `ProcessOptions:ReEncodeAudioFormats` : `opus` codec added to default list.
- File logging and console output is now done using structured Serilog logging.
- Basic console and file logging options are used, configuration from JSON is not currently supported.