There is a size of the image that creates a crumbling video.
[Goals]
Create a movie using I420 format images of any size (Width and height are both multiples of 2)
[Issue]
There is a size of the image that creates a crumbling video. For example, a video with width 100 and height 380.
Videos with width 96, height 380 or width 104 and height 380 can be created.
I don't understand why videos can't be made depending on the size.
When the size is such that a crumbling video is created, the callback (last parameter of gst_buffer_new_wrapped_full) is set so that it will be called when the data for one frame is read, and even if one image is passed, the callback will not occur.
I would like to know either how to successfully animate any size or under what size conditions the video is created successfully.
[SampleCode]
GstElement* pipeline;
GstElement* appsrc;
GstElement* rawvideoparse;
GstElement* enc;
GstElement* vp9parse;
GstElement* splitmuxsink;
GstElement* muxer;
GstCaps* caps;
pipeline = gst_pipeline_new("test-pipeline");
appsrc = gst_element_factory_make("appsrc", "source");
g_object_set(G_OBJECT(appsrc), "stream-type", 0, "format", GST_FORMAT_TIME, NULL);
caps = gst_caps_new_simple("video/x-raw",
"format", G_TYPE_STRING, "I420",
"width", G_TYPE_INT, WIDTH,
"height", G_TYPE_INT, HEIGHT,
"framerate", GST_TYPE_FRACTION, FRAMERATE, 1,
NULL);
g_object_set(appsrc, "caps", caps, "format", GST_FORMAT_TIME, NULL);
// g_signal_connect(appsrc, "need-data", G_CALLBACK(needData), &data);
// g_signal_connect(appsrc, "enough-data", G_CALLBACK(enoughData), &data);
gst_caps_unref(caps);
rawvideoparse = gst_element_factory_make("rawvideoparse", "rawvideoparse");
g_object_set(G_OBJECT(rawvideoparse), "width", WIDTH, NULL);
g_object_set(G_OBJECT(rawvideoparse), "height", HEIGHT, NULL);
enc = gst_element_factory_make("msdkvp9enc", "enc");
g_object_set(G_OBJECT(enc), "gop-size", FRAMERATE, NULL);
g_object_set(G_OBJECT(enc), "bitrate", BITRATE, NULL);
vp9parse = gst_element_factory_make("vp9parse", "vp9parse");
muxer = gst_element_factory_make("matroskamux", "matroskamux");
g_object_set(G_OBJECT(muxer), "offset-to-zero", true, NULL);
splitmuxsink = gst_element_factory_make("splitmuxsink", "splitmuxsink");
g_object_set(G_OBJECT(splitmuxsink), "location", FILE_PATH, NULL);
g_object_set(G_OBJECT(splitmuxsink), "max-size-time", CYCLE_TIME, NULL);
g_object_set(G_OBJECT(splitmuxsink), "async-finalize", false, NULL);
g_object_set(G_OBJECT(splitmuxsink), "muxer", muxer, NULL);
gst_bin_add_many(GST_BIN(pipeline), appsrc, rawvideoparse, enc, vp9parse, splitmuxsink, NULL);