Go to the documentation of this file.
8 static std::atomic<bool>
alive{
true};
15 using namespace std::chrono;
33 ve1Out->setStreamName(
"ve1Out");
49 monoLeft->out.link(ve1->input);
53 ve1->bitstream.link(ve1Out->
input);
66 auto videoFile1 = ofstream(
"mono1.h264", ios::binary);
67 auto videoFile2 = ofstream(
"color.h265", ios::binary);
68 auto videoFile3 = ofstream(
"mono2.h264", ios::binary);
69 cout <<
"Press Ctrl+C to stop encoding..." << endl;
73 videoFile1.write((
char*)out1->getData().data(), out1->getData().size());
75 videoFile2.write((
char*)out2->getData().data(), out2->getData().size());
77 videoFile3.write((
char*)out3->getData().data(), out3->getData().size());
80 cout <<
"To view the encoded data, convert the stream file (.h264/.h265) into a video file (.mp4), using a command below:" << endl;
81 cout <<
"ffmpeg -framerate 25 -i mono1.h264 -c copy mono1.mp4" << endl;
82 cout <<
"ffmpeg -framerate 25 -i mono2.h264 -c copy mono2.mp4" << endl;
83 cout <<
"ffmpeg -framerate 25 -i color.h265 -c copy color.mp4" << endl;
XLinkOut node. Sends messages over XLink.
void setCamera(std::string name)
Represents the pipeline, set of nodes and connections between them.
static std::atomic< bool > alive
MonoCamera node. For use with grayscale sensors.
ColorCamera node. For use with color sensors.
static void sigintHandler(int signum)
std::shared_ptr< DataOutputQueue > getOutputQueue(const std::string &name)
void setDefaultProfilePreset(float fps, Properties::Profile profile)
std::shared_ptr< N > create()
VideoEncoder node. Encodes frames into MJPEG, H264 or H265.
void link(const Input &in)
void setStreamName(const std::string &name)
void setCamera(std::string name)
depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19