omxh264enc doesn't support format

Andre Kirchner andre.kirchner at qwake.tech
Thu Jun 9 21:02:51 UTC 2022


Hi All,

FYI: I got it working with the following pipeline.

gst-launch-1.0 filesrc    location="/data/qwake/in/original.bin" ! \
               videoparse width=320 height=240 format=nv12 framerate=30/1 ! \
               omxh264enc target-bitrate=1000000 qos=true ! \
               h264parse ! \
               mp4mux ! \
               filesink location="/data/qwake/out/encode.mp4"

Cheers,

Andre


On Thu, Jun 2, 2022 at 7:22 PM Andre Kirchner <andre.kirchner at qwake.tech>
wrote:

> Hi All,
>
> Please let me know if this is not the right mailing list for this type of
> question.
>
> I started learning GStreamer, and created a pipeline with the following 4
> elements.
>
> appsrc -> capsfilter -> omxh264enc -> fakesink
>
> appsrc elements were set to
>
> caps: "video/x-raw",
>       "format",    G_TYPE_STRING,     "I420",
>       "width",     G_TYPE_INT,        320,
>       "height",    G_TYPE_INT,        240,
>       "framerate", GST_TYPE_FRACTION, 30, 1,
>       NULL
> stream-type: GST_APP_STREAM_TYPE_STREAM
> format:      GST_FORMAT_TIME
> blocksize:   320 * 240 * 3 / 2
> is-live:     TRUE
>
> capsfilter elements were set to
>
> caps: "video/x-raw",
>       "format",    G_TYPE_STRING,     "I420",
>       "width",     G_TYPE_INT,        320,
>       "height",    G_TYPE_INT,        240,
>       "framerate", GST_TYPE_FRACTION, 30, 1,
>       NULL
>
> omxh264enc elements were set to
>
> target-bitrate: 250000
>
> But I'm getting the following erros when I start streaming.
>
> 0:00:00.083272126  2239   0x55c03260a0 WARN             omxvideoenc
> gstomxvideoenc.c:3068:gst_omx_video_enc_propose_allocation:<encoder>
> allocation query does not contain caps
> 0:00:00.084553484  2239   0x55c03260a0 WARN           basetransform
> gstbasetransform.c:1355:gst_base_transform_setcaps:<mYuvFilter> transform
> could not transform video/x-raw, format=(string)I420, width=(int)320
> , height=(int)240, framerate=(fraction)30/1 in anything we support
> Got state-changed message
> 0:00:00.093299248  2239   0x55c03260a0 WARN           basetransform
> gstbasetransform.c:1355:gst_base_transform_setcaps:<mYuvFilter> transform
> could not transform video/x-raw, format=(string)I420, width=(int)320
> , height=(int)240, framerate=(fraction)30/1 in anything we support
> 0:00:00.094138019  2239   0x55c03260a0 WARN           basetransform
> gstbasetransform.c:1355:gst_base_transform_setcaps:<mYuvFilter> transform
> could not transform video/x-raw, format=(string)I420, width=(int)320
> , height=(int)240, framerate=(fraction)30/1 in anything we support
> 0:00:00.094328376  2239   0x55c03260a0 WARN                 basesrc
> gstbasesrc.c:3055:gst_base_src_loop:<source> error: Internal data stream
> error.
> 0:00:00.094491287  2239   0x55c03260a0 WARN                 basesrc
> gstbasesrc.c:3055:gst_base_src_loop:<source> error: streaming stopped,
> reason not-negotiated (-4)
> 0:00:00.095398492  2239   0x55c03260a0 WARN           basetransform
> gstbasetransform.c:1355:gst_base_transform_setcaps:<mYuvFilter> transform
> could not transform video/x-raw, format=(string)I420, width=(int)320
> , height=(int)240, framerate=(fraction)30/1 in anything we support
> 0:00:00.096068675  2239   0x55c03260a0 WARN           basetransform
> gstbasetransform.c:1355:gst_base_transform_setcaps:<mYuvFilter> transform
> could not transform video/x-raw, format=(string)I420, width=(int)320
> , height=(int)240, framerate=(fraction)30/1 in anything we support
> 0:00:00.096643497  2239   0x55c03260a0 WARN           basetransform
> gstbasetransform.c:1355:gst_base_transform_setcaps:<mYuvFilter> transform
> could not transform video/x-raw, format=(string)I420, width=(int)320
> , height=(int)240, framerate=(fraction)30/1 in anything we support
>
> Any idea how to fix those errors?
>
> Bellow are descriptions of the elements in the pipeline I got using
> gst-streamer-1.0
>
> Thanks :-)
>
> ********************************************
> ****************** appsrc ******************
> ********************************************
> ...
> Element Properties:
>   name                : The name of the object
>                         flags: readable, writable
>                         String. Default: "appsrc0"
>   parent              : The parent of the object
>                         flags: readable, writable
>                         Object of type "GstObject"
>   blocksize           : Size in bytes to read per buffer (-1 = default)
>                         flags: readable, writable
>                         Unsigned Integer. Range: 0 - 4294967295 Default:
> 4096
>   num-buffers         : Number of buffers to output before sending EOS (-1
> = unlimited)
>                         flags: readable, writable
>                         Integer. Range: -1 - 2147483647 Default: -1
>   typefind            : Run typefind before negotiating (deprecated,
> non-functional)
>                         flags: readable, writable, deprecated
>                         Boolean. Default: false
>   do-timestamp        : Apply current stream time to buffers
>                         flags: readable, writable
>                         Boolean. Default: false
>   caps                : The allowed caps for the src pad
>                         flags: readable, writable
>                         Caps (NULL)
>   size                : The size of the data stream in bytes (-1 if
> unknown)
>                         flags: readable, writable
>                         Integer64. Range: -1 - 9223372036854775807
> Default: -1
>   stream-type         : the type of the stream
>                         flags: readable, writable
>                         Enum "GstAppStreamType" Default: 0, "stream"
>                            (0): stream           -
> GST_APP_STREAM_TYPE_STREAM
>                            (1): seekable         -
> GST_APP_STREAM_TYPE_SEEKABLE
>                            (2): random-access    -
> GST_APP_STREAM_TYPE_RANDOM_ACCESS
>   max-bytes           : The maximum number of bytes to queue internally (0
> = unlimited)
>                         flags: readable, writable
>                         Unsigned Integer64. Range: 0 -
> 18446744073709551615 Default: 200000
>   format              : The format of the segment events and seek
>                         flags: readable, writable
>                         Enum "GstFormat" Default: 2, "bytes"
>                            (0): undefined        - GST_FORMAT_UNDEFINED
>                            (1): default          - GST_FORMAT_DEFAULT
>                            (2): bytes            - GST_FORMAT_BYTES
>                            (3): time             - GST_FORMAT_TIME
>                            (4): buffers          - GST_FORMAT_BUFFERS
>                            (5): percent          - GST_FORMAT_PERCENT
>   block               : Block push-buffer when max-bytes are queued
>                         flags: readable, writable
>                         Boolean. Default: false
>   is-live             : Whether to act as a live source
>                         flags: readable, writable
>                         Boolean. Default: false
>   min-latency         : The minimum latency (-1 = default)
>                         flags: readable, writable
>                         Integer64. Range: -1 - 9223372036854775807
> Default: -1
>   max-latency         : The maximum latency (-1 = unlimited)
>                         flags: readable, writable
>                         Integer64. Range: -1 - 9223372036854775807
> Default: -1
>   emit-signals        : Emit need-data, enough-data and seek-data signals
>                         flags: readable, writable
>                         Boolean. Default: true
>   min-percent         : Emit need-data when queued bytes drops below this
> percent of max-bytes
>                         flags: readable, writable
>                         Unsigned Integer. Range: 0 - 100 Default: 0
>   current-level-bytes : The number of currently queued bytes
>                         flags: readable
>                         Unsigned Integer64. Range: 0 -
> 18446744073709551615 Default: 0
>   duration            : The duration of the data stream in nanoseconds
> (GST_CLOCK_TIME_NONE if unknown)
>                         flags: readable, writable
>                         Unsigned Integer64. Range: 0 -
> 18446744073709551615 Default: 18446744073709551615
> ...
>
> ********************************************
> **************** capsfilter ****************
> ********************************************
> ...
> Element Properties:
>   name                : The name of the object
>                         flags: readable, writable
>                         String. Default: "capsfilter0"
>   parent              : The parent of the object
>                         flags: readable, writable
>                         Object of type "GstObject"
>   qos                 : Handle Quality-of-Service events
>                         flags: readable, writable
>                         Boolean. Default: false
>   caps                : Restrict the possible allowed capabilities (NULL
> means ANY). Setting this property takes a reference to the supplied GstCaps
> object.
>                         flags: readable, writable, changeable in NULL,
> READY, PAUSED or PLAYING state
>                                                    ANY
>
>   caps-change-mode    : Filter caps change behaviour
>                         flags: readable, writable, changeable in NULL,
> READY, PAUSED or PLAYING state
>                         Enum "GstCapsFilterCapsChangeMode" Default: 0,
> "immediate"
>                            (0): immediate        - Only accept the current
> filter caps
>                            (1): delayed          - Temporarily accept
> previous filter caps
>
> ********************************************
> **************** omxh264enc ****************
> ********************************************
> ...
> Element Properties:
>   name                : The name of the object
>                         flags: readable, writable
>                         String. Default: "omxh264enc-omxh264enc0"
>   parent              : The parent of the object
>                         flags: readable, writable
>                         Object of type "GstObject"
>   qos                 : Handle Quality-of-Service events from downstream
>                         flags: readable, writable
>                         Boolean. Default: false
>   control-rate        : Bitrate control method
>                         flags: readable, writable, changeable only in NULL
> or READY state
>                         Enum "GstOMXVideoEncControlRate" Default: -1,
> "default"
>                            (0): disable          - Disable
>                            (1): variable         - Variable
>                            (2): constant         - Constant
>                            (3): variable-skip-frames - Variable Skip Frames
>                            (4): constant-skip-frames - Constant Skip Frames
>                            (-1): default          - Component Default
>   target-bitrate      : Target bitrate in bits per second
> (0xffffffff=component default)
>                         flags: readable, writable, changeable in NULL,
> READY, PAUSED or PLAYING state
>                         Unsigned Integer. Range: 0 - 4294967295 Default:
> 4294967295
>   quant-i-frames      : Quantization parameter for I-frames
> (0xffffffff=component default)
>                         flags: readable, writable, changeable only in NULL
> or READY state
>                         Unsigned Integer. Range: 0 - 4294967295 Default:
> 4294967295
>   quant-p-frames      : Quantization parameter for P-frames
> (0xffffffff=component default)
>                         flags: readable, writable, changeable only in NULL
> or READY state
>                         Unsigned Integer. Range: 0 - 4294967295 Default:
> 4294967295
>   quant-b-frames      : Quantization parameter for B-frames
> (0xffffffff=component default)
>                         flags: readable, writable, changeable only in NULL
> or READY state
>                         Unsigned Integer. Range: 0 - 4294967295 Default:
> 4294967295
>   periodicity-idr     : Periodicity of IDR frames (0xffffffff=component
> default)
>                         flags: readable, writable, changeable only in NULL
> or READY state
>                         Unsigned Integer. Range: 0 - 4294967295 Default:
> 4294967295
>   periodicty-idr      : Periodicity of IDR frames (0xffffffff=component
> default) DEPRECATED - only for backwards compat
>                         flags: readable, writable, changeable only in NULL
> or READY state
>                         Unsigned Integer. Range: 0 - 4294967295 Default:
> 4294967295
>   interval-intraframes: Interval of coding Intra frames
> (0xffffffff=component default)
>                         flags: readable, writable, changeable only in NULL
> or READY state
>                         Unsigned Integer. Range: 0 - 4294967295 Default:
> 4294967295
>   b-frames            : Number of B-frames between two consecutive
> I-frames (0xffffffff=component default)
>                         flags: readable, writable, changeable only in NULL
> or READY state
>                         Unsigned Integer. Range: 0 - 4294967295 Default:
> 4294967295
>   entropy-mode        : Entropy mode for encoding process
>                         flags: readable, writable, changeable only in NULL
> or READY state
>                         Enum "GstOMXH264EncEntropyMode" Default: -1,
> "default"
>                            (0): CAVLC            - CAVLC entropy mode
>                            (1): CABAC            - CABAC entropy mode
>                            (-1): default          - Component Default
>   constrained-intra-prediction: If enabled, prediction only uses residual
> data and decoded samples from neighbouring coding blocks coded using intra
> prediction modes
>                         flags: readable, writable, changeable only in NULL
> or READY state
>                         Boolean. Default: false
>   loop-filter-mode    : Enable or disable the deblocking filter
> (0xffffffff=component default)
>                         flags: readable, writable, changeable only in NULL
> or READY state
>                         Enum "GstOMXH264EncLoopFilter" Default: -1,
> "default"
>                            (0): enable           - Enable deblocking filter
>                            (1): disable          - Disable deblocking
> filter
>                            (2): disable-slice-boundary - Disables
> deblocking filter on slice boundary
>                            (-1): default          - Component Default
>
> ********************************************
> ***************** fakesink *****************
> ********************************************
> ...
> Element Properties:
>   name                : The name of the object
>                         flags: readable, writable
>                         String. Default: "fakesink0"
>   parent              : The parent of the object
>                         flags: readable, writable
>                         Object of type "GstObject"
>   sync                : Sync on the clock
>                         flags: readable, writable
>                         Boolean. Default: false
>   max-lateness        : Maximum number of nanoseconds that a buffer can be
> late before it is dropped (-1 unlimited)
>                         flags: readable, writable
>                         Integer64. Range: -1 - 9223372036854775807
> Default: -1
>   qos                 : Generate Quality-of-Service events upstream
>                         flags: readable, writable
>                         Boolean. Default: false
>   async               : Go asynchronously to PAUSED
>                         flags: readable, writable
>                         Boolean. Default: true
>   ts-offset           : Timestamp offset in nanoseconds
>                         flags: readable, writable
>                         Integer64. Range: -9223372036854775808 -
> 9223372036854775807 Default: 0
>   enable-last-sample  : Enable the last-sample property
>                         flags: readable, writable
>                         Boolean. Default: true
>   last-sample         : The last sample received in the sink
>                         flags: readable
>                         Boxed pointer of type "GstSample"
>   blocksize           : Size in bytes to pull per buffer (0 = default)
>                         flags: readable, writable
>                         Unsigned Integer. Range: 0 - 4294967295 Default:
> 4096
>   render-delay        : Additional render delay of the sink in nanoseconds
>                         flags: readable, writable
>                         Unsigned Integer64. Range: 0 -
> 18446744073709551615 Default: 0
>   throttle-time       : The time to keep between rendered buffers (0 =
> disabled)
>                         flags: readable, writable
>                         Unsigned Integer64. Range: 0 -
> 18446744073709551615 Default: 0
>   max-bitrate         : The maximum bits per second to render (0 =
> disabled)
>                         flags: readable, writable
>                         Unsigned Integer64. Range: 0 -
> 18446744073709551615 Default: 0
>   state-error         : Generate a state change error
>                         flags: readable, writable
>                         Enum "GstFakeSinkStateError" Default: 0, "none"
>                            (0): none             - No state change errors
>                            (1): null-to-ready    - Fail state change from
> NULL to READY
>                            (2): ready-to-paused  - Fail state change from
> READY to PAUSED
>                            (3): paused-to-playing - Fail state change from
> PAUSED to PLAYING
>                            (4): playing-to-paused - Fail state change from
> PLAYING to PAUSED
>                            (5): paused-to-ready  - Fail state change from
> PAUSED to READY
>                            (6): ready-to-null    - Fail state change from
> READY to NULL
>   silent              : Don't produce last_message events
>                         flags: readable, writable, changeable in NULL,
> READY, PAUSED or PLAYING state
>                         Boolean. Default: true
>   dump                : Dump buffer contents to stdout
>                         flags: readable, writable, changeable in NULL,
> READY, PAUSED or PLAYING state
>                         Boolean. Default: false
>   signal-handoffs     : Send a signal before unreffing the buffer
>                         flags: readable, writable
>                         Boolean. Default: false
>   drop-out-of-segment : Drop and don't render / hand off out-of-segment
> buffers
>                         flags: readable, writable
>                         Boolean. Default: true
>   last-message        : The message describing current status
>                         flags: readable
>                         String. Default: null
>   can-activate-push   : Can activate in push mode
>                         flags: readable, writable
>                         Boolean. Default: true
>   can-activate-pull   : Can activate in pull mode
>                         flags: readable, writable
>                         Boolean. Default: false
>   num-buffers         : Number of buffers to accept going EOS
>                         flags: readable, writable
>                         Integer. Range: -1 - 2147483647 Default: -1
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220609/9acd3f16/attachment-0001.htm>


More information about the gstreamer-devel mailing list