8 static std::atomic<bool>
alive{
true};
32 ve1Out->setStreamName(
"ve1Out");
46 monoLeft->out.link(ve1->input);
49 ve1->bitstream.link(ve1Out->
input);
62 auto videoFile1 = std::ofstream(
"mono1.h264", std::ios::binary);
63 auto videoFile2 = std::ofstream(
"color.h265", std::ios::binary);
64 auto videoFile3 = std::ofstream(
"mono2.h264", std::ios::binary);
65 cout <<
"Press Ctrl+C to stop encoding..." << endl;
69 videoFile1.write((
char*)out1->getData().data(), out1->getData().size());
71 videoFile2.write((
char*)out2->getData().data(), out2->getData().size());
73 videoFile3.write((
char*)out3->getData().data(), out3->getData().size());
76 cout <<
"To view the encoded data, convert the stream file (.h264/.h265) into a video file (.mp4), using a command below:" << endl;
77 cout <<
"ffmpeg -framerate 30 -i mono1.h264 -c copy mono1.mp4" << endl;
78 cout <<
"ffmpeg -framerate 30 -i mono2.h264 -c copy mono2.mp4" << endl;
79 cout <<
"ffmpeg -framerate 30 -i color.h265 -c copy color.mp4" << endl;