├── Inno_Setup_Compiler.iss ├── NotEnoughAV1Encodes ├── MediaInfo │ └── MediaInfo.dll ├── resources │ ├── img │ │ ├── pause.png │ │ ├── queue.png │ │ ├── save.png │ │ ├── start.png │ │ ├── stop.png │ │ ├── video.png │ │ ├── folder.png │ │ ├── neav1e.ico │ │ ├── resume.png │ │ ├── settings.png │ │ └── videoplaceholder.jpg │ ├── lang │ │ └── LocalizedStrings.cs │ ├── Settings.cs │ ├── MediaLanguages.cs │ └── Global.cs ├── Encoders │ ├── Encoder.cs │ ├── AVCFFmpeg.cs │ ├── HEVCFFmpeg.cs │ ├── NVEnc.cs │ ├── QSVEnc.cs │ ├── SvtAV1FFmpeg.cs │ ├── SvtAV1.cs │ ├── Rav1eFFmpeg.cs │ ├── Rav1e.cs │ ├── VpxVP9FFmpeg.cs │ ├── AMFAV1.cs │ ├── Aomenc.cs │ └── AOMAV1FFmpeg.cs ├── Queue │ ├── ChunkProgress.cs │ ├── ChunkVMAF.cs │ └── QueueElement.cs ├── Controls │ ├── SubtitlesTab.xaml.cs │ ├── ChunkingTab.xaml.cs │ ├── Partials │ │ ├── VideoTabOptimization.xaml │ │ ├── VideoTabOptimization.xaml.cs │ │ └── VideoTabVideo.xaml │ ├── AudioTab.xaml.cs │ ├── AdvancedTab.xaml.cs │ ├── HDRTab.xaml.cs │ ├── MainWindowTopButtons.xaml │ ├── SubtitlesTab.xaml │ ├── AudioTab.xaml │ ├── SummaryTab.xaml │ ├── SummaryTab.xaml.cs │ ├── QueueTab.xaml │ └── FiltersTab.xaml ├── App.xaml.cs ├── Video │ └── Encoder.cs ├── AssemblyInfo.cs ├── Audio │ ├── AudioTracks.cs │ ├── CommandGenerator.cs │ └── EncodeAudio.cs ├── Views │ ├── FirstStartup.xaml.cs │ ├── TestCustomSettings.xaml │ ├── OpenSource.xaml │ ├── OpenSource.xaml.cs │ ├── SavePresetDialog.xaml.cs │ ├── FirstStartup.xaml │ ├── TestCustomSettings.xaml.cs │ ├── BatchFolderDialog.xaml │ ├── BatchFolderDialog.xaml.cs │ ├── ProgramSettings.xaml.cs │ └── SavePresetDialog.xaml ├── App.xaml ├── win32 │ ├── IdleDetection.cs │ ├── Suspend.cs │ └── Resume.cs ├── Subtitle │ ├── SubtitleTracks.cs │ ├── CommandGenerator.cs │ └── ExtractSubtitles.cs ├── MainWindow.xaml └── NotEnoughAV1Encodes.csproj ├── appveyor.yml ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── LICENSE ├── NotEnoughAV1Encodes.sln ├── README.md ├── .gitattributes └── .gitignore /Inno_Setup_Compiler.iss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/Inno_Setup_Compiler.iss -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/MediaInfo/MediaInfo.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/MediaInfo/MediaInfo.dll -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/img/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/resources/img/pause.png -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/img/queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/resources/img/queue.png -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/img/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/resources/img/save.png -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/img/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/resources/img/start.png -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/img/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/resources/img/stop.png -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/img/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/resources/img/video.png -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/img/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/resources/img/folder.png -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/img/neav1e.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/resources/img/neav1e.ico -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/img/resume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/resources/img/resume.png -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/img/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/resources/img/settings.png -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/img/videoplaceholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alkl58/NotEnoughAV1Encodes/HEAD/NotEnoughAV1Encodes/resources/img/videoplaceholder.jpg -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Encoders/Encoder.cs: -------------------------------------------------------------------------------- 1 | namespace NotEnoughAV1Encodes.Encoders 2 | { 3 | interface IEncoder 4 | { 5 | string GetCommand(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Queue/ChunkProgress.cs: -------------------------------------------------------------------------------- 1 | namespace NotEnoughAV1Encodes.Queue 2 | { 3 | public class ChunkProgress 4 | { 5 | public string ChunkName { get; set; } 6 | public long Progress { get; set; } = 0; 7 | public long ProgressSecondPass { get; set; } = 0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Controls/SubtitlesTab.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace NotEnoughAV1Encodes.Controls 4 | { 5 | public partial class SubtitlesTab : UserControl 6 | { 7 | public SubtitlesTab() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace NotEnoughAV1Encodes 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Queue/ChunkVMAF.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Windows.Documents; 3 | 4 | namespace NotEnoughAV1Encodes.Queue 5 | { 6 | public class ChunkVMAF 7 | { 8 | public string ChunkName { get; set; } 9 | public string CalculatedQuantizer { get; set; } 10 | public List QValues { get; set; } 11 | public List VMAFValues { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Video/Encoder.cs: -------------------------------------------------------------------------------- 1 | namespace NotEnoughAV1Encodes.Video 2 | { 3 | public enum Encoders 4 | { 5 | AOMFFMPEG = 0, 6 | RAV1EFFMPEG = 1, 7 | SVTAV1FFMPEG = 2, 8 | VPXVP9FFMPEG = 3, 9 | AOMENC = 5, 10 | RAV1E = 6, 11 | SVTAV1 = 7, 12 | X265 = 9, 13 | X264 = 10, 14 | QSVAV1 = 12, 15 | NVENCAV1 = 13, 16 | AMFAV1 = 14, 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.3.{build} 2 | image: Visual Studio 2022 3 | configuration: Release 4 | assembly_info: 5 | patch: true 6 | file: AssemblyInfo.* 7 | assembly_version: "1.3.{build}" 8 | assembly_file_version: "{version}" 9 | assembly_informational_version: "{version}" 10 | build: 11 | verbosity: minimal 12 | before_build: 13 | - nuget restore 14 | artifacts: 15 | - path: '\NotEnoughAV1Encodes\bin\Release\' 16 | name: NotEnoughAV1Encodes 17 | skip_commits: 18 | files: 19 | - README.md 20 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Controls/ChunkingTab.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | using System.Windows.Controls; 3 | using System.Windows.Input; 4 | 5 | namespace NotEnoughAV1Encodes.Controls 6 | { 7 | public partial class ChunkingTab : UserControl 8 | { 9 | public ChunkingTab() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void NumberValidationTextBox(object sender, TextCompositionEventArgs e) 15 | { 16 | // Validates that the TextBox Input are only numbers 17 | Regex regex = new("[^0-9]+"); 18 | e.Handled = regex.IsMatch(e.Text); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Audio/AudioTracks.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NotEnoughAV1Encodes.Audio 4 | { 5 | public class AudioTracks 6 | { 7 | public bool Active { get; set; } 8 | public int Index { get; set; } 9 | public int Codec { get; set; } 10 | public int Channels { get; set; } 11 | public string Bitrate { get; set; } 12 | public string Language { get; set; } 13 | public List Languages { get; set; } 14 | public string CustomName { get; set; } 15 | public bool PCM { get; set; } 16 | public bool External { get; set; } 17 | public string ExternalPath { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[Feature]" 5 | labels: enhancement 6 | assignees: Alkl58 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/resources/lang/LocalizedStrings.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using WPFLocalizeExtension.Engine; 3 | 4 | namespace NotEnoughAV1Encodes.resources.lang 5 | { 6 | public class LocalizedStrings 7 | { 8 | public static LocalizedStrings Instance { get; } = new LocalizedStrings(); 9 | 10 | public static void SetCulture(CultureInfo cultureInfo) 11 | { 12 | LocalizeDictionary.Instance.Culture = cultureInfo; 13 | } 14 | 15 | public string this[string key] 16 | { 17 | get 18 | { 19 | var result = LocalizeDictionary.Instance.GetLocalizedObject("NotEnoughAV1Encodes", "Strings", key, LocalizeDictionary.Instance.Culture); 20 | return result as string; 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG] " 5 | labels: bug 6 | assignees: Alkl58 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Log File** 27 | If possible, upload the log generated by the program here. 28 | 29 | **Desktop (please complete the following information):** 30 | - OS: [e.g. Win10 20H1] 31 | - NEAV1E Version: [e.g. v1.9] 32 | 33 | **Additional context** 34 | Add any other context about the problem here. 35 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Views/FirstStartup.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Windows; 4 | using MahApps.Metro.Controls; 5 | using Newtonsoft.Json; 6 | 7 | namespace NotEnoughAV1Encodes.Views 8 | { 9 | public partial class FirstStartup : MetroWindow 10 | { 11 | readonly Settings _settingsDB; 12 | public FirstStartup(Settings settingsDB) 13 | { 14 | InitializeComponent(); 15 | _settingsDB = settingsDB; 16 | } 17 | 18 | private void ButtonClose_Click(object sender, RoutedEventArgs e) 19 | { 20 | try 21 | { 22 | Directory.CreateDirectory(Path.Combine(Global.AppData, "NEAV1E")); 23 | File.WriteAllText(Path.Combine(Global.AppData, "NEAV1E", "settings.json"), JsonConvert.SerializeObject(_settingsDB, Formatting.Indented)); 24 | } 25 | catch (Exception ex) { MessageBox.Show(ex.Message); } 26 | Close(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Encoders/AVCFFmpeg.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace NotEnoughAV1Encodes.Encoders 4 | { 5 | class AVCFFmpeg : IEncoder 6 | { 7 | public string GetCommand() 8 | { 9 | // Get MainWindow instance to access UI elements 10 | MainWindow mainWindow = Application.Current.MainWindow as MainWindow; 11 | 12 | string settings = "-c:v libx264"; 13 | 14 | // Quality / Bitrate Selection 15 | string quality = mainWindow.VideoTabVideoQualityControl.ComboBoxQualityModeX26x.SelectedIndex switch 16 | { 17 | 0 => " -crf " + mainWindow.VideoTabVideoQualityControl.SliderQualityX26x.Value, 18 | 1 => " -b:v " + mainWindow.VideoTabVideoQualityControl.TextBoxBitrateX26x.Text + "k", 19 | _ => "" 20 | }; 21 | 22 | // Preset 23 | settings += quality + " -preset " + mainWindow.GenerateMPEGEncoderSpeed(); 24 | 25 | return settings; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Encoders/HEVCFFmpeg.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace NotEnoughAV1Encodes.Encoders 4 | { 5 | class HEVCFFmpeg : IEncoder 6 | { 7 | public string GetCommand() 8 | { 9 | // Get MainWindow instance to access UI elements 10 | MainWindow mainWindow = Application.Current.MainWindow as MainWindow; 11 | 12 | string settings = "-c:v libx265"; 13 | 14 | // Quality / Bitrate Selection 15 | string quality = mainWindow.VideoTabVideoQualityControl.ComboBoxQualityModeX26x.SelectedIndex switch 16 | { 17 | 0 => " -crf " + mainWindow.VideoTabVideoQualityControl.SliderQualityX26x.Value, 18 | 1 => " -b:v " + mainWindow.VideoTabVideoQualityControl.TextBoxBitrateX26x.Text + "k", 19 | _ => "" 20 | }; 21 | 22 | // Preset 23 | settings += quality + " -preset " + mainWindow.GenerateMPEGEncoderSpeed(); 24 | 25 | return settings; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Alkl58 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/win32/IdleDetection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Runtime.InteropServices; 4 | 5 | namespace NotEnoughAV1Encodes.win32 6 | { 7 | internal class IdleDetection 8 | { 9 | public static TimeSpan GetInputIdleTime() 10 | { 11 | var plii = new NativeMethods.LastInputInfo(); 12 | plii.cbSize = (UInt32)Marshal.SizeOf(plii); 13 | 14 | if (NativeMethods.GetLastInputInfo(ref plii)) 15 | { 16 | return TimeSpan.FromMilliseconds(Environment.TickCount64 - plii.dwTime); 17 | } 18 | else 19 | { 20 | throw new Win32Exception(Marshal.GetLastWin32Error()); 21 | } 22 | } 23 | 24 | private static class NativeMethods 25 | { 26 | public struct LastInputInfo 27 | { 28 | public UInt32 cbSize; 29 | public UInt32 dwTime; 30 | } 31 | 32 | [DllImport("user32.dll")] 33 | public static extern bool GetLastInputInfo(ref LastInputInfo plii); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29806.167 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotEnoughAV1Encodes", "NotEnoughAV1Encodes\NotEnoughAV1Encodes.csproj", "{085F1D3A-00C7-41A3-B985-2195B078A364}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {085F1D3A-00C7-41A3-B985-2195B078A364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {085F1D3A-00C7-41A3-B985-2195B078A364}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {085F1D3A-00C7-41A3-B985-2195B078A364}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {085F1D3A-00C7-41A3-B985-2195B078A364}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {5F34AA94-003F-4244-9116-077051CD707C} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Subtitle/SubtitleTracks.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | 4 | namespace NotEnoughAV1Encodes.Subtitle 5 | { 6 | public class SubtitleTracks : INotifyPropertyChanged 7 | { 8 | public event PropertyChangedEventHandler PropertyChanged; 9 | private bool _active = true; 10 | private bool _enabled = true; 11 | public bool Active { 12 | get => _active; 13 | set { _active = value; NotifyPropertyChanged("Active"); } 14 | } 15 | public bool Enabled 16 | { 17 | get => _enabled; 18 | set { _enabled = value; NotifyPropertyChanged("Enabled"); } 19 | } 20 | public int Index { get; set; } 21 | public string Language { get; set; } 22 | public List Languages { get; set; } 23 | public string CustomName { get; set; } 24 | public bool Default { get; set; } 25 | public bool BurnIn { get; set; } 26 | public bool PictureBased { get; set; } 27 | 28 | private void NotifyPropertyChanged(string property) 29 | { 30 | if (PropertyChanged != null) 31 | { 32 | PropertyChanged(this, new PropertyChangedEventArgs(property)); 33 | PropertyChanged(this, new PropertyChangedEventArgs("DisplayMember")); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Views/TestCustomSettings.xaml: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 46 | 47 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Audio/EncodeAudio.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.IO; 4 | using System.Threading; 5 | 6 | namespace NotEnoughAV1Encodes.Audio 7 | { 8 | class EncodeAudio 9 | { 10 | public void Encode(Queue.QueueElement queueElement, CancellationToken _token) 11 | { 12 | Global.Logger("DEBUG - EncodeAudio.Encode()", queueElement.Output + ".log"); 13 | if (queueElement.AudioCommand != null && !File.Exists(Path.Combine(Global.Temp, "NEAV1E", queueElement.UniqueIdentifier, "Audio", "exit.log"))) 14 | { 15 | Directory.CreateDirectory(Path.Combine(Global.Temp, "NEAV1E", queueElement.UniqueIdentifier, "Audio")); 16 | 17 | Global.Logger("INFO - EncodeAudio.Encode() => Command: " + queueElement.AudioCommand, queueElement.Output + ".log"); 18 | 19 | string externalInput = ""; 20 | foreach (AudioTracks audioTrack in queueElement.VideoDB.AudioTracks) 21 | { 22 | if (!audioTrack.External) continue; 23 | externalInput += " -i \"" + audioTrack.ExternalPath + "\""; 24 | } 25 | 26 | Process processAudio = new(); 27 | ProcessStartInfo startInfo = new() 28 | { 29 | WindowStyle = ProcessWindowStyle.Hidden, 30 | FileName = "cmd.exe", 31 | WorkingDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Apps", "FFmpeg"), 32 | Arguments = "/C ffmpeg.exe -y -analyzeduration 100M -probesize 100M -i \"" + queueElement.VideoDB.InputPath + "\" " + externalInput + " -vn -sn -map_metadata -1 " + queueElement.AudioCommand + " \"" + Path.Combine(Global.Temp, "NEAV1E", queueElement.UniqueIdentifier, "Audio", "audio.mkv") + "\"", 33 | RedirectStandardError = true, 34 | RedirectStandardInput = true, 35 | CreateNoWindow = true 36 | }; 37 | processAudio.StartInfo = startInfo; 38 | 39 | _token.Register(() => { try { processAudio.StandardInput.Write("q"); } catch { } }); 40 | 41 | processAudio.Start(); 42 | 43 | StreamReader sr = processAudio.StandardError; 44 | string stderr = "\n"; 45 | while (!sr.EndOfStream) 46 | { 47 | string line = sr.ReadLine(); 48 | if (!line.Contains("time=")) 49 | stderr += line + "\n"; 50 | int processedFrames = Global.GetTotalTimeProcessed(line, queueElement); 51 | if (processedFrames != 0) 52 | { 53 | queueElement.Progress = Convert.ToDouble(processedFrames); 54 | queueElement.Status = "Encoding Audio - " + ((decimal)queueElement.Progress / queueElement.FrameCount).ToString("0.00%"); 55 | } 56 | } 57 | 58 | processAudio.WaitForExit(); 59 | 60 | // Reset Progressbar 61 | queueElement.Progress = 0.00; 62 | 63 | if (processAudio.ExitCode == 0 && _token.IsCancellationRequested == false) 64 | { 65 | var logFile = File.Create(Path.Combine(Global.Temp, "NEAV1E", queueElement.UniqueIdentifier, "Audio", "exit.log")); 66 | logFile.Close(); 67 | Global.Logger("DEBUG - EncodeAudio.Encode() => ExitCode: " + processAudio.ExitCode, queueElement.Output + ".log"); 68 | } 69 | else 70 | { 71 | queueElement.Error = true; 72 | queueElement.ErrorCount += 1; 73 | Global.Logger("FATAL - EncodeAudio.Encode() => ExitCode: " + processAudio.ExitCode, queueElement.Output + ".log"); 74 | Global.Logger("==========================================================" + stderr, queueElement.Output + ".log"); 75 | Global.Logger("==========================================================", queueElement.Output + ".log"); 76 | } 77 | } 78 | else 79 | { 80 | Global.Logger("WARN - EncodeAudio.Encode() => File already exist - Resuming?", queueElement.Output + ".log"); 81 | } 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Controls/SubtitlesTab.xaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Controls/Partials/VideoTabOptimization.xaml.cs: -------------------------------------------------------------------------------- 1 | using NotEnoughAV1Encodes.Encoders; 2 | using System.Windows; 3 | using System.Windows.Controls; 4 | 5 | namespace NotEnoughAV1Encodes.Controls.Partials 6 | { 7 | public partial class VideoTabOptimization : UserControl 8 | { 9 | public VideoTabOptimization() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void SliderEncoderPreset_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) 15 | { 16 | UpdateSpeedLabel(); 17 | } 18 | 19 | public void UpdateSpeedLabel() 20 | { 21 | if (MainWindow.startupLock) return; 22 | 23 | // Get MainWindow instance to access UI elements 24 | MainWindow mainWindow = Application.Current.MainWindow as MainWindow; 25 | 26 | // Shows / Hides Real Time Mode CheckBox 27 | if (CheckBoxRealTimeMode != null && mainWindow.VideoTabVideoPartialControl.ComboBoxVideoEncoder != null) 28 | { 29 | if (mainWindow.VideoTabVideoPartialControl.ComboBoxVideoEncoder.SelectedIndex == (int)Video.Encoders.AOMFFMPEG || mainWindow.VideoTabVideoPartialControl.ComboBoxVideoEncoder.SelectedIndex == (int)Video.Encoders.AOMENC) 30 | { 31 | if (SliderEncoderPreset.Value >= 5) 32 | { 33 | CheckBoxRealTimeMode.Visibility = Visibility.Visible; 34 | } 35 | else 36 | { 37 | CheckBoxRealTimeMode.IsOn = false; 38 | CheckBoxRealTimeMode.Visibility = Visibility.Collapsed; 39 | } 40 | } 41 | else 42 | { 43 | CheckBoxRealTimeMode.Visibility = Visibility.Collapsed; 44 | } 45 | } 46 | 47 | LabelSpeedValue.Content = SliderEncoderPreset.Value; 48 | 49 | // x264 / x265 50 | if (mainWindow.VideoTabVideoPartialControl.ComboBoxVideoEncoder.SelectedIndex is (int)Video.Encoders.X265 or (int)Video.Encoders.X264) 51 | { 52 | LabelSpeedValue.Content = mainWindow.GenerateMPEGEncoderSpeed(); 53 | } 54 | 55 | // av1 hardware (Intel Arc) 56 | if (mainWindow.VideoTabVideoPartialControl.ComboBoxVideoEncoder.SelectedIndex is (int)Video.Encoders.QSVAV1) 57 | { 58 | LabelSpeedValue.Content = mainWindow.GenerateQuickSyncEncoderSpeed(); 59 | } 60 | 61 | // av1 hardware (nvenc rtx 4000) 62 | if (mainWindow.VideoTabVideoPartialControl.ComboBoxVideoEncoder.SelectedIndex is (int)Video.Encoders.NVENCAV1) 63 | { 64 | LabelSpeedValue.Content = mainWindow.GenerateNVENCEncoderSpeed(); 65 | } 66 | 67 | // av1 hardware (AMD AMF) 68 | if (mainWindow.VideoTabVideoPartialControl.ComboBoxVideoEncoder.SelectedIndex is (int)Video.Encoders.AMFAV1) 69 | { 70 | LabelSpeedValue.Content = AMFAV1.GetSpeed(SliderEncoderPreset.Value); 71 | } 72 | } 73 | 74 | private void CheckBoxTwoPassEncoding_Toggled(object sender, RoutedEventArgs e) 75 | { 76 | if (MainWindow.startupLock) return; 77 | 78 | // Get MainWindow instance to access UI elements 79 | MainWindow mainWindow = Application.Current.MainWindow as MainWindow; 80 | 81 | if (mainWindow.VideoTabVideoPartialControl.ComboBoxVideoEncoder.SelectedIndex == (int)Video.Encoders.SVTAV1 && mainWindow.VideoTabVideoQualityControl.ComboBoxQualityModeSVTAV1.SelectedIndex == 0 && CheckBoxTwoPassEncoding.IsOn) 82 | { 83 | CheckBoxTwoPassEncoding.IsOn = false; 84 | } 85 | 86 | if (mainWindow.VideoTabVideoPartialControl.ComboBoxVideoEncoder.SelectedIndex == (int)Video.Encoders.SVTAV1FFMPEG && mainWindow.VideoTabVideoQualityControl.ComboBoxQualityModeSVTAV1FFMPEG.SelectedIndex == 0 && CheckBoxTwoPassEncoding.IsOn) 87 | { 88 | CheckBoxTwoPassEncoding.IsOn = false; 89 | } 90 | 91 | if (CheckBoxRealTimeMode.IsOn && CheckBoxTwoPassEncoding.IsOn) 92 | { 93 | CheckBoxTwoPassEncoding.IsOn = false; 94 | } 95 | } 96 | 97 | private void CheckBoxRealTimeMode_Toggled(object sender, RoutedEventArgs e) 98 | { 99 | // Reverts to 1 Pass encoding if Real Time Mode is activated 100 | if (CheckBoxRealTimeMode.IsOn && CheckBoxTwoPassEncoding.IsOn) 101 | { 102 | CheckBoxTwoPassEncoding.IsOn = false; 103 | } 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Views/BatchFolderDialog.xaml: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | 37 | 38 | 39 | 45 | 51 | 52 | 53 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Views/BatchFolderDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using ControlzEx.Theming; 2 | using MahApps.Metro.Controls; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Windows; 7 | 8 | namespace NotEnoughAV1Encodes.Views 9 | { 10 | public partial class BatchFolderDialog : MetroWindow 11 | { 12 | public bool Quit { get; set; } 13 | public bool PresetBitdepth { get; set; } 14 | public bool ActivateSubtitles { get; set; } = true; 15 | public bool MirrorFolderStructure { get; set; } 16 | public string Input { get; set; } 17 | public string Preset { get; set; } 18 | public string Output { get; set; } 19 | public int Container { get; set; } 20 | 21 | public List Files = new(); 22 | 23 | private bool OutputSelected = false; 24 | 25 | public BatchFolderDialog(string theme, string folderPath, bool subfolders) 26 | { 27 | InitializeComponent(); 28 | try { ThemeManager.Current.ChangeTheme(this, theme); } catch { } 29 | 30 | Input = folderPath; 31 | 32 | SearchOption searchOption = SearchOption.TopDirectoryOnly; 33 | if (subfolders) 34 | { 35 | searchOption = SearchOption.AllDirectories; 36 | } 37 | 38 | // "Video Files|*.mp4;*.mkv;*.webm;*.flv;*.avi;*.mov;*.wmv; 39 | var files = Directory.EnumerateFiles(folderPath, "*.*", searchOption) 40 | .Where(s => s.ToLower().EndsWith(".mp4") || 41 | s.ToLower().EndsWith(".mkv") || 42 | s.ToLower().EndsWith(".webm") || 43 | s.ToLower().EndsWith(".flv") || 44 | s.ToLower().EndsWith(".avi") || 45 | s.ToLower().EndsWith(".mov") || 46 | s.ToLower().EndsWith(".wmv") || 47 | s.ToLower().EndsWith(".mpg") || 48 | s.ToLower().EndsWith(".ts")); 49 | 50 | foreach (var file in files) 51 | { 52 | ListBoxVideoItems.Items.Add(file); 53 | } 54 | 55 | // Load Presets 56 | if (Directory.Exists(Path.Combine(Global.AppData, "NEAV1E", "Presets"))) 57 | { 58 | string[] filePaths = Directory.GetFiles(Path.Combine(Global.AppData, "NEAV1E", "Presets"), "*.json", SearchOption.TopDirectoryOnly); 59 | 60 | foreach (string file in filePaths) 61 | { 62 | ComboBoxPresets.Items.Add(Path.GetFileNameWithoutExtension(file)); 63 | } 64 | 65 | try { ComboBoxPresets.SelectedIndex = 0; } catch { } 66 | } 67 | 68 | // Set Default Values 69 | ToggleSwitchUsePresetBitDepth.IsOn = true; 70 | } 71 | 72 | private void ButtonSelectDestination_Click(object sender, RoutedEventArgs e) 73 | { 74 | System.Windows.Forms.FolderBrowserDialog openFileDlg = new System.Windows.Forms.FolderBrowserDialog(); 75 | var result = openFileDlg.ShowDialog(); 76 | if (result.ToString() != string.Empty) 77 | { 78 | TextBoxDestination.Text = openFileDlg.SelectedPath; 79 | OutputSelected = true; 80 | } 81 | } 82 | 83 | private void ListBoxVideoItems_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) 84 | { 85 | if (ListBoxVideoItems.SelectedItem == null) return; 86 | if (e.Key == System.Windows.Input.Key.Delete) 87 | { 88 | ListBoxVideoItems.Items.Remove(ListBoxVideoItems.SelectedItem); 89 | } 90 | } 91 | 92 | private void QueueMenuItemDelete_Click(object sender, RoutedEventArgs e) 93 | { 94 | if (ListBoxVideoItems.SelectedItem == null) return; 95 | ListBoxVideoItems.Items.Remove(ListBoxVideoItems.SelectedItem); 96 | } 97 | 98 | private void ButtonAddToQueue_Click(object sender, RoutedEventArgs e) 99 | { 100 | // Return if Output is not selected 101 | if (!OutputSelected) 102 | { 103 | 104 | MessageBoxResult result = MessageBox.Show("Please select a Destination!", "Error", MessageBoxButton.YesNo); 105 | if (result == MessageBoxResult.Yes) 106 | { 107 | ButtonSelectDestination_Click(sender, e); 108 | } 109 | return; 110 | } 111 | else 112 | { 113 | foreach (string files in ListBoxVideoItems.Items) Files.Add(files); 114 | Container = ComboBoxContainer.SelectedIndex; 115 | Preset = ComboBoxPresets.SelectedItem.ToString(); 116 | Output = TextBoxDestination.Text; 117 | PresetBitdepth = ToggleSwitchUsePresetBitDepth.IsOn; 118 | ActivateSubtitles = ToggleSwitchActivateSubtitles.IsOn; 119 | MirrorFolderStructure = ToggleSwitchMirrorFolderStructure.IsOn; 120 | Quit = true; 121 | Close(); 122 | } 123 | } 124 | 125 | private void ButtonCancelEncode_Click(object sender, System.Windows.RoutedEventArgs e) 126 | { 127 | Close(); 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Encoders/Aomenc.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Windows; 3 | 4 | namespace NotEnoughAV1Encodes.Encoders 5 | { 6 | class Aomenc : IEncoder 7 | { 8 | public string GetCommand() 9 | { 10 | // Get MainWindow instance to access UI elements 11 | MainWindow mainWindow = Application.Current.MainWindow as MainWindow; 12 | 13 | string settings = "-f yuv4mpegpipe - | " + 14 | "\"" + Path.Combine(Directory.GetCurrentDirectory(), "Apps", "aomenc", "aomenc.exe") + "\" -"; 15 | 16 | // Quality / Bitrate Selection 17 | string quality = mainWindow.VideoTabVideoQualityControl.ComboBoxQualityModeAOMENC.SelectedIndex switch 18 | { 19 | 0 => " --cq-level=" + mainWindow.VideoTabVideoQualityControl.SliderQualityAOMENC.Value + " --end-usage=q", 20 | 1 => " --cq-level=" + mainWindow.VideoTabVideoQualityControl.SliderQualityAOMENC.Value + " --target-bitrate=" + mainWindow.VideoTabVideoQualityControl.TextBoxBitrateAOMENC.Text + " --end-usage=cq", 21 | 2 => " --target-bitrate=" + mainWindow.VideoTabVideoQualityControl.TextBoxBitrateAOMENC.Text + " --end-usage=vbr", 22 | 3 => " --target-bitrate=" + mainWindow.VideoTabVideoQualityControl.TextBoxBitrateAOMENC.Text + " --end-usage=cbr", 23 | _ => "" 24 | }; 25 | 26 | // Preset 27 | settings += quality + " --cpu-used=" + mainWindow.VideoTabVideoOptimizationControl.SliderEncoderPreset.Value; 28 | 29 | // Advanced Settings 30 | if (mainWindow.VideoTabVideoOptimizationControl.ToggleSwitchAdvancedSettings.IsOn == false) 31 | { 32 | settings += " --threads=4 --tile-columns=2 --tile-rows=1 --kf-max-dist=" + mainWindow.VideoTabVideoPartialControl.GenerateKeyFrameInerval(); 33 | } 34 | else 35 | { 36 | settings += " --threads=" + mainWindow.AdvancedTabControl.ComboBoxAomencThreads.Text + // Threads 37 | " --tile-columns=" + mainWindow.AdvancedTabControl.ComboBoxAomencTileColumns.Text + // Tile Columns 38 | " --tile-rows=" + mainWindow.AdvancedTabControl.ComboBoxAomencTileRows.Text + // Tile Rows 39 | " --lag-in-frames=" + mainWindow.AdvancedTabControl.TextBoxAomencLagInFrames.Text + // Lag in Frames 40 | " --sharpness=" + mainWindow.AdvancedTabControl.ComboBoxAomencSharpness.Text + // Sharpness (Filter) 41 | " --aq-mode=" + mainWindow.AdvancedTabControl.ComboBoxAomencAQMode.SelectedIndex + // AQ-Mode 42 | " --enable-keyframe-filtering=" + mainWindow.AdvancedTabControl.ComboBoxAomencKeyFiltering.SelectedIndex + // Key Frame Filtering 43 | " --tune=" + mainWindow.AdvancedTabControl.ComboBoxAomencTune.Text + // Tune 44 | " --tune-content=" + mainWindow.AdvancedTabControl.ComboBoxAomencTuneContent.Text; // Tune-Content 45 | 46 | if (mainWindow.AdvancedTabControl.TextBoxAomencMaxGOP.Text != "0") 47 | settings += " --kf-max-dist=" + mainWindow.AdvancedTabControl.TextBoxAomencMaxGOP.Text; // Keyframe Interval 48 | if (mainWindow.AdvancedTabControl.CheckBoxAomencRowMT.IsChecked == false) 49 | settings += " --row-mt=0"; // Row Based Multithreading 50 | 51 | if (mainWindow.AdvancedTabControl.ComboBoxAomencColorPrimaries.SelectedIndex != 0) 52 | settings += " --color-primaries=" + mainWindow.AdvancedTabControl.ComboBoxAomencColorPrimaries.Text; // Color Primaries 53 | if (mainWindow.AdvancedTabControl.ComboBoxAomencColorTransfer.SelectedIndex != 0) 54 | settings += " --transfer-characteristics=" + mainWindow.AdvancedTabControl.ComboBoxAomencColorTransfer.Text; // Color Transfer 55 | if (mainWindow.AdvancedTabControl.ComboBoxAomencColorMatrix.SelectedIndex != 0) 56 | settings += " --matrix-coefficients=" + mainWindow.AdvancedTabControl.ComboBoxAomencColorMatrix.Text; // Color Matrix 57 | 58 | if (mainWindow.AdvancedTabControl.CheckBoxAomencCDEF.IsChecked == false) 59 | settings += " --enable-cdef=0"; // Constrained Directional Enhancement Filter 60 | 61 | if (mainWindow.AdvancedTabControl.CheckBoxAomencARNRMax.IsChecked == true) 62 | { 63 | settings += " --arnr-maxframes=" + mainWindow.AdvancedTabControl.ComboBoxAomencARNRMax.Text; // ARNR Maxframes 64 | settings += " --arnr-strength=" + mainWindow.AdvancedTabControl.ComboBoxAomencARNRStrength.Text; // ARNR Strength 65 | } 66 | 67 | if (mainWindow.VideoTabVideoOptimizationControl.CheckBoxRealTimeMode.IsOn) 68 | settings += " --rt"; // Real Time Mode 69 | } 70 | 71 | return settings; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Encoders/AOMAV1FFmpeg.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace NotEnoughAV1Encodes.Encoders 4 | { 5 | class AOMAV1FFmpeg : IEncoder 6 | { 7 | public string GetCommand() 8 | { 9 | // Get MainWindow instance to access UI elements 10 | MainWindow mainWindow = Application.Current.MainWindow as MainWindow; 11 | 12 | string settings = "-c:v libaom-av1"; 13 | 14 | // Quality / Bitrate Selection 15 | string quality = mainWindow.VideoTabVideoQualityControl.ComboBoxQualityMode.SelectedIndex switch 16 | { 17 | 0 => " -crf " + mainWindow.VideoTabVideoQualityControl.SliderQualityAOMFFMPEG.Value + " -b:v 0", 18 | 1 => " -crf " + mainWindow.VideoTabVideoQualityControl.SliderQualityAOMFFMPEG.Value + " -b:v " + mainWindow.VideoTabVideoQualityControl.TextBoxMaxBitrateAOMFFMPEG.Text + "k", 19 | 2 => " -b:v " + mainWindow.VideoTabVideoQualityControl.TextBoxMinBitrateAOMFFMPEG.Text + "k", 20 | 3 => " -minrate " + mainWindow.VideoTabVideoQualityControl.TextBoxMinBitrateAOMFFMPEG.Text + "k -b:v " + mainWindow.VideoTabVideoQualityControl.TextBoxAVGBitrateAOMFFMPEG.Text + "k -maxrate " + mainWindow.VideoTabVideoQualityControl.TextBoxMaxBitrateAOMFFMPEG.Text + "k", 21 | 4 => " -crf {q_vmaf} -b:v 0", 22 | _ => "" 23 | }; 24 | 25 | // Preset 26 | settings += quality + " -cpu-used " + mainWindow.VideoTabVideoOptimizationControl.SliderEncoderPreset.Value; 27 | 28 | // Advanced Settings 29 | if (mainWindow.VideoTabVideoOptimizationControl.ToggleSwitchAdvancedSettings.IsOn == false) 30 | { 31 | settings += " -threads 4 -tile-columns 2 -tile-rows 1 -g " + mainWindow.VideoTabVideoPartialControl.GenerateKeyFrameInerval(); 32 | } 33 | else 34 | { 35 | settings += " -threads " + mainWindow.AdvancedTabControl.ComboBoxAomencThreads.Text + // Threads 36 | " -tile-columns " + mainWindow.AdvancedTabControl.ComboBoxAomencTileColumns.Text + // Tile Columns 37 | " -tile-rows " + mainWindow.AdvancedTabControl.ComboBoxAomencTileRows.Text + // Tile Rows 38 | " -lag-in-frames " + mainWindow.AdvancedTabControl.TextBoxAomencLagInFrames.Text + // Lag in Frames 39 | " -aq-mode " + mainWindow.AdvancedTabControl.ComboBoxAomencAQMode.SelectedIndex + // AQ-Mode 40 | " -tune " + mainWindow.AdvancedTabControl.ComboBoxAomencTune.Text; // Tune 41 | 42 | if (mainWindow.AdvancedTabControl.TextBoxAomencMaxGOP.Text != "0") 43 | settings += " -g " + mainWindow.AdvancedTabControl.TextBoxAomencMaxGOP.Text; // Keyframe Interval 44 | if (mainWindow.AdvancedTabControl.CheckBoxAomencRowMT.IsChecked == false) 45 | settings += " -row-mt 0"; // Row Based Multithreading 46 | if (mainWindow.AdvancedTabControl.CheckBoxAomencCDEF.IsChecked == false) 47 | settings += " -enable-cdef 0"; // Constrained Directional Enhancement Filter 48 | if (mainWindow.VideoTabVideoOptimizationControl.CheckBoxRealTimeMode.IsOn) 49 | settings += " -usage realtime "; // Real Time Mode 50 | 51 | if (mainWindow.AdvancedTabControl.CheckBoxAomencARNRMax.IsChecked == true) 52 | { 53 | settings += " -arnr-max-frames " + mainWindow.AdvancedTabControl.ComboBoxAomencARNRMax.Text; // ARNR Maxframes 54 | settings += " -arnr-strength " + mainWindow.AdvancedTabControl.ComboBoxAomencARNRStrength.Text; // ARNR Strength 55 | } 56 | 57 | settings += " -aom-params " + 58 | "tune-content=" + mainWindow.AdvancedTabControl.ComboBoxAomencTuneContent.Text + // Tune-Content 59 | ":sharpness=" + mainWindow.AdvancedTabControl.ComboBoxAomencSharpness.Text + // Sharpness (Filter) 60 | ":enable-keyframe-filtering=" + mainWindow.AdvancedTabControl.ComboBoxAomencKeyFiltering.SelectedIndex; // Key Frame Filtering 61 | 62 | if (mainWindow.AdvancedTabControl.ComboBoxAomencColorPrimaries.SelectedIndex != 0) 63 | settings += ":color-primaries=" + mainWindow.AdvancedTabControl.ComboBoxAomencColorPrimaries.Text; // Color Primaries 64 | if (mainWindow.AdvancedTabControl.ComboBoxAomencColorTransfer.SelectedIndex != 0) 65 | settings += ":transfer-characteristics=" + mainWindow.AdvancedTabControl.ComboBoxAomencColorTransfer.Text; // Color Transfer 66 | if (mainWindow.AdvancedTabControl.ComboBoxAomencColorMatrix.SelectedIndex != 0) 67 | settings += ":matrix-coefficients=" + mainWindow.AdvancedTabControl.ComboBoxAomencColorMatrix.Text; // Color Matrix 68 | } 69 | 70 | return settings; 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Controls/Partials/VideoTabVideo.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Controls/AudioTab.xaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | [Aa][Rr][Mm]/ 24 | [Aa][Rr][Mm]64/ 25 | bld/ 26 | [Bb]in/ 27 | [Oo]bj/ 28 | [Ll]og/ 29 | 30 | # Visual Studio 2015/2017 cache/options directory 31 | .vs/ 32 | # Uncomment if you have tasks that create the project's static files in wwwroot 33 | #wwwroot/ 34 | 35 | # Visual Studio 2017 auto generated files 36 | Generated\ Files/ 37 | 38 | # MSTest test Results 39 | [Tt]est[Rr]esult*/ 40 | [Bb]uild[Ll]og.* 41 | 42 | # NUNIT 43 | *.VisualState.xml 44 | TestResult.xml 45 | 46 | # Build Results of an ATL Project 47 | [Dd]ebugPS/ 48 | [Rr]eleasePS/ 49 | dlldata.c 50 | 51 | # Benchmark Results 52 | BenchmarkDotNet.Artifacts/ 53 | 54 | # .NET Core 55 | project.lock.json 56 | project.fragment.lock.json 57 | artifacts/ 58 | 59 | # StyleCop 60 | StyleCopReport.xml 61 | 62 | # Files built by Visual Studio 63 | *_i.c 64 | *_p.c 65 | *_h.h 66 | *.ilk 67 | *.meta 68 | *.obj 69 | *.iobj 70 | *.pch 71 | *.pdb 72 | *.ipdb 73 | *.pgc 74 | *.pgd 75 | *.rsp 76 | *.sbr 77 | *.tlb 78 | *.tli 79 | *.tlh 80 | *.tmp 81 | *.tmp_proj 82 | *_wpftmp.csproj 83 | *.log 84 | *.vspscc 85 | *.vssscc 86 | .builds 87 | *.pidb 88 | *.svclog 89 | *.scc 90 | 91 | # Chutzpah Test files 92 | _Chutzpah* 93 | 94 | # Visual C++ cache files 95 | ipch/ 96 | *.aps 97 | *.ncb 98 | *.opendb 99 | *.opensdf 100 | *.sdf 101 | *.cachefile 102 | *.VC.db 103 | *.VC.VC.opendb 104 | 105 | # Visual Studio profiler 106 | *.psess 107 | *.vsp 108 | *.vspx 109 | *.sap 110 | 111 | # Visual Studio Trace Files 112 | *.e2e 113 | 114 | # TFS 2012 Local Workspace 115 | $tf/ 116 | 117 | # Guidance Automation Toolkit 118 | *.gpState 119 | 120 | # ReSharper is a .NET coding add-in 121 | _ReSharper*/ 122 | *.[Rr]e[Ss]harper 123 | *.DotSettings.user 124 | 125 | # JustCode is a .NET coding add-in 126 | .JustCode 127 | 128 | # TeamCity is a build add-in 129 | _TeamCity* 130 | 131 | # DotCover is a Code Coverage Tool 132 | *.dotCover 133 | 134 | # AxoCover is a Code Coverage Tool 135 | .axoCover/* 136 | !.axoCover/settings.json 137 | 138 | # Visual Studio code coverage results 139 | *.coverage 140 | *.coveragexml 141 | 142 | # NCrunch 143 | _NCrunch_* 144 | .*crunch*.local.xml 145 | nCrunchTemp_* 146 | 147 | # MightyMoose 148 | *.mm.* 149 | AutoTest.Net/ 150 | 151 | # Web workbench (sass) 152 | .sass-cache/ 153 | 154 | # Installshield output folder 155 | [Ee]xpress/ 156 | 157 | # DocProject is a documentation generator add-in 158 | DocProject/buildhelp/ 159 | DocProject/Help/*.HxT 160 | DocProject/Help/*.HxC 161 | DocProject/Help/*.hhc 162 | DocProject/Help/*.hhk 163 | DocProject/Help/*.hhp 164 | DocProject/Help/Html2 165 | DocProject/Help/html 166 | 167 | # Click-Once directory 168 | publish/ 169 | 170 | # Publish Web Output 171 | *.[Pp]ublish.xml 172 | *.azurePubxml 173 | # Note: Comment the next line if you want to checkin your web deploy settings, 174 | # but database connection strings (with potential passwords) will be unencrypted 175 | *.pubxml 176 | *.publishproj 177 | 178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 179 | # checkin your Azure Web App publish settings, but sensitive information contained 180 | # in these scripts will be unencrypted 181 | PublishScripts/ 182 | 183 | # NuGet Packages 184 | *.nupkg 185 | # The packages folder can be ignored because of Package Restore 186 | **/[Pp]ackages/* 187 | # except build/, which is used as an MSBuild target. 188 | !**/[Pp]ackages/build/ 189 | # Uncomment if necessary however generally it will be regenerated when needed 190 | #!**/[Pp]ackages/repositories.config 191 | # NuGet v3's project.json files produces more ignorable files 192 | *.nuget.props 193 | *.nuget.targets 194 | 195 | # Microsoft Azure Build Output 196 | csx/ 197 | *.build.csdef 198 | 199 | # Microsoft Azure Emulator 200 | ecf/ 201 | rcf/ 202 | 203 | # Windows Store app package directories and files 204 | AppPackages/ 205 | BundleArtifacts/ 206 | Package.StoreAssociation.xml 207 | _pkginfo.txt 208 | *.appx 209 | 210 | # Visual Studio cache files 211 | # files ending in .cache can be ignored 212 | *.[Cc]ache 213 | # but keep track of directories ending in .cache 214 | !?*.[Cc]ache/ 215 | 216 | # Others 217 | ClientBin/ 218 | ~$* 219 | *~ 220 | *.dbmdl 221 | *.dbproj.schemaview 222 | *.jfm 223 | *.pfx 224 | *.publishsettings 225 | orleans.codegen.cs 226 | 227 | # Including strong name files can present a security risk 228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 229 | #*.snk 230 | 231 | # Since there are multiple workflows, uncomment next line to ignore bower_components 232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 233 | #bower_components/ 234 | 235 | # RIA/Silverlight projects 236 | Generated_Code/ 237 | 238 | # Backup & report files from converting an old project file 239 | # to a newer Visual Studio version. Backup files are not needed, 240 | # because we have git ;-) 241 | _UpgradeReport_Files/ 242 | Backup*/ 243 | UpgradeLog*.XML 244 | UpgradeLog*.htm 245 | ServiceFabricBackup/ 246 | *.rptproj.bak 247 | 248 | # SQL Server files 249 | *.mdf 250 | *.ldf 251 | *.ndf 252 | 253 | # Business Intelligence projects 254 | *.rdl.data 255 | *.bim.layout 256 | *.bim_*.settings 257 | *.rptproj.rsuser 258 | *- Backup*.rdl 259 | 260 | # Microsoft Fakes 261 | FakesAssemblies/ 262 | 263 | # GhostDoc plugin setting file 264 | *.GhostDoc.xml 265 | 266 | # Node.js Tools for Visual Studio 267 | .ntvs_analysis.dat 268 | node_modules/ 269 | 270 | # Visual Studio 6 build log 271 | *.plg 272 | 273 | # Visual Studio 6 workspace options file 274 | *.opt 275 | 276 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 277 | *.vbw 278 | 279 | # Visual Studio LightSwitch build output 280 | **/*.HTMLClient/GeneratedArtifacts 281 | **/*.DesktopClient/GeneratedArtifacts 282 | **/*.DesktopClient/ModelManifest.xml 283 | **/*.Server/GeneratedArtifacts 284 | **/*.Server/ModelManifest.xml 285 | _Pvt_Extensions 286 | 287 | # Paket dependency manager 288 | .paket/paket.exe 289 | paket-files/ 290 | 291 | # FAKE - F# Make 292 | .fake/ 293 | 294 | # JetBrains Rider 295 | .idea/ 296 | *.sln.iml 297 | 298 | # CodeRush personal settings 299 | .cr/personal 300 | 301 | # Python Tools for Visual Studio (PTVS) 302 | __pycache__/ 303 | *.pyc 304 | 305 | # Cake - Uncomment if you are using it 306 | # tools/** 307 | # !tools/packages.config 308 | 309 | # Tabs Studio 310 | *.tss 311 | 312 | # Telerik's JustMock configuration file 313 | *.jmconfig 314 | 315 | # BizTalk build output 316 | *.btp.cs 317 | *.btm.cs 318 | *.odx.cs 319 | *.xsd.cs 320 | 321 | # OpenCover UI analysis results 322 | OpenCover/ 323 | 324 | # Azure Stream Analytics local run output 325 | ASALocalRun/ 326 | 327 | # MSBuild Binary and Structured Log 328 | *.binlog 329 | 330 | # NVidia Nsight GPU debugger configuration file 331 | *.nvuser 332 | 333 | # MFractors (Xamarin productivity tool) working folder 334 | .mfractor/ 335 | 336 | # Local History for Visual Studio 337 | .localhistory/ 338 | 339 | # BeatPulse healthcheck temp database 340 | healthchecksdb -------------------------------------------------------------------------------- /NotEnoughAV1Encodes/Controls/SummaryTab.xaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |