Hello,
I successfully implemented a meeting bot that joins the meeting and records the video and audio using the example code (Linux SDK with ubuntu container).
So, the bot generate a .yuv file, I’ve tried to open the file with vlc using:
/Applications/VLC.app/Contents/MacOS/VLC --rawvid-fps 25 --rawvid-width 1920 --rawvid-height 1080 --rawvid-chroma I420 output.yuv
but got the frames in a very weird format (see image attached)
Also, tried using ffmpeg:
~/Downloads/ffmpeg -s 640x480 -i output.yuv -ss 00:00:00 -c:v libx264 -s:v 640x480 -preset slow -t 00:08:20 output.mp4
But again the frames always “jumps”, see image:
Also tried 320x160 resolution.
Also tried to stream the file to custom RTMP server using ffmpeg but same results (As @MaxM Described here: https://devforum.zoom.us/t/live-streaming-with-rtmp/63328/3)
cc: @chunsiong.zoom
Appreciate any help working with this file format.
Here is the code which generates the output.yuv file:
void ZoomSDKRenderer::SaveToRawYUVFile(YUVRawDataI420* data) {
// Open the file for writing
std::ofstream outputFile("output.yuv", std::ios::out | std::ios::binary | std::ios::app);
if (!outputFile.is_open())
{
std::cout << "Error opening file." << std::endl;
return;
}
// Calculate the sizes for Y, U, and V components
size_t ySize = data->GetStreamWidth() * data->GetStreamHeight();
size_t uvSize = ySize / 4;
// Write Y, U, and V components to the output file
outputFile.write(data->GetYBuffer(), ySize);
outputFile.write(data->GetUBuffer(), uvSize);
outputFile.write(data->GetVBuffer(), uvSize);
// Close the file
outputFile.close();
outputFile.flush();
}