Gstreamer1.0 use appsink & appsrc ->vpu_h264->mp4mux->filesink,I find will got err as follows:
0:00:12.136406002 1021 0x1034120 FIXME basesink gstbasesink.c:3144:gst_base_sink_default_event:<filesink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
0:00:12.144873002 1021 0x1034120 WARN qtmux gstqtmux.c:3486:gst_qt_mux_add_buffer:<mp4mux0> error: Buffer has no PTS.
Received error
0:00:12.155500335 1021 0x1034120 WARN qtmux gstqtmux.c:3486:gst_qt_mux_add_buffer:<mp4mux0> error: Buffer has no PTS.
my pipiline is :
("imxv4l2src device=/dev/video1 num-buffers=100 ! video/x-raw,format=NV12,width=640,height=480,framerate=30/1 ! appsink name=myappsink");
("appsrc name=appsrct ! vpuenc_h264 ! h264parse ! mp4mux ! filesink location=h2641_apd.avi");
But when I replace mp4mux with avimux,then I will get file with avi ok.
My question is:
1、How should I do to deal with the err of mp4mux?
2、Why to use avimux OK,but mp4mux ERR?
Solved! Go to Solution.
Thanks to joanxie,Now the problom has been solved.
gst err: "buffer has no pts" due to in appsink , not add PTS timestamp
GST_BUFFER_PTS (buffer) = timestamp;
GST_BUFFER_DURATION (buffer) = gst_util_uint64_scale_int (1, GST_SECOND, framerate);
timestamp += GST_BUFFER_DURATION (buffer);
uper codec could add buffer pts,and mp4mux->filesink could be OK.
Thanks to joanxie,Now the problom has been solved.
gst err: "buffer has no pts" due to in appsink , not add PTS timestamp
GST_BUFFER_PTS (buffer) = timestamp;
GST_BUFFER_DURATION (buffer) = gst_util_uint64_scale_int (1, GST_SECOND, framerate);
timestamp += GST_BUFFER_DURATION (buffer);
uper codec could add buffer pts,and mp4mux->filesink could be OK.
good to hear this, thanks for sharing the result
did you use mp4mux to get xx.avi file? and try to use the latest bsp version to test
Use mp4mux to get mp4 file through appsink and appsrc Failed.
But use avimux to get avi file through appsink and appsrc OK.
maybe you can refer to the link as below:
https://community.nxp.com/t5/i-MX-Processors/iMX6-gstreamer-pipeline-appsrc-to-mp4mux/m-p/459645
I'm not sure if your file name is xxx.avi, is it ok that you use mp4mux?
My pipeline is : ("appsrc name=appsrct ! vpuenc_h264 ! h264parse ! mp4mux ! filesink location=h2641_apd.mp4");
And I also use h264parse in appsrc pipeline.But the results is as my question...
you can see the topic as below:
http://gstreamer-devel.966125.n4.nabble.com/quot-Buffer-has-no-PTS-quot-with-this-H264-IP-Camera-td4...
qtmux reports "buffer has no PTS" if two consecutive buffers have the same timestamp. This can occur if h264parse receives a frame with invalid timestamp e.g. CLOCK_TIME_NONE it then guesses a timestamp. You could insert a pad-probe which checks the timestamps before h264parse and checks that the timestamp is plausible.