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.

DM368: jerky video problem when using GStreamer

Other Parts Discussed in Thread: TMDXEVM368, TVP7002

Hi everyone,

I am currently working on the DM368 evaluation board: TMDXEVM368. I am using a host PC Linux with Ubuntu 10.04 and the ti-dvsdk_dm368-evm_4_02_00_06.
I mounted a NFS filesystem between my host and the board.

My aim is to get an output file with encoded h264 frames from an analog camera as my input (component), and readable by any Windows players such as Windows Media Player, VLC, MediaPlayerClassic etc. According to TI support this way can be done via GStremer plugin...

So, I ran a GStreamer command-line in the target console such as :
root@dm368-evm:/# gst-launch v4l2src always-copy=FALSE num-buffers=500 ! 'video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)30/1, width=(int)1280, height=(int)720' ! queue ! TIVidenc1 codecName=h264enc engineName=codecServer contiguousInputFrame=TRUE bitrate=4000000 rateControlPreset=2 byteStream=TRUE ! avimux ! filesink location=/usr/share/testGS_720.avi -v

The output file is correctly filled I guess because I am able to play it thanks to Windows players. The problem is that I get a jerky video. Indeed sometimes frames seem missing... (please look at the attached output video file Click here to play this video , you will see some freezing at about 9 sec. then 15 sec.)

According to you what could be the problem? Someone to give me some help or any clues?

