Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "subprocess.hpp"
- #include "macros.hpp"
- #include "utils.hpp"
- #include <fstream>
- const std::string g_textcolor = "110";
- const std::string g_program_name = "rtsptester";
- std::ofstream g_log("log", std::ios::app);
- #define CONNECTION_COUNT 100
- int main()
- {
- for(int i = 0; i < CONNECTION_COUNT; i++)
- {
- std::string log = "FFREPORT=file=logs/" + tostring(i);
- create_process("/usr/local/bin/ffmpeg", {"-y", "-rtsp_transport", "tcp", "-i", "rtsp://127.0.0.1:8554/test", "-c", "copy", "-t", "60", "-f", "mp4", "/dev/null"},
- {log}, true);
- }
- VERBOSE("Done spawning, starting wait loop");
- subprocess_wait_loop(WaitLoopOptions::VERBOSE);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement