AnsweredAssumed Answered

H264 encoded video file plays faster

Question asked by Pradeep R on May 14, 2014
Latest reply on Jul 13, 2014 by Yixing Kong

I am using iMX6Q VPU to encode raw video frames captured at 10 FPS to H264 format. While initializing VPU using vpu library I specify the frame rate as 10 in the EncOpenParam.framerateInfo field while issuing vpu_EncOpen() call of vpu library. But the SPS/PPS header which is generated by the VPU does not contain frame rate information.

because of this, after I write the SPS & PPS headers and the encoded video frames to a .h264 file and when playing back the video using VLC player I find that the video is playing faster. I even tired setting frame rate using ENC_SET_FRAME_RATE of vpu_EncGiveCommand() API of vpu library and still it does not help.

 

I would like to know why the frame rate information is present in SPS and/or PPS headers. Is there a way to introduce it in the header?

The dump of video file info extracted using MediaInfo is given below for reference.

 

General

Complete name                       : video1.h264

Format                                   : AVC

Format/Info                              : Advanced Video Codec

File size                                : 2.92 MiB

Video

Format                                   : AVC

Format/Info                              : Advanced Video Codec

Format profile                           : Baseline@L3.0

Format settings, CABAC          : No

Format settings, ReFrames      : 1 frame

Format settings, GOP              : M=1, N=4

Width                                     : 640 pixels

Height                                    : 352 pixels

Display aspect ratio                 : 16:9

Color space                            : YUV

Chroma subsampling               : 4:2

Bit depth                                 : 8 bits

Scan type                               : Progressive

Outcomes