GNOME Bugzilla – Bug 729054
schroenc: Does not handle variable framerate streams
Last modified: 2014-06-06 07:37:28 UTC
I have the following working pipeline to receive, transcode, and stream a video, all with h264 (encapsulated in rtp in udp); gst-launch-1.0 udpsrc uri=udp://192.168.56.101:5000 caps='application/x-rtp, media=(string)video, clock-rate=90000' ! rtpmp2tdepay ! tsdemux ! h264parse ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw, width=500 ! x264enc tune=zerolatency bitrate=512! h264parse ! mpegtsmux ! rtpmp2tpay pt=33 ! udpsink host=192.168.56.102 port=4000 This gives no errors or warnings at all. When replacing x264enc + h264parse with schroenc, this is the resulting pipeline; gst-launch-1.0 udpsrc uri=udp://192.168.56.101:5000 caps='application/x-rtp, media=(string)video, clock-rate=90000' ! rtpmp2tdepay ! tsdemux ! h264parse ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw, width=500 ! schroenc bitrate=512 ! mpegtsmux ! rtpmp2tpay pt=33 ! udpsink host=192.168.56.102 port=4000 This gives me the following 2 criticals: (gst-launch-1.0:9832): GStreamer-CRITICAL **: _gst_util_uint64_scale: assertion `denom != 0' failed ** (gst-launch-1.0:9832): CRITICAL **: gst_video_encoder_set_latency: assertion `GST_CLOCK_TIME_IS_VALID (min_latency)' failed It does start encoding, but after a few seconds it stops with the terminal message "Killed" If using a videotestsrc ! schroenc ! ... (same parts as above), it works. Some debug info here: http://pastebin.com/yFXh2KBs
The schroenc encoder requires a framerate, RTP doesn't provide that.. So that's why it was complaining, now just force a random one (30 FPS). commit e259557c5a203dbc6fb20215dacf916687bf5229 Author: Olivier Crête <olivier.crete@collabora.com> Date: Thu Jun 5 16:45:12 2014 -0400 schroenc: Use an arbitrary framerate if none if given The schro encoder always requires a framerate, but some source material, such as RTP doesn't have a fixed one, so just fake it. https://bugzilla.gnome.org/show_bug.cgi?id=729054