Thank you very much.

  • I forgot to tell you some other things.

    I did a test with a qtmux instead of avimux and the result is the same, the output video is still jerky.
    Moreover, if I insert a 'debugging element' into the command line, for instance "dmaiperf", please see the following log:
    root@dm368-evm:/# gst-launch v4l2src always-copy=FALSE num-buffers=500 ! 'video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)30/1, width=(int)1280, height=(int)720' ! queue ! TIVidenc1 codecName=h264enc engineName=codecServer contiguousInputFrame=TRUE bitRate=4000000 rateControlPreset=2 byteStream=TRUE ! dmaiperf print-arm-load=true ! avimux ! filesink location=/usr/share/testGS_720.avi -v
    Setting pipeline to PAUSED ...                                                  
    davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124                         
    davinci_previewer davinci_previewer.2: ipipe_set_preview_config                 
    vpfe-capture vpfe-capture: IPIPE Chained                                        
    vpfe-capture vpfe-capture: Resizer present                                      
    EVM: switch to tvp7002 HD video input                                           
    vpfe-capture vpfe-capture: input information not found for the subdev           
    vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2                       
    vpfe-capture vpfe-capture: adjusted width = 16, height = 1, bpp = 2, bytesperlin
    e = 32, sizeimage = 32                                                          
    vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2               
    vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesp
    erline = 4352, sizeimage = 6684672                                              
    vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 1                       
    vpfe-capture vpfe-capture: adjusted width = 32, height = 1, bpp = 1, bytesperlin
    e = 32, sizeimage = 48                                                          
    vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 1               
    vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 1, bytesp
    erline = 2176, sizeimage = 5013504                                              
    vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2                       
    vpfe-capture vpfe-capture: adjusted width = 16, height = 1, bpp = 2, bytesperlin
    e = 32, sizeimage = 32                                                          
    vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2                       
    vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperlin
    e = 32, sizeimage = 64                                                          
    vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2               
    vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesp
    erline = 4352, sizeimage = 6684672                                              
    vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2               
    vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesp
    erline = 4352, sizeimage = 6684672                                              
    vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2                       
    vpfe-capture vpfe-capture: adjusted width = 16, height = 1, bpp = 2, bytesperlin
    e = 32, sizeimage = 32                                                          
    vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2                       
    vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperlin
    e = 32, sizeimage = 64                                                          
    vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2               
    vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesp
    erline = 4352, sizeimage = 6684672                                              
    vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2               
    vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesp
    erline = 4352, sizeimage = 6684672                                              
    vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2                       
    vpfe-capture vpfe-capture: adjusted width = 16, height = 1, bpp = 2, bytesperlin
    e = 32, sizeimage = 32                                                          
    vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2                       
    vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperlin
    e = 32, sizeimage = 64                                                          
    vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2               
    vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesp
    erline = 4352, sizeimage = 6684672                                              
    vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2               
    vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesp
    erline = 4352, sizeimage = 6684672                                              
    vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2                       
    vpfe-capture vpfe-capture: adjusted width = 16, height = 1, bpp = 2, bytesperlin
    e = 32, sizeimage = 32                                                          
    vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2                       
    vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperlin
    e = 32, sizeimage = 64                                                          
    vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2               
    vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesp
    erline = 4352, sizeimage = 6684672                                              
    vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2               
    vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesp
    erline = 4352, sizeimage = 6684672                                              
                                                                                    
    (gst-launch-0.10:1484): GStreamer-WARNING **: pad v4l2src0:src returned caps whi
    vpfe-capture vpfe-capture: width = 1280, height = 720, bpp = 1                  
    ch are not a reavpfe-capture vpfe-capture: adjusted width = 1280, height = 720,
    bpp = 1, bytesperline = 1280, sizeimage = 1382400                               
    l subset of its template caps                                                   
    vpfe-capture vpfe-capture: width = 1280, height = 720, bpp = 1                  
    vpfe-capture vpfe-capture: adjusted width = 1280, height = 720, bpp = 1, bytespe
    rline = 1280, sizeimage = 1382400                                               
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: queue-size = 3                      
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw-yuv, f
    ormat=(fourcc)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1  
    Pipeline is live and does not need PREROLL ...                                  
    WARNING: from element /GstPipeline:pipeline0/GstDmaiperf:dmaiperf0: There is no
    codec present that can handle the stream's type.                                
    Additional debug info:                                                          
    gsttidmaiperf.c(285): gst_dmaiperf_start (): /GstPipeline:pipeline0/GstDmaiperf:
    dmaiperf0:                                                                      
    Engine name not specified, not printing DSP information                         
    Setting pipeline to PLAYING ...                                                 
    New clock: GstSystemClock                                                       
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-
    yuv, format=(fourcc)NV12, width=(int)1280, height=(int)720, framerate=(fraction)
    30/1                                                                            
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw
    -yuv, format=(fourcc)NV12, width=(int)1280, height=(int)720, framerate=(fraction
    )30/1                                                                           
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw-yuv, form
    at=(fourcc)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1     
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw-yuv, forma
    t=(fourcc)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1      
    /GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:sink: caps = video/x-raw-y
    uv, format=(fourcc)NV12, width=(int)1280, height=(int)720, framerate=(fraction)3
    0/1                                                                             
    /GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:src: caps = video/x-h264,
    framerate=(fraction)30/1, width=(int)1280, height=(int)720                      
    /GstPipeline:pipeline0/GstDmaiperf:dmaiperf0.GstPad:src: caps = video/x-h264, fr
    amerate=(fraction)30/1, width=(int)1280, height=(int)720                        
    /GstPipeline:pipeline0/GstDmaiperf:dmaiperf0.GstPad:sink: caps = video/x-h264, f
    ramerate=(fraction)30/1, width=(int)1280, height=(int)720                       
    INFO:                                                                           
    Timestamp: 1:15:45.759990950; bps: 0; fps: 0; CPU: 0;                           
    /GstPipeline:pipeline0/GstAviMux:avimux0.GstPad:video_00: caps = video/x-h264, f
    ramerate=(fraction)30/1, width=(int)1280, height=(int)720                       
    INFO:                                                                           
    Timestamp: 1:15:46.776962076; bps: 586672; fps: 30; CPU: 12;                    
    INFO:                                                                           
    Timestamp: 1:15:47.776963617; bps: 500730; fps: 30; CPU: 12;                    
    INFO:                                                                           
    Timestamp: 1:15:48.777196493; bps: 497289; fps: 30; CPU: 12;                    
    INFO:                                                                           
    Timestamp: 1:15:49.810973994; bps: 492877; fps: 30; CPU: 12;                    
    INFO:                                                                           
    Timestamp: 1:15:50.811083701; bps: 504827; fps: 30; CPU: 11;                    
    INFO:                                                                           
    Timestamp: 1:15:51.843324243; bps: 494534; fps: 30; CPU: 10;                    
    INFO:                                                                           
    Timestamp: 1:15:52.876641075; bps: 489411; fps: 30; CPU: 10;                    
    INFO:                                                                           
    Timestamp: 1:15:53.878051868; bps: 369283; fps: 23; CPU: 58;                    
    INFO:                                                                           
    Timestamp: 1:15:54.911346284; bps: 500470; fps: 30; CPU: 60;                    
    INFO:                                                                           
    Timestamp: 1:15:55.952542992; bps: 497827; fps: 29; CPU: 12;                    
    INFO:                                                                           
    Timestamp: 1:15:56.976714491; bps: 550675; fps: 30; CPU: 11;                    
    INFO:                                                                           
    Timestamp: 1:15:57.976774282; bps: 507480; fps: 30; CPU: 12;                    
    INFO:                                                                           
    Timestamp: 1:15:59.009808948; bps: 486452; fps: 30; CPU: 12;                    
    INFO:                                                                           
    Timestamp: 1:16:00.013433448; bps: 388992; fps: 25; CPU: 30;                    
    INFO:                                                                           
    Timestamp: 1:16:01.044188366; bps: 501224; fps: 30; CPU: 70;                    
    INFO:                                                                           
    Timestamp: 1:16:02.085985782; bps: 498127; fps: 29; CPU: 9;                     
    Got EOS from element "pipeline0".                                               
    Execution ended after 17104695585 ns.                                           
    Setting pipeline to PAUSED ...                                                  
    Setting pipeline to READY ...                                                   
    /GstPipeline:pipeline0/GstAviMux:avimux0.GstPad:video_00: caps = NULL           
    /GstPipeline:pipeline0/GstDmaiperf:dmaiperf0.GstPad:src: caps = NULL            
    /GstPipeline:pipeline0/GstDmaiperf:dmaiperf0.GstPad:sink: caps = NULL           
    /GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:src: caps = NULL          
    /GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:sink: caps = NULL         
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = NULL                  
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = NULL                 
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL        
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL       
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = NULL              
    Setting pipeline to NULL ...                                                    
    Freeing pipeline ...

    I hope it could helps!
    Thank you!!!