Unable to determine movie duration while doing RTSP play

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to determine movie duration while doing RTSP play

1,171 Views
智峰宋
Contributor I

Hello

While using rtspsrc to play video stream (TS formatted movie), the application is failed to get the movie duration, so the movie can be seen but can't do forward / backward play or do actual timestamp seek. The failure shoud not be related to the RTSP server or the movie itself, because VLC can play it well.

The following command is used for the play:

rtspsrc location=rtsp://10.0.0.15:554/test buffer -mode=0 ! queue ! rtpmp2tdepay ! aiurdemux name=d d. ! queue ! vpudec low-latency=true ! queue ! mfw_v4lsink axis-left=400 axis-top=0 disp-width=640 disp-height=480 sync=true d. ! queue ! ffdec_ac3 ! alsasink sync=true

The log shows this is a live stream, and not seekable, as below:

Aiur: 3.0.11

Core: BLN_MAD-MMLAYER_MPG2PARSER_04.04.19  build on Jan 20 2014 02:03:56

  mime: video/mpeg, mpegversion=(int)[1,2]; video/mpegts, systemstream=true; video/x-cdxa

  file: /usr/lib/imx-mm/parser/lib_mpg2_parser_arm11_elinux.so.3.1

[0m/GstPipeline:pipeline0/GstAiurDemux:demux.GstPad:sink: caps = video/mpegts, packetsize=(int)188, systemstream=(boolean)true

[1;34mContent Info:

[0m [1;34m   Seekable  : No

[0m [1;34m    Size(byte): -1

[0mMpeg2CreateParser:parser created successfully

[1;34mMovie Info:

[0m [1;34m    Seekable  : No

[0m [1;34m    Live      : Yes

[0m [1;34m    Duration  : 0:00:00.000000000

[0m [1;34m    ReadMode  : File

[0m [1;34m    programs    : 1

[0m [1;34m    Track     : 2

[0m [1;34mTrack 00 [video_001100] Enabled

[0m [1;34m    ppid: 1, ppid 256

[0m [1;34m    Duration: 0:00:00.000000000

[0m [1;34m    Language: und

[0m [1;34m    Mime:

[0m [1;34m          video/x-h264, parsed=(boolean)true, width=(int)352, height=(int)288, framerate=(

[0m [1;34m          fraction)30/1

[0m [1;34mTrack 01 [audio_001101] Enabled

[0m [1;34m    ppid: 1, ppid 257

[0m [1;34m    Duration: 0:00:00.000000000

[0m [1;34m    Language: und

[0m [1;34m    Mime:

[0m [1;34m          audio/x-ac3, channels=(int)1, rate=(int)32000, bitrate=(int)384000, framed=(bool

[0m [1;34m          ean)true

[0m[INFO]    bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0

So any one has experienced the similar issue?

or knows what command can play the TS-formated video stream by using RTSP and do play backward/forward well?

Thanks,

Frank

Labels (3)
4 Replies

871 Views
智峰宋
Contributor I

Let me attach the full log of the above rtspsrc command for reference. From the log,  the RtpMP2TDepay plugin can see the movie duration (below in red), but aiurdemux can't see it.

set color key

MFW_GST_ISINK_PLUGIN 3.0.11 build on Feb  3 2015 21:18:07.

Support platform 3

go on ...

Setting pipeline to PAUSED ...

[INFO]    Product Info: i.MX6Q/D/S

vpudec versions :smileyhappy:

plugin: 3.0.11

wrapper: 1.0.46(VPUWRAPPER_ARM_LINUX Build on Feb  3 2015 20:40:10)

vpulib: 5.4.23

firmware: 3.1.1.46056

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: latency = 2000

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: buffer-mode = slave (1)

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1: timeout = 5000000

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0: caps = application/x-rtcp

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:send_rtcp_src: caps = application/x-rtcp

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink1.GstPad:sink: caps = application/x-rtcp

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0.GstProxyPad:proxypad2: caps = application/x-rtcp

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1: timeout = 0

/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)33, clock-rate=(int)90000, npt-start=(guint64)0, npt-stop=(guint64)1268000000000, play-speed=(double)1, play-scale=(double)1

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_2844096085_33: caps = application/x-rtp, media=(string)video, payload=(int)33, clock-rate=(int)90000, npt-start=(guint64)0, npt-stop=(guint64)1268000000000, play-speed=(double)1, play-scale=(double)1

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_2844096085_33.GstProxyPad:proxypad4: caps = application/x-rtp, media=(string)video, payload=(int)33, clock-rate=(int)90000, npt-start=(guint64)0, npt-stop=(guint64)1268000000000, play-speed=(double)1, play-scale=(double)1

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_2844096085_33.GstProxyPad:proxypad3: caps = application/x-rtp, media=(string)video, payload=(int)33, clock-rate=(int)90000, npt-start=(guint64)0, npt-stop=(guint64)1268000000000, play-speed=(double)1, play-scale=(double)1

/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = application/x-rtp, media=(string)video, payload=(int)33, clock-rate=(int)90000, npt-start=(guint64)0, npt-stop=(guint64)1268000000000, play-speed=(double)1, play-scale=(double)1

/GstPipeline:pipeline0/GstRtpMP2TDepay:rtpmp2tdepay0.GstPad:src: caps = video/mpegts, packetsize=(int)188, systemstream=(boolean)true

/GstPipeline:pipeline0/GstRtpMP2TDepay:rtpmp2tdepay0.GstPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)33, clock-rate=(int)90000, npt-start=(guint64)0, npt-stop=(guint64)1268000000000, play-speed=(double)1, play-scale=(double)1

Aiur: 3.0.11

Core: BLN_MAD-MMLAYER_MPG2PARSER_04.04.19  build on Jan 20 2014 02:03:56

  mime: video/mpeg, mpegversion=(int)[1,2]; video/mpegts, systemstream=true; video/x-cdxa

  file: /usr/lib/imx-mm/parser/lib_mpg2_parser_arm11_elinux.so.3.1

/GstPipeline:pipeline0/GstAiurDemux:demux.GstPad:sink: caps = video/mpegts, packetsize=(int)188, systemstream=(boolean)true

Content Info:

    Seekable  : No

    Size(byte): -1

Mpeg2CreateParser:parser created successfully

Movie Info:

     Seekable  : No

     Live      : Yes

     Duration  : 0:00:00.000000000

     ReadMode  : File

     programs    : 1

     Track    : 2

Track 00 [video_001100] Enabled

     ppid: 1, ppid 256

     Duration: 0:00:00.000000000

     Language: und

     Mime:

           video/x-h264, parsed=(boolean)true, width=(int)352, height=(int)288, framerate=(

           fraction)30/1

Track 01 [audio_001101] Enabled

     ppid: 1, ppid 257

     Duration: 0:00:00.000000000

     Language: und

     Mime:

           audio/x-ac3, channels=(int)1, rate=(int)32000, bitrate=(int)384000, framed=(bool

           ean)true

[INFO]    bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0

/GstPipeline:pipeline0/GstVpuDec:vpudec0.GstPad:sink: caps = video/x-h264, parsed=(boolean)true, width=(int)352, height=(int)288, framerate=(fraction)30/1

/GstPipeline:pipeline0/GstVpuDec:vpudec0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, crop-top=(int)0, crop-left=(int)0, crop-right=(int)0, crop-bottom=(int)0, num-buffers-required=(int)11, framerate=(fraction)30/1, alignment=(int)1

hwbuf allocator zone(155648) created

/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/x-ac3, channels=(int)1, rate=(int)32000, bitrate=(int)384000, framed=(boolean)true

/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/x-ac3, channels=(int)1, rate=(int)32000, bitrate=(int)384000, framed=(boolean)true

/GstPipeline:pipeline0/ffdec_ac3:ffdec_ac30.GstPad:sink: caps = audio/x-ac3, channels=(int)1, rate=(int)32000, bitrate=(int)384000, framed=(boolean)true

/GstPipeline:pipeline0/ffdec_ac3:ffdec_ac30.GstPad:src: caps = audio/x-raw-int, rate=(int)8000, channels=(int)1, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16

/GstPipeline:pipeline0/GstVolume:volume0.GstPad:src: caps = audio/x-raw-int, rate=(int)8000, channels=(int)1, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16

/GstPipeline:pipeline0/GstVolume:volume0.GstPad:sink: caps = audio/x-raw-int, rate=(int)8000, channels=(int)1, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16

/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = audio/x-raw-int, rate=(int)8000, channels=(int)1, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16

can not create threadmfw_gst_isink_setcaps:1489

/GstPipeline:pipeline0/MfwGstISink:mfwgstisink0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)NV12, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, crop-top=(int)0, crop-left=(int)0, crop-right=(int)0, crop-bottom=(int)0, num-buffers-required=(int)11, framerate=(fraction)30/1, alignment=(int)1

WARNING: from element /GstPipeline:pipeline0/MfwGstISink:mfwgstisink0: A lot of buffers are being dropped.

Additional debug info:

/opt/workspace/BSP/yocto/bl-ctl/imx6LBV3190_2015-01-14/buill_rom5420/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r3/gstreamer-0.10.36/libs/gst/base/gstbasesink.c(2875): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/MfwGstISink:mfwgstisink0:

There may be a timestamping problem, or this computer is too slow.

VS0 created. in fmt[NV12] win(0,0-352,288:352x288) out win(0,0-1024,768:1024x768)

set deinterlace mode 0

hwbuf allocator zone(614400) created

hwbuf allocator zone(614400) destroied.

hwbuf allocator zone(614400) created

hwbuf allocator zone(614400) destroied.

hwbuf allocator zone(614400) created

hwbuf allocator zone(614400) destroied.

Caught interrupt -- handling interrupt.

Interrupt: Stopping pipeline ...

Execution ended after 9514403083 ns.

Setting pipeline to PAUSED ...

Setting pipeline to READY ...

/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = NULL

/GstPipeline:pipeline0/MfwGstISink:mfwgstisink0.GstPad:sink: caps = NULL

/GstPipeline:pipeline0/GstVolume:volume0.GstPad:src: caps = NULL

/GstPipeline:pipeline0/GstVolume:volume0.GstPad:sink: caps = NULL

/GstPipeline:pipeline0/GstVpuDec:vpudec0.GstPad:src: caps = NULL

/GstPipeline:pipeline0/GstVpuDec:vpudec0.GstPad:sink: caps = NULL

/GstPipeline:pipeline0/ffdec_ac3:ffdec_ac30.GstPad:src: caps = NULL

/GstPipeline:pipeline0/ffdec_ac3:ffdec_ac30.GstPad:sink: caps = NULL

/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = NULL

/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = NULL

/GstPipeline:pipeline0/GstAiurDemux:demux.GstPad:audio_001101: caps = NULL

/GstPipeline:pipeline0/GstAiurDemux:demux.GstPad:video_001100: caps = NULL

/GstPipeline:pipeline0/GstAiurDemux:demux.GstPad:sink: caps = NULL

/GstPipeline:pipeline0/GstRtpMP2TDepay:rtpmp2tdepay0.GstPad:src: caps = NULL

/GstPipeline:pipeline0/GstRtpMP2TDepay:rtpmp2tdepay0.GstPad:sink: caps = NULL

/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = NULL

/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = NULL

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_2844096085_33: caps = NULL

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_2844096085_33: caps = NULL

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0: caps = NULL

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpPtDemux:rtpptdemux0.GstPad:src_33: caps = NULL

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:send_rtcp_src: caps = NULL

Setting pipeline to NULL ...

VS0 destroyed, force=0!

hwbuf allocator zone(155648) destroied.

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink1.GstPad:sink: caps = NULL

Freeing pipeline ...

[--->FINALIZE isink

[--->FINALIZE aiurdemux

871 Views
joanxie
NXP TechSupport
NXP TechSupport

pls try to  use gplay, like "gplay rtsp://", you can find the time bar.

0 Kudos

871 Views
huangbaokang
Contributor II

hi: Xie

   The situation is that:

1、 "gplay rtsp://xx.xx.xx.xx/file.mpg" can get the time bar.

2、"gplay rtsp://xx.xx.xx.xx/file.ts" can not get the time bar.

so the problem is that , it  is not seekable when playing rtsp about ".ts" format video.

0 Kudos

871 Views
huangbaokang
Contributor II

Dear  song:

    I have the same problem as you.

    I find that , the "tsdemux"  plugin can get the duraton from RTSP(TS format MOVIE) . But  it can't seek . output an errror below:

(CQplayer:23191): GStreamer-CRITICAL **: gst_mini_object_unref: assertion `GST_IS_MINI_OBJECT (mini_object)' failed

and then ,CQplayer  play the rtsp back to the beginning.

HOW it can seekable when playing  RTSP  about  ".TS format video" ???

0 Kudos