get "unuseful" mp4file when link && unlink branch dramatic

westsong westsong at
Thu Aug 31 06:47:25 UTC 2017

I use gstreamer on a android devices, first I init a pipeline like this:
"ahcsrc ! video/x-raw, format=(string)NV12, width=(int)1280,
height=(int)720, framerate=(fraction)30/1  !  tee name=srctee srctee. !
queue name=queue1 ! amcvidenc-omxrkvideoencoderavc name=enc0 bitrate=8000000
i-frame-interval=1  !  h264parse ! splitmuxsink name=splitmuxsink
muxer=mp4mux max-size-time=600000000000 max-files=20
this pipeline begin to record mp4 files, after 5 secs i create a branch like
"queue name=queue2 ! amcvidenc-omxrkvideoencoderavc name=enc1
bitrate=8000000 i-frame-interval=1 ! h264parse name=h264parse1 ! mp4mux !
filesink name=filesink1 location=/storage/sdcard1/snapvideo.mp4"
and link this branch to pipeline by the tee named srctee, it works well,
then after 30 secs, i send an eos to the element named enc1 and unlink the
branch and pipeline , also it works well, so i got a mp4 file named
snapvideo.mp4 which I thought time length should be 30 secs , but when I
open this mp4 file, it's length was 35 secs and the beginning 5 secs was
keeping one frame
I don't know where the problem is, any one who can help me?

Sent from:

More information about the gstreamer-devel mailing list