This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

change encode frame issue

hi,all,

  My env: dm8168 and dvr rdk 4.0

  My chains: vcap->nsf->venc->vdec->sw->vdis.

  My capture : HD camera

my question:

(1)   Set encode param: Venc_setInputFrameRate(0, 60);

       when the HD camera is 1080P60

       I use Venc_setDynamicParam(); 

       set FRAMERATE = 60 , the out fps 60.

        set FRAMERATE = 30 , the out fps 30.

       .... that is OK.

       however, I choose the other HD camera (at 1080P30) .

       when I change the FRAMERATE = 30 , the out fps only 15.

       when I change the FRAMERATE = 60, the out fps 30.

       ….out fps is half of change fps….

(2)   Set encode param: Venc_setInputFrameRate(0, 30);

       the HD camera (at 1080P30) is OK!

       However, Change the HD camera at 1080P60

        change fps = 30 ,out fps= 60.

        change fps = 20 ,out =40….

        …. change fps is half of out fps….

Anybody can help me? thanks!

  • You should set the INPUT FRAME RATE to the encoder correctly.If it is 1080P60 it should be 60 and if it is 1080P30 it should be 30.

    You can reduce the encoder frame rate by setting Venc_setDynamicParam. Note that it is only possible to _reduce_ the frame rate.

    If your input fps is 60 and you set the targetFrameRate to 30 it will skip alternate frames and encoder will output 30 fps.

    If you don't want the encoder to skip any frames set targetFrameRate equal to inputFrameRate.

  • Thanks, Badri.

     I understand :

       Set the INPUT FRAME RATE ,If the HD camera is 1080P60 it should be 60 and if it is 1080P30 it should be 30.

    However, we often use both HD cameras. Can it be done automatically match?

  • your:If you don't want the encoder to skip any frames set targetFrameRate equal to inputFrameRate. 

     

    How should I set the relevant parameters?thanks.