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.

lag in h264 encoded video

Other Parts Discussed in Thread: TMS320DM368

hi!

I need help regarding a gstreamer pipeline (given below) i am not getting a real time video. there is a lag of approx 1 sec when i play the h.264 encoded transport stream in VLC. i am taking input from composite camera and i am streaming transport stream via lan to VLC running on a windows based PC.

gst-launch -vvv  v4l2sc input-src=COMPOSITE ! video/x-raw-yuv, height=576, width=720, pitch=736, format=\(fourcc\)NV12, framerate=\(fraction\25/1 ! TIPrepEncBuf ! queue ! TIVidenc1 engineName=codecServer codecName=h264enc contiguousInputFrame=TRUE bitRate=9000000 ! mpegtsmux ! udpsink host=192.168.8.2 port=8787

i removed the queue in above pipeline but still no change removed contiguousInputFrame=TRUE property but still no change in lag of the video.

I am running TMS320DM368 evaluation module and i am running DVSDK 4.02.x and my vpfe_capture.bufsize=829440

guidance required please.

Asad

 

  • Hi,

    Have you already tried the gstreamer pipelines provided with DVSDK?

    Do you see the lag with those pipelines?

    thanks
    Cesar
  • hi cesar !

    thanks for replying

    yes i have tried the example pipelines and they are working fine.

    obtaining video from v4l2src and displaying via tidisplaysink2 are working great with real time response but wheni introduce TIVidenc1 element i start getting lag of 1 to 2 seconds.

    i tried to tune the pipeline by setting properties of various elements but was unable to reduce the lag time.

    gst-launch -vvv v4l2sc input-src=COMPOSITE always-copy=FALSE! video/x-raw-yuv, height=576, width=720, pitch=736, format=\(fourcc\)NV12, framerate=\(fraction\25/1 ! TIPrepEncBuf qos=true! queue ! TIVidenc1 engineName=codecServer codecName=h264enc contiguousInputFrame=TRUE bitRate=9000000 encodingPreset=3 rateControl=3 byteStream=true ! queue ! mpegtsmux ! udpsink host=192.168.8.2 port=8787

    please guide how can i find the time taken by each element in order to have an idea which element is taking the most of time?

    i am running gstreamer 0.10 could it be the reason of this lag? 


    Asad

  • following are the changes that i made to the above pipeline and now the delay is in reasonable range of 1 sec

    gst-launch v4l2sc input-src=COMPOSITE always-copy=FALSE queue-size=6 ! video/x-raw-yuv, height=576, width=720, pitch=736, format=\(fourcc\)NV12, framerate=\(fraction\25/1 ! TIPrepEncBuf ! queue ! TIVidenc1 engineName=codecServer codecName=h264enc contiguousInputFrame=TRUE bitRate=1500000 encodingPreset=3 rateControl=3 ! queue ! mpegtsmux ! udpsink host=192.168.8.2 port=8787 enable-last-buffer=false
  • Hi Asad,

    Is the issue resolved?

    Regards,
    Anuj
    Pathpartner Technology Pvt Ltd.
  • Hi Anuj !

    actually, i was able to reduce the delay to a acceptable value(~0.7sec) with bitrate at 3Mbps but as soon i increased the

    bitrate >3Mbps packets starts dropping and delay also increased. actually i was using default image of kernel provided with TMS320DM368 EVM board. TI gstreamer plugin offered a limited number of features in kernel image came with SD card so i stopped . now i am installing ridgerun SDK in hope that it will offer more features in TIgstreamer plugin


    Asad
  • Hi Asad,

    Did you able to achieve your goal by installing ridgerun SDK??
    If yes then please close this thread bu verifying answer.

    Regards,
    Anuj