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.

video format from vpif interface and encoder

Other Parts Discussed in Thread: OMAP-L138, TVP5147

Hallo,

I have OMAP-L138 and I use DVSDK 04.03.00.06.

I have a video composite camera connected to L138 vpif interface through tvp5147. I can capture single frame and convert it using gstremer and codec Server sunning on dsp in this way:

# gst-launch filesrc location=./capt_frame.yuv ! TIImgenc1 resolution=720x576 iColorSpace=YUV422P oColorSpace=YUV422P qValue=75 ! filesink location=./output.jpg

This command works fine, so I must conclude that the color space output from vpif interface is YUV422P.

Now I want to convert a movie, so I capture 100 frames from vpif interface, and I guess I have to use TIVidenc1.

I run gst-inspect to know the parameters that TIVidenc1 accepts

# gst-inspect TIVidenc1
Factory Details:
  Long name:    TI xDM 1.x Video Encoder
  Class:    Codec/Encoder/Video
  Description:    Encodes video using an xDM 1.x-based codec
  Author(s):    Brijesh Singh; Texas Instruments, Inc.
  Rank:        primary (256)

[...]

Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw-yuv
                 format: UYVY
              framerate: [ 0/1, 2147483647/1 ]
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
      video/x-raw-yuv
                 format: NV12
              framerate: [ 0/1, 2147483647/1 ]
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]

  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/mpeg
            mpegversion: { 2, 4 }
           systemstream: false
              framerate: [ 0/1, 2147483647/1 ]
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
      video/x-h264
              framerate: [ 0/1, 2147483647/1 ]
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]

[...]
Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "tividenc10"
  engineName          : Engine name used by Codec Engine
                        flags: readable, writable
                        String. Default: null
  codecName           : Name of video codec
                        flags: readable, writable
                        String. Default: null
  resolution          : Input resolution for the input video ('width''x''height')
                        flags: readable, writable
                        String. Default: null
  bitRate             : Set the video encoder bit rate
                        flags: writable
                        Integer. Range: 1 - 2147483647 Default: 2000000  Write only
  iColorSpace         : Input color space (UYVY, Y8C8, NV16 or NV12)
                        flags: readable, writable
                        String. Default: null
[...]

here's the first inconsistency: it seems that Input color spaces can be UYVY, Y8C8, NV16 or NV12, but sink template listed above seems to accept only UYVY and NV12.

So which of these formats matches my file?

Anyway I try to run this command:

# gst-launch filesrc location=/tmp/movie.yuv ! queue max-size-buffers=50 max-size-bytes=1048576 ! TIVidenc1 codecName=mpeg4enc engineName=codecServer iColorSpace=NV16 resolution=720x576 framerate=25 ! filesink location=movie.m4v

(queue is only needed to avoid memory problems.)

I get an error:

ERROR: from element /GstPipeline:pipeline0/GstTIVidenc1:tividenc10: failed to encode video buffer

I get the same error for NV12 and Y8C8.

The only one that does not return an error is UYVY, and a file movie.m4v is created, but the frames are like this:


This result is confirmed tring to convert an image using UYVY input color space.


So I wonder if TIVidenc1 support strem format that comes from L138 vpif interface, and how can I convert such stream using gstreamer


best regards


Max