<div dir="ltr">rtsp-producer is a component in flumotion Streaming Server (built on gstreamer) which recives RTSP stream, decode it and serves decoded audio and video to the next component in the flow.<br>I want to modify this component to skip decoding; I just want to recive RTSP stream and expose the encoded A/V (audio:aac/video:h264) to the next component (which will mux them useing mp4mux before serving them through http-streamer to HTML5 webpage)<br>
This is the RTSP component code file (rtsp.py) which generates the pipeline:<br><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">class Rtsp(feedcomponent.ParseLaunchComponent):</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> def get_pipeline_string(self, properties):</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> width = properties.get('width', 0)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> height = properties.get('height', 0)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> location = properties.get('location')</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> framerate = properties.get('framerate', (25, 2))</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> has_audio = properties.get('has-audio', True)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> if width > 0 and height > 0:</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> scaling_template = (" videoscale method=1 ! "</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> "video/x-raw-yuv,width=%d,height=%d !" % (width, height))</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> else:</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> scaling_template = ""</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> if has_audio:</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> audio_template = "d. ! queue ! audioconvert ! audio/x-raw-int"</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> else:</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> audio_template = "fakesrc silent=true ! audio/x-raw-int"</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> return ("rtspsrc name=src location=%s ! decodebin name=d ! queue "</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> " ! %s ffmpegcolorspace ! video/x-raw-yuv "</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> " ! videorate ! video/x-raw-yuv,framerate=%d/%d ! "</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> " @feeder:video@ %s ! @feeder:audio@"</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> % (location, scaling_template, framerate[0],</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> framerate[1], audio_template))<br><br><font style="font-family:arial,helvetica,sans-serif" size="2">How do I modify this to achieve my goal ?</font><br></span></div>