-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Greatly optimized the trimming feature (it was extremely inefficient before, it now trims before doing any other media processing) - Greatly improved the gif quality - Improved the file selection dialog (it's now less annoying to use) - Improved the config system (it's now contained in a single file) - Removed the webm format (the format is extremely slow to process with ffmpeg, if you need a webm, there are lots of converters that are faster) - Optimized code - Updated to yt-dlp 2023.03.04
- Loading branch information
Showing
11 changed files
with
931 additions
and
848 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
__ ___ ___ ___ __ __ | ||
/ |/ /__ ___/ (_)__ _/ _ \___ _ _____ / /__ ___ ____/ /__ ____ | ||
/ /|_/ / -_) _ / / _ `/ // / _ \ |/|/ / _ \/ / _ \/ _ `/ _ / -_) __/ | ||
/_/ /_/\__/\_,_/_/\_,_/____/\___/__,__/_//_/_/\___/\_,_/\_,_/\__/_/ | ||
/_/ /_/\__/\_,_/_/\_,_/____/\___/__,__/_//_/_/\___/\_,_/\_,_/\__/_/ __VERSION__ | ||
by o7q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
namespace MediaDownloader.Data | ||
{ | ||
public static class Storage | ||
{ | ||
public const string version = "v3.9.0"; | ||
|
||
public static string CONFIG_main = "MediaDownloader\\config\\config.md"; | ||
public static string CONFIG_lock = "MediaDownloader\\config\\_lock"; | ||
public static string CONFIG_base = "MediaDownloader\\config\\_base"; | ||
|
||
public static string WORKING_md = "MediaDownloader\\working\\md.bat"; | ||
public static string WORKING_md_header = "MediaDownloader\\working\\md_header"; | ||
|
||
public static string REDIST_ytdlp = "MediaDownloader\\yt-dlp.exe"; | ||
public static string REDIST_ffmpeg = "MediaDownloader\\ffmpeg.exe"; | ||
|
||
// downloads | ||
public static string baseQuality = " -b:v 100M -b:a 320K "; | ||
public static string state_downloading = "[DOWNLOADING]\n"; | ||
public static string state_preprocess = "[PRE-PROCESSING]\n"; | ||
public static string state_cpu1 = "[CPU PROCESSING - PASS 1]\n"; | ||
public static string state_cpu2 = "[CPU PROCESSING - PASS 2]\n"; | ||
public static string state_cpu3 = "[CPU PROCESSING - PASS 3]\n"; | ||
public static string state_gpu1 = "[GPU PROCESSING - PASS 1]\n"; | ||
public static string state_finished = "[FINISHED]\n"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
namespace MediaDownloader.Data | ||
{ | ||
public static class Structure | ||
{ | ||
public struct ConfigBase | ||
{ | ||
public string URL; | ||
public string DOWNLOAD_NAME; | ||
public int FORMAT_INDEX; | ||
public string DOWNLOAD_LOCATION; | ||
public bool USE_TIMEFRAME; | ||
public string TIMEFRAME_START; | ||
public string TIMEFRAME_END; | ||
public string GIF_RESOLUTION; | ||
public string GIF_FRAMERATE; | ||
public bool USE_GPU_ENCODER; | ||
public string GPU_ENCODER; | ||
public string YTDLP_ARGUMENTS; | ||
public bool USE_DISPLAY_OUTPUT; | ||
public bool USE_KEEP_OUTPUT; | ||
public bool USE_CPU_ENCODER; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace MediaDownloader.Data | ||
{ | ||
public static class Variables | ||
{ | ||
// program attributes | ||
public static string title = ""; | ||
|
||
// batch configuration | ||
public static string downloadName = ""; | ||
public static string downloadScript = ""; | ||
public static string baseArguments = ""; | ||
public static bool useDefaultLocation = true; | ||
|
||
// redist check | ||
public static bool ytdlpCheck = false; | ||
public static bool ffmpegCheck = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Windows.Forms; | ||
|
||
namespace MediaDownloader.Tools | ||
{ | ||
public static class Error | ||
{ | ||
public static void redistError(string errMsg) | ||
{ | ||
MessageBox.Show("\"" + errMsg + "\" was not found! Exiting MediaDownloader.\n\nMake sure you have \"yt-dlp.exe\" and \"ffmpeg.exe\" in a folder named \"MediaDownloader\" next to \"MediaDownloader.exe\".\nIf you are using scoop please make sure you have installed everything correctly."); | ||
Environment.Exit(1); | ||
} | ||
|
||
public static void installError(string file, Exception ex) | ||
{ | ||
MessageBox.Show("Error while installing \"" + file + "\" from scoop!\n\nFull Error:\n" + ex); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Linq; | ||
|
||
namespace MediaDownloader.Tools | ||
{ | ||
public static class Text | ||
{ | ||
public static string omitCharacter(string input) | ||
{ | ||
string[] invalidChars = { "0x7f" }; | ||
for (int i = 0; i < invalidChars.Length; i++) | ||
{ | ||
char badChar = (char)Convert.ToUInt32(invalidChars[i], 16); | ||
if (input.Contains(badChar)) | ||
input = input.Replace(badChar.ToString(), ""); | ||
} | ||
|
||
return input; | ||
} | ||
|
||
public static string repeatString(string charIn, int amount) | ||
{ | ||
string output = ""; | ||
for (int i = 0; i <= amount; i++) output += charIn; | ||
return output; | ||
} | ||
} | ||
} |
Oops, something went wrong.