How to create a loop to record video with gstreamer in C?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to create a loop to record video with gstreamer in C?

1,490 Views
toanjunifer
Senior Contributor I

Hi,

I'm trying to record video with gstreamer in C (iMX8S with Yocto). It's look good until I want to split video output file and I realize a problem:

  • The time to initial VPU and prepare to record too long: 3.5s. I used bash script to make a loop but each video recorded, I lose 3.5s, it's too much. This is the output.

   ====== IMXV4L2SRC: 4.0.9 build on Dec 9 2016 00:05:14. ======
[INFO] Product Info: i.MX6Q/D/S
====== VPUENC: 4.0.9 build on Dec 9 2016 00:05:34. ======
wrapper: 1.0.65 (VPUWRAPPER_ARM_LINUX Build on Dec 8 2016 23:59:08)
vpulib: 5.4.33
firmware: 3.1.1.46072
[INFO] ringBufferEnable 0, chromaInterleave 1, mapType 0, linear2TiledEnable 0
[WARN] VPU iram is less than needed, some parts don't use iram

--> So, I'm trying to make a loop and the initial VPU will be executed only once to reduce to reduce losing time(3.5s each video). I used "gst_element_seek" but It seems like not working. So I switch to use setting state of pipeline.

What should I do now?

Thank you so much,

Toan

Labels (1)
2 Replies

1,385 Views
igorpadykov
NXP Employee
NXP Employee

Hi Toan

c examples for vpu recording can be found in unit tests:

mxc_vpu_test\test - imx-test - i.MX Driver Test Application Software 

for gstreamer one can look at Tutorials 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,385 Views
toanjunifer
Senior Contributor I

Thank you but I can't find it out. 

0 Kudos
Reply