Skip to content

Commit

Permalink
HDR to SDR filter profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Anime4000 committed May 1, 2020
1 parent 5100021 commit a7ba8c4
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 14 deletions.
8 changes: 7 additions & 1 deletion IFME/IFME.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,16 @@
<None Include="Mime.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Profiles\Profile_0000-00-00_00-00-00_0002.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Profiles\Profile_0000-00-00_00-00-00_0000.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Profiles\Profile_0000-00-00_00-00-00_0002.json">
<None Include="Profiles\Profile_0000-00-00_00-00-00_0003.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Profiles\Profile_0000-00-00_00-00-00_0004.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Properties\Settings.settings">
Expand Down
5 changes: 5 additions & 0 deletions IFME/MediaEncoding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ internal static void Video(MediaQueue queue, string tempDir)
fi.Add($"yadif={item.DeInterlace.Mode}:{item.DeInterlace.Field}:0");
}

if (item.Quality.CommandFilter.IsDisable())
{
fi.Add(item.Quality.CommandFilter);
}

if (queue.HardSub)
{
var files = Directory.GetFiles(tempDir, "subtitle*");
Expand Down
12 changes: 6 additions & 6 deletions IFME/Profiles/Profile_0000-00-00_00-00-00_0000.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"ProfileName": "x265 High Compression & Quality",
"ProfileName": "High Compression & Quality (AV1 OGG)",
"ProfileAuthor": "Anime4000",
"Container": "mkv",
"Container": "webm",
"Video": {
"Encoder": {
"Id": "deadbeef-0265-0265-0265-026502650265",
"Id": "deadbeef-0011-0011-0011-001100110011",
"Preset": "veryslow",
"Tune": "psnr",
"Mode": 0,
"Value": 24.0,
"Value": 23.5,
"MultiPass": 2,
"Command": "--pme --pmode"
"Command": ""
},
"Quality": {
"Width": 0,
Expand All @@ -29,7 +29,7 @@
},
"Audio": {
"Encoder": {
"Id": "deadbeef-0aac-0aac-0aac-0aac0aac0aac",
"Id": "deadface-f154-f154-f154-f154f154f154",
"Mode": 0,
"Quality": 128,
"SampleRate": 44100,
Expand Down
2 changes: 1 addition & 1 deletion IFME/Profiles/Profile_0000-00-00_00-00-00_0001.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ProfileName": "x264 High Compression & Quality",
"ProfileName": "High Compression & Quality (x264 AAC)",
"ProfileAuthor": "Anime4000",
"Container": "mp4",
"Video": {
Expand Down
12 changes: 6 additions & 6 deletions IFME/Profiles/Profile_0000-00-00_00-00-00_0002.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"ProfileName": "AV1 High Compression & Quality",
"ProfileName": "High Compression & Quality (x265 AAC)",
"ProfileAuthor": "Anime4000",
"Container": "webm",
"Container": "mkv",
"Video": {
"Encoder": {
"Id": "deadbeef-0011-0011-0011-001100110011",
"Id": "deadbeef-0265-0265-0265-026502650265",
"Preset": "veryslow",
"Tune": "psnr",
"Mode": 0,
"Value": 23.5,
"Value": 24.0,
"MultiPass": 2,
"Command": ""
"Command": "--pme --pmode"
},
"Quality": {
"Width": 0,
Expand All @@ -29,7 +29,7 @@
},
"Audio": {
"Encoder": {
"Id": "deadface-f154-f154-f154-f154f154f154",
"Id": "deadbeef-0aac-0aac-0aac-0aac0aac0aac",
"Mode": 0,
"Quality": 128,
"SampleRate": 44100,
Expand Down
43 changes: 43 additions & 0 deletions IFME/Profiles/Profile_0000-00-00_00-00-00_0003.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"ProfileName": "HDR to SDR YUV420 (x265 AAC)",
"ProfileAuthor": "Anime4000",
"Container": "mkv",
"Video": {
"Encoder": {
"Id": "deadbeef-0265-0265-0265-026502650265",
"Preset": "veryslow",
"Tune": "psnr",
"Mode": 0,
"Value": 23,
"MultiPass": 2,
"Command": "--pme --pmode"
},
"Quality": {
"Width": 0,
"Height": 0,
"FrameRate": 0,
"BitDepth": 8,
"PixelFormat": 420,
"Command": "",
"CommandFilter": "zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p"
},
"DeInterlace": {
"Enable": false,
"Field": 0,
"Mode": 1
}
},
"Audio": {
"Encoder": {
"Id": "deadbeef-0aac-0aac-0aac-0aac0aac0aac",
"Mode": 0,
"Quality": 128,
"SampleRate": 44100,
"Channel": 2,
"Command": ""
},
"Copy": false,
"Command": "",
"CommandFilter": ""
}
}
43 changes: 43 additions & 0 deletions IFME/Profiles/Profile_0000-00-00_00-00-00_0004.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"ProfileName": "HDR to SDR YUV444 (x265 AAC)",
"ProfileAuthor": "Anime4000",
"Container": "mkv",
"Video": {
"Encoder": {
"Id": "deadbeef-0265-0265-0265-026502650265",
"Preset": "veryslow",
"Tune": "psnr",
"Mode": 0,
"Value": 23,
"MultiPass": 2,
"Command": "--pme --pmode"
},
"Quality": {
"Width": 0,
"Height": 0,
"FrameRate": 0,
"BitDepth": 8,
"PixelFormat": 444,
"Command": "",
"CommandFilter": "zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv444p"
},
"DeInterlace": {
"Enable": false,
"Field": 0,
"Mode": 1
}
},
"Audio": {
"Encoder": {
"Id": "deadbeef-0aac-0aac-0aac-0aac0aac0aac",
"Mode": 0,
"Quality": 128,
"SampleRate": 44100,
"Channel": 2,
"Command": ""
},
"Copy": false,
"Command": "",
"CommandFilter": ""
}
}

0 comments on commit a7ba8c4

Please sign in to comment.