VPU framerate iMX53

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

VPU framerate iMX53

925 Views
flto
Contributor I

Hi,

 

I work on an quite old project made with iMX53.

It uses linux-2.6-imx-rel_imx_2.6.35_11.09.01 kernel from Freescale.

I have a problem with frame rate in VPU.

[Full context]

Basically, this program captures a video stream on CSI0 video input, add some annotations (texts, images...) and the result is both displayed in live and saved in a file thanks to VPU encoding.

The internals use cairo library (for texts and images), vpu library (for video encoding) and ioctl calls to IPU driver (for color space changes / merging memories / display).

 

In essence, the programs loops over these operations:

  • Waiting for a new frame at input
  • Merging an overlay (prepared in another thread, and merged with IPU)
  • Sending frame to VPU (and waiting for VPU to be ready again)
  • Displaying

Since stream is small and manipulated with pointers passed to IPU or VPU accordingly, the operations are very quick.

 

The recorded videos are "sped up", that is when we record 10 seconds, the replay on PC lasts between 6 et 7 seconds with all images displayed less time than expected. (Hope I am sufficiently clear)

Thus I would like to change the frame rate recorded by the VPU.

 

When I change frameRateInfo parameter from EncOpenParam struct sent to  vpu_EncOpen, there is no change.

Whether I set 25 (current), 10 or 100, the saved video has the same speed. (6 or 7 seconds for 10 seconds recording ; ~20s for ~30s recording)

 

Is there other parameters to set in order to change frame rate ?

 

I attached what is set in EncOpenParam struct, when passed to vpu_EncOpen.

Original Attachment has been moved to: vpu_EncOpen_params.txt.zip

Labels (4)
0 Kudos
4 Replies

588 Views
joanxie
NXP TechSupport
NXP TechSupport

customer can set own frame rate in EncOpenParam, this frame rate just a reference value, most codec doesn't have frame rate parameter, for encoding, mostly we use time-stamp, frame rate is just a reference value.

0 Kudos

588 Views
flto
Contributor I

Thanks joanxie, it explains why this parameter does not seem to change anything.

After being encoded by VPU, we get the encoded bitstream and put it into a pipe to ffmpeg, so that the stream is included in an AVI container.

Thus you suggests that I should find a parameter in FFMPEG to do that ?

[I will try again, but I remember that I tested something similar and players on PC complained that container and stream did not have the same frame rate]

0 Kudos

588 Views
joanxie
NXP TechSupport
NXP TechSupport

Thus you suggests that I should find a parameter in FFMPEG to do that ?

> to do what? framerate? if you decoding , you can set the framerate

0 Kudos

588 Views
flto
Contributor I

The question was posted ~1000 days (~2 years ¾) ago.
I did not remember how it was solved, probably by tuning ffmpeg parameters instead of VPU ones.

0 Kudos