#include "mosh-me/avpipe.hpp" #include #include #include #include #include int main(int argc, char *argv[]) { if (argc < 3) { spdlog::error("Please invoke with {} ", argv[0]); } av::init(); try { auto pipe = mosh_me::VideoMuxer::link(std::filesystem::path(argv[2])) << mosh_me::SmearFrames::link(3, 5) << mosh_me::MoshableVideoEncoder::link() << mosh_me::VideoDecoder::link() << mosh_me::VideoPacketSource::link(argv[1]); pipe.propagateMeta(); if (auto result = pipe.pull(); !result.has_value()) { spdlog::error("Pipe failed"); } } catch (const av::Exception &e) { spdlog::error("{}", e.what()); } }