Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int recordyoutubelive()
- {
- powershellExecutionPolicy();
- std::string doubleslash = "\\";
- std::string doublequote = "\"";
- std::string ddqsdq = "\"\" \"";
- std::string taskk = "C:\\Windows\\System32\\cmd.exe " + doublequote;
- std::string task = doublequote + taskk;
- std::wstring progpath = functions::s2ws(task);
- LPCWSTR lpprogpath = progpath.c_str();
- std::string taskdirectory = Directory::get_current_dir();
- std::string namesfiles0 = "cmd /c start " + ddqsdq;
- std::string namesfiles1 = namesfiles0 + taskdirectory;
- std::string namesfiles2 = namesfiles1 + "\\ffmpeg.exe";
- std::string namesfiles3 = namesfiles2 + doublequote;
- std::string commandsi = " -i ";
- std::string commands1 = namesfiles3 + commandsi;
- std::string currentprofile3 = commands1 + manifestlink;
- std::string currentprofile4 = currentprofile3 + " -c copy ";
- std::string commands11 = currentprofile4 + doublequote;
- std::string commands12 = commands11 + outputyt;
- std::string commands13 = commands12 + "(Video_by_Thunder).mp4";
- std::string commands14 = commands13 + doublequote;
- std::wstring commandd = functions::s2ws(commands14);
- LPCWSTR lpcommand = commandd.c_str();
- ShellExecute(0, L"open", lpprogpath, lpcommand, 0, /*SW_HIDE*/SW_SHOW);
- return 0;
- }
- int clearformat()
- {
- std::string doubleslash = "\\";
- std::string taskdirectory = Directory::get_current_dir() + doubleslash;
- std::string taskdirectory2 = taskdirectory + "\\YTFormat.bat";
- std::ofstream rependtext(taskdirectory2);
- if (rependtext.is_open())
- {
- rependtext << "";
- }
- rependtext.close();
- return 0;
- }
- int clearManifest()
- {
- std::string doubleslash = "\\";
- std::string taskdirectory = Directory::get_current_dir() + doubleslash;
- std::string taskdirectory2 = taskdirectory + "\\YTManifest.bat";
- std::ofstream rependtext(taskdirectory2);
- if (rependtext.is_open())
- {
- rependtext << "";
- }
- rependtext.close();
- return 0;
- }
- int getformat()
- {
- powershellExecutionPolicy();
- clearformat();
- std::string doubleslash = "\\";
- std::string doublequote = "\"";
- std::string taskk = "C:\\Windows\\System32\\cmd.exe " + doublequote;
- std::string task = doublequote + taskk;
- std::wstring progpath = functions::s2ws(task);
- LPCWSTR lpprogpath = progpath.c_str();
- std::string taskdirectory = Directory::get_current_dir();
- std::string namesfiles0 = "cmd /c echo " + doublequote;
- std::string namesfiles1 = namesfiles0 + taskdirectory;
- std::string namesfiles2 = namesfiles1 + "\\youtube-dl.exe";
- std::string namesfiles3 = namesfiles2 + doublequote;
- std::string commandsi = " --list-formats ";
- std::string commands1 = namesfiles3 + commandsi;
- std::string currentprofile1 = commands1 + doublequote;
- std::string currentprofile2 = currentprofile1 + youtubelink;
- std::string currentprofile3 = currentprofile2 + doublequote;
- std::string currentprofile4 = currentprofile3 + " >>YTFormat.bat && start YTFormat.bat";
- std::wstring commandd = functions::s2ws(currentprofile4);
- LPCWSTR lpcommand = commandd.c_str();
- ShellExecute(0, L"open", lpprogpath, lpcommand, 0, /*SW_HIDE*/SW_SHOW);
- return 0;
- }
- int getmanifest()
- {
- powershellExecutionPolicy();
- clearManifest();
- std::string doubleslash = "\\";
- std::string doublequote = "\"";
- std::string taskk = "C:\\Windows\\System32\\cmd.exe " + doublequote;
- std::string task = doublequote + taskk;
- std::wstring progpath = functions::s2ws(task);
- LPCWSTR lpprogpath = progpath.c_str();
- std::string taskdirectory = Directory::get_current_dir();
- std::string namesfiles01 = "cmd /c echo " + doublequote;
- std::string namesfiles11 = namesfiles01 + taskdirectory;
- std::string namesfiles21 = namesfiles11 + "\\youtube-dl.exe";
- std::string namesfiles31 = namesfiles21 + doublequote;
- std::string formatqualit = qualityformat;
- std::string commandsi1 = " -f " + formatqualit;
- std::string commands11 = namesfiles31 + commandsi1;
- std::string currentprofile11 = commands11 + " -g ";
- std::string currentprofile21 = currentprofile11 + doublequote;
- std::string currentprofile31 = currentprofile21 + youtubelink;
- std::string currentprofile41 = currentprofile31 + doublequote;
- std::string currentprofile51 = currentprofile41 + " >>YTManifest.bat && start YTManifest.bat";
- std::wstring commandd = functions::s2ws(currentprofile51);
- LPCWSTR lpcommand = commandd.c_str();
- ShellExecute(0, L"open", lpprogpath, lpcommand, 0, /*SW_HIDE*/SW_SHOW);
- return 0;
- }
- if (ImGui::TreeNode("Record Youtube Live"))
- {
- show_youtube = 0;
- if (ImGui::TreeNode("#1"))
- {
- ImGui::InputText("youtubelink", youtubelink, IM_ARRAYSIZE(youtubelink), ImGuiInputTextFlags_EnterReturnsTrue);
- if (ImGui::Button("get youtube format"))
- {
- getformat();
- }
- ImGui::TreePop();
- }
- if (ImGui::TreeNode("#2"))
- {
- ImGui::InputText("qualityformat", qualityformat, IM_ARRAYSIZE(qualityformat), ImGuiInputTextFlags_EnterReturnsTrue);
- if (ImGui::Button("get youtube manifest"))
- {
- getmanifest();
- }
- ImGui::TreePop();
- }
- if (ImGui::TreeNode("#3"))
- {
- ImGui::InputText("manifestlink", manifestlink, IM_ARRAYSIZE(manifestlink), ImGuiInputTextFlags_EnterReturnsTrue);
- ImGui::InputText("outputyt", outputyt, IM_ARRAYSIZE(outputyt), ImGuiInputTextFlags_EnterReturnsTrue);
- if (ImGui::Button("start Record"))
- {
- recordyoutubelive();
- }
- ImGui::TreePop();
- }
- ImGui::TreePop();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement