matroska webm muxer setting media duration on EOS

putrasto putrasto at oita-apc.co.jp
Fri Feb 2 07:09:46 UTC 2018


Hello,

I have to save live stream vp8+opus to webm file
because this is live stream i can understand that during writing the webm
file does not have media duration.
The problem is until EOS the media duration still not available.

How to set correct media duration when received EOS?


/////// the elements in script but my program is in c++
#!/bin/sh
#
# A simple RTP receiver 
#

VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)VP8"
AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)48000,encoding-name=(string)OPUS"

SRC=localhost
DEST=localhost

VIDEO_DEC="rtpvp8depay"
AUDIO_DEC="rtpopusdepay ! capsfilter
caps=audio/x-opus,rate=48000,channels=1,channel-mapping-family=0,stream-count=1"

VIDEO_SINK="queue ! webmmux streamable=true max-cluster-duration=1000000000 
name=mux ! filesink location=/Users/putrasto/Downloads/output17.webm"
AUDIO_SINK="queue ! mux."
gst-launch-1.0 -v -e rtpbin name=rtpbin latency=$LATENCY                                   
\
           udpsrc name=udp-src-1 caps=$VIDEO_CAPS address=$SRC port=5000 !
rtpbin.recv_rtp_sink_0                   \
	         rtpbin. ! $VIDEO_DEC ! $VIDEO_SINK                                    
\
           udpsrc name=udp-src-2 address=$SRC port=5001 !
rtpbin.recv_rtcp_sink_0                                   \
           rtpbin.send_rtcp_src_0 ! udpsink host=$DEST port=5005 sync=true
async=false \
	   udpsrc name=udp-src-3 caps=$AUDIO_CAPS address=$SRC port=5002 !
rtpbin.recv_rtp_sink_1                   \
	         rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK                                    
\
           udpsrc name=udp-src-4 address=$SRC port=5003 !
rtpbin.recv_rtcp_sink_1                                   \
           rtpbin.send_rtcp_src_1 ! udpsink host=$DEST port=5007 sync=true
async=false



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list