GStreamer bitrate changes with framerate

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

GStreamer bitrate changes with framerate

189 Views
cduarte0306
Contributor II

Hello all,

 

I am using a IMX8MP SOM provided by Karo electronics. 

 

Kernel version: 6.1.1-karo+g4cf0ec7b8c89

 

Currently developing a camera over IP device using GStreamer to manage the pipeline. I noticed a rather off behavior where the bitrate setting would only ever be correct when running at 30 fps, however, when running at 15, the reported bitrate by VLCPlayer would be half of the set bitrate. 

Has anyone else noticed this behavior?

 

The framerate is only ever set over I2C to the camera (custom camera) and the frames are sourced from an appsrc. Pipeline setting code below:

 

if( resolutions == _1920_1080 ) {
            pipeline = sourcePipeElement +
                pipeline = sourcePipeElement +
                " ! video/x-raw,format=I420,width=1680,height=700" + 
                " ! queue ! imxvideoconvert_g2d ! video/x-raw, width=1680, height=1050 ! queue ! videobox left=-120 right=-120 top=-15 bottom=-15" +
                " ! queue" + 
                " ! " + encoderElement +
                " ! " + encoderString + ", mapping=" + mappingString +
                payloadString;

                this->_camCtrl->selPowerState( CamCtrl::PERFORMANCE );
        } else if( resolutions == _1280_1024 ) {
            pipeline = sourcePipeElement +
                " ! video/x-raw,format=I420,width=1680,height=700" + 
                " ! queue ! imxvideoconvert_g2d ! video/x-raw, width=1680, height=1050 ! queue ! videobox left=200 right=200 top=13 bottom=13" +
                " ! queue" + 
                " ! " + encoderElement +
                " ! " + encoderString + ", mapping=" + mappingString +
                payloadString;

            this->_camCtrl->selPowerState( CamCtrl::LOW_POWER );
        } else if( resolutions == _1280_720 ) {
            pipeline = sourcePipeElement +
                " ! video/x-raw,format=I420,width=1680,height=700" + 
                " ! queue ! imxvideoconvert_g2d ! video/x-raw, width=1680, height=1050 ! queue ! videobox left=200 right=200 top=165 bottom=165" +
                " ! queue" + 
                " ! " + encoderElement +
                " ! " + encoderString + ", mapping=" + mappingString +
                payloadString;

                this->_camCtrl->selPowerState( CamCtrl::LOW_POWER );
        }
Tags (1)
0 Kudos
1 Reply

128 Views
brian14
NXP TechSupport
NXP TechSupport

Hi @cduarte0306

Thank you for contacting NXP Support.

Based on you are using a custom board and custom camera is difficult for us to replicate the issue.
I suggest you contact with Karo Electronics for support in this issue.

Have a great day!

0 Kudos