Copy MP4 Invalid

Problem

The system generates invalid mp4 file while end with “CTRL + C” .

Solution

According to MOV/MP4 file format, it would lack of moov meta data while end with “CTRL + C”. You should add the num-buffers property when the MOV/MP4 file is created by audiotestsrc or videotestsrc.

The following code block provides an example.
gst-launch-1.0 -v videotestsrc ! video/x-raw,format=NV12,width=640,height=480 ! filesink location=480P.yuv
gst-launch-1.0 filesrc location=480P.yuv ! rawvideoparse width=640 height=480 format=nv12 ! queue ! omxh265enc ! h265parse ! mux. audiotestsrc num-buffers=440 ! audioconvert ! avenc_aac ! queue ! mux. qtmux name=mux ! filesink location=test.mp4