Bitrate of a stream
SR.OR4CL3
rafaelvn13 at gmail.com
Wed Dec 13 11:27:51 UTC 2017
Hi, a need get a bitrate of a stream, i'm use the below code
import gst
host="127.0.0.1"
port=1234
p = "videotestsrc ! rtpvrawpay ! udpsink host=%s port=%s" %(host, port)
pipeline = gst.parse_launch(p)
udpsink = pipeline.get_by_name("udpsink0")
def print_stats():
data = udpsink.emit("get_stats", host, port)
stats = "bytes_sent: %s, packets_sent: %s, connect_time: %s"
%(data[0], data[1], data[2])
print stats
return True
import gobject
gobject.timeout_add_seconds(1, print_stats)
pipeline.set_state(gst.STATE_PLAYING)
import gtk
gtk.main()
But, he don't give me a bitrate, someone could help me ? ?????
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list