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.

DM365 rtsp/test-launch audio lost

Hi, I tried the gst-rtsp-0.10.7/examples on DM365-evm 

./test-launch "( alsasrc ! TIAudenc1 codecName=aaclcenc engineName=codecServer ! rtpmp4apay name=pay0 pt=96 v4l2src  input-src=composite ! video/x-raw-yuv,format=(fourcc)NV12,width=352,height=240 ! TIVidenc1 codecName=h264enc engineName=codecServer ! rtph264pay name=pay1 pt=97 )"

then use VLC rtsp://<IP>:8554/test   which worked for a while then audio buffers lost

sometimes printed out "davinci_mmc davinci_mmc.0: powerup timeout"

if I stream audio only, no lost buffers

so I guest streaming audio and video at the same time cause CPU overload and it somehow lost audio

how can I fix it?

please help, thanks 

  • Gina,

    I'm not sure about the exact issue. But by looking at the log, I'm trying to understand what is the relation with MMC driver with this. Can you check whether MMC card is inserted and is the device writing the stream to MMC/SD card as well? If so, can you remove the card and try the same and see whether this error occurs?

  • Renjith,

    Thank you.

    I remove the card, no warning then, but audio buffers still lost after a while

    how do I know is the device writing the stream to the card?

     

    I add "audio/x-raw-int,endianness=1234,signed=true,width=16,depth=16,rate=22050,channels=2"

    to set the rate of alsasrc, it decrease CPU loading from 40~ to 30~  (when I gst-launch alsasrc with fakesink )

    ./test-launch "( alsasrc ! audio/x-raw-int,endianness=1234,signed=true,width=16,depth=16,rate=22050,channels=2 ! TIAudenc1 codecName=aaclcenc  engineName=codecServer ! rtpmp4apay name=pay0 pt=96 v4l2src input-src=composite ! video/x-raw-yuv,format=(fourcc)NV12,width=352,height=240 ! TIVidenc1 codecName=h264enc engineName=codecServer ! rtph264pay name=pay1 pt=97 )"


    maybe bacause remove the card and set the rate the audio stream work fine much longer but still break after a while

    -Gina

  • Gina,

    Can you upload the audio file with the issue? I don't think CPU load could be the issue here as you are seeing only 40% CPU load. 

  • Renjith,

    When I said 40% down to 30% I meant alsasrc only 

    I run the v4l2src it would be like 45%

    so when I use gst-rtsp/example/test-launch stream both audio and video I assume the CPU wound overload

    since I don't know how to let the test-launch to print out damiperf arm load

    here is another pipeline I tried

    ------------------------------------------------------------ 

    CLIENT_IP=$1
    gst-launch -ev gstrtpbin name=rtpbin\
    alsasrc buffer-time=100000\
    ! audio/x-raw-int,endianness=1234,signed=true,width=16,depth=16,rate=22050,channels=2\
    ! dmaiperf 'print-arm-load=true'\
    ! TIAudenc1 codecName=aaclcenc engineName=codecServer bitrate=128000\
    ! rtpmp4apay pt=97 max-ptime=84000 ! rtpbin.send_rtp_sink_0\
    rtpbin.send_rtp_src_0 ! udpsink port=1224 host=$CLIENT_IP\
    rtpbin.send_rtcp_src_0 ! udpsink port=1225 host=$CLIENT_IP sync=false\
    async=false udpsrc port=1229 ! rtpbin.recv_rtcp_sink_0\
    v4l2src input-src=composite\
    ! 'video/x-raw-yuv,format=(fourcc)NV12,width=352,height=240'\
    ! TIVidenc1 codecName=mpeg4enc engineName=codecServer\
    ! rtpmp4vpay ! rtpbin.send_rtp_sink_1\
    rtpbin.send_rtp_src_1 ! udpsink port=1234 host=$CLIENT_IP\
    rtpbin.send_rtcp_src_1 ! udpsink port=1235 host=$CLIENT_IP sync=false\
    async=false udpsrc port=1239 ! rtpbin.recv_rtcp_sink_1

    --------------------------------------------------

    -------------------Log--------------------------


    INFO:
    Timestamp: 0:45:38.589751733; bps: 88179; fps: 209; CPU: 89;
    INFO:
    Timestamp: 0:45:39.595553525; bps: 87761; fps: 208; CPU: 86;
    INFO:
    Timestamp: 0:45:40.597800025; bps: 88023; fps: 209; CPU: 93;
    INFO:
    Timestamp: 0:45:41.602243109; bps: 88685; fps: 211; CPU: 91;
    INFO:
    Timestamp: 0:45:42.611001151; bps: 88333; fps: 210; CPU: 92;
    WARNING: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Can't record audio fast enough
    Additional debug info:
    gstbaseaudiosrc.c(822): gst_base_audio_src_create (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
    Dropped 2730 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
    INFO:
    Timestamp: 0:45:43.616404817; bps: 86089; fps: 204; CPU: 95;
    INFO:
    Timestamp: 0:45:44.619093025; bps: 87604; fps: 208; CPU: 85;
    INFO:
    Timestamp: 0:45:45.626957901; bps: 88838; fps: 211; CPU: 88;
    INFO:
    Timestamp: 0:45:46.632062692; bps: 88179; fps: 209; CPU: 94;
    INFO:
    Timestamp: 0:45:47.636798442; bps: 87848; fps: 209; CPU: 89;
    INFO:
    Timestamp: 0:45:48.643064609; bps: 88508; fps: 210; CPU: 98;
    INFO:
    Timestamp: 0:45:49.648466567; bps: 88179; fps: 209; CPU: 94;

    -------------------

    I use  ./test-launch --gst-debug=2 ... ,so it printed out

    ------------------Log-----------------

    vpfe-capture vpfe-capture: adjusted width = 352, height = 240, bpp = 1, bytesperline = 352, sizeimage = 126720

    0:10:44.849177252  1652    0x11008 WARN                 v4l2src v4l2src_calls.c:342:gst_v4l2src_set_capture:<v4l2src1> warning: Video input device did not accept new frame rate setting.
    0:10:44.850102043  1652    0x11008 WARN                 v4l2src v4l2src_calls.c:342:gst_v4l2src_set_capture:<v4l2src1> warning: system error: Invalid argument
    0:10:44.852219918  1652   0x1122d0 WARN               rtspmedia rtsp-media.c:1377:default_handle_message: 0xd56c0: got warning Video input device did not accept new frame rate setting. (v4l2src_calls.c(342): gst_v4l2src_set_capture (): /GstPipeline:media-pipeline/GstBin:bin1/GstV4l2Src:v4l2src1:
    system error: Invalid argument)
    0:10:44.853737835  1652    0x11008 WARN                    v4l2 gstv4l2bufferpool.c:351:gst_v4l2_buffer_pool_new:<v4l2src1> using 3 buffers instead
    0:10:45.089072462 1652    0x11008 WARN                 v4l2src gstv4l2src.c:717:gst_v4l2src_query:<v4l2src1> Can't give latency since framerate isn't fixated !
    0:10:45.092892879  1652    0x11008 WARN                     bin gstbin.c:2330:gst_bin_do_latency_func:<media-pipeline> failed to query latency
    0:10:45.213480210  1652   0x1688f8 WARN              rtpmp4apay gstrtpmp4apay.c:264:gst_rtp_mp4a_pay_setcaps:<pay0> AAC's stream-format not specified, assuming 'raw'
    0:14:56.650454671  1652   0x160338 WARN            baseaudiosrc gstbaseaudiosrc.c:817:gst_base_audio_src_create:<alsasrc1> create DISCONT of 4655 samples at sample 5549495
    0:14:56.651584087  1652   0x160338 WARN            baseaudiosrc gstbaseaudiosrc.c:822:gst_base_audio_src_create:<alsasrc1> warning: Can't record audio fast enough
    0:14:56.652390212  1652   0x160338 WARN            baseaudiosrc gstbaseaudiosrc.c:822:gst_base_audio_src_create:<alsasrc1> warning: Dropped 4655 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
    0:14:56.654845880  1652   0x1122d0 WARN               rtspmedia rtsp-media.c:1377:default_handle_message: 0xd56c0: got warning Can't record audio fast enough (gstbaseaudiosrc.c(822): gst_base_audio_src_create (): /GstPipeline:media-pipeline/GstBin:bin1/GstAlsaSrc:alsasrc1:
    Dropped 4655 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.)
    ...

    _pcm_hw_delay: alsalib error: SNDRV_PCM_IOCTL_DELAY failed (-32): Broken pipe
    1:21:03.425636381 1652 0x11008 3;01mWARN bin gstbin.c:23 30:gst_bin_do_latency_func:<media-pipeline> failed to query latency

    ---------------------------------

    -Gina

  • Gina,

    Are you seeing 100% CPU load when you run your Audio + Video applications? Most likely this issue is with the Audio driver by looking at the logs.

  • Renjith,

    If is not the CPU loading cause the audio buffers lost on client's VLC, any ideas?

    I stream to two computer, when one VLC show lost buffer, the another one didn't but after a while it did. 

     here is a screen shot of VLC audio streaming

    <Lost buffers> keep increase as the <Played buffers> and <Decoded blocks>  but no sound

    maybe the buffers somehow imcomplete, so vlc can't played?

    sorry, i don't really know how to solve this problem

    thank you for answering

    -Gina


  • Gina,

    Its tough to analyze it over forum. If you can spare one board, then I can look into the issue.

  • Thank you for your time and effort, Renjith.

    I gave up aaclcenc, try the alawenc and mulawenc with rate=8000,channels=1 then the audio no longer break down