Die Rahmendaten sind bereits in I420 codiert und müssen nicht konvertiert werden.
Hier ist, was ich zu tun versuche:
Code: Select all
const char *frameData = /* Raw frame data */;
x264_t *encoder = x264_encoder_open(¶m);
x264_picture_t imgInput, imgOutput;
x264_picture_alloc(&imgInput, X264_CSP_I420, width, height);
// how can I fill the struct data of imgInput
x264_nal_t *nals;
int i_nals;
int frameSize = x264_encoder_encode(encoder, &nals, &i_nals, &imgInput, &imgOutput);
Code: Select all
x264 --output video.mp4 --fps 15 --input-res 1280x800 imgdata_01.raw
Danke.