mp4mux with h264 stream from appsrc - Could not multiplex stream.
dlw
dlwalter at protonmail.com
Mon Jan 11 18:56:05 UTC 2021
I have built the following pipeline:
appsrc->videoconvert->x264enc->h264parse->queue->mp4mux->filesink
The goal is to record video from a non-v4l2 camera. I get the following
error:
`Could not multiplex streams`
I have no problem streaming this h264 pipeline (if I replace the
queue->mp4mux->filesink section with a rtph264pay and udpsink I receive
video fine.
[Pipeline image is here](https://imgur.com/D0sbFMx)
As for implementing the appsrc, I am using the need-data callback as quite a
few examples demonstrate:
cb_need_data(GstElement *appsrc,
guint unused_size,
gpointer data)
{
GstMapInfo map;
GstBuffer *buffer;
guint pixel_size;
GstFlowReturn ret;
// setup the image buffer from the camera
pixel_size = (size_t)camera->frame_cols * (size_t)camera->frame_rows;
guint frame_bytes = pixel_size * sizeof(uint32_t);
uint32_t* color_buffer = (uint32_t*)malloc(frame_bytes);
buffer = gst_buffer_new_allocate (NULL, frame_bytes, NULL);
//get the image from the camera
bool status = false;
status = MyCamera_GetImage(camera, color_buffer);
if(status){
// map memory, write data to memory and unmap
gst_buffer_map(buffer, &map, GST_MAP_WRITE);
memcpy(map.data, (guchar*)color_buffer, frame_bytes);
gst_buffer_unmap(buffer, &map);
// send buffer out of appsrc
g_signal_emit_by_name (appsrc, "push-buffer", buffer, &ret);
gst_buffer_unref (buffer);
}
free(color_buffer);
}
I am using gstreamer 1.14.5 on ubuntu 18.04 arm64 (Jetson Nano)
Any help or guidance would be appreciated on how I mux this stream into a
video file.
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list