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.

A question about DM3730 video capture with gst-launch tools

Hi everyone,

    I use a gst-launch command to encode video, which as follow:

gst-launch -v v4l2src device=/dev/video9 \
! ffmpegcolorspace ! videoscale ! \
video/x-raw-yuv,format=\(fourcc\)UYVY, width=704, height=576 ! \
TIVidenc1 codecName=h264enc \
engineName=codecServer ! filesink location=sample.264

I can get the '"sample.264" file , but when i play it , the speed  is so fast than normal . 

it likes play with fast forward X3 or X4 speed.

gst-launch filesrc location=sample.264 ! \
typefind ! h264parse ! TIViddec2 padAllocOutbufs=TRUE ! queue ! tidisplaysink2 -v device=/dev/video7

it must be something wrong with my encode ,Who can tell me what the problem is.

I used dm3730evm DVSDK 4.03 and a USB camera YUV420

Thanks in advance.



  • Hello,

    Could you play it on PC and let me know the result.

    Best Regards,

    Margarita

  • Hi Margarita,

         I've played on  PC before,but still the same problem. So i think it is something wrong with my video encode.
    thanks.
  • Hello,

    I sorry for delay.

    Could you try for example:

    gst-launch v4l2src device=/dev/video9 ! \
    'video/x-raw-yuv,width=1280,height=720,format=(fourcc)UYVY' ! TIVidenc1 codecName=h264enc \
    engineName=codecServer ! filesink location=sample.264

    and let me know the result.

    Best Regards,

    Margarita

  • hi Margarita,

    gst-launch v4l2src device=/dev/video9 ! \
    'video/x-raw-yuv,width=1280,height=720,format=(fourcc)UYVY' ! TIVidenc1 codecName=h264enc \
    engineName=codecServer ! filesink location=sample.264

    This command does not work, and print:

    (gst-launch-0.10:843): GLib-WARNING **: getpwuid_r(): failed due to unknown user id (0)
    Setting pipeline to PAUSED ...
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format
    Additional debug info:
    gstbasesrc.c(2755): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    Check your filtered caps, if any
    Setting pipeline to NULL ...
    Freeing pipeline ...

    finally i got the follow command, and it works.

    gst-launch -v v4l2src device=/dev/video9 !\
    ffmpegcolorspace ! videorate !\
    video/x-raw-yuv,format=\(fourcc\)UYVY,framerate=25/1! \
    TIVidenc1 codecName=h264enc engineName=codecServer ! filesink location=sample.264