<div dir="ltr">I have an app that implements the RTMP protocol from an ingestion/server perspective.  This app properly implements the RTMP protocol and assembles messages for the other parts of my app to handle.  Currently I'm taking all of the video and audio messages and writing their payloads to an AppSrc in FLV format.<div><br></div><div>My app src is created like this:</div><div><br></div><div>        GstElement* ret = make_element("appsrc", name);<br>        GstCaps* parsedCaps = gst_caps_from_string("video/x-flv");<br>        g_object_set(G_OBJECT(ret),<br>                     "caps",            parsedCaps,<br>                     "is-live",         true,<br>                     "block",           false,<br>                     "format",          GST_FORMAT_BYTES,<br>                     "duration",        GST_CLOCK_TIME_NONE,<br>                     "stream-type",     GST_APP_STREAM_TYPE_STREAM,<br>                     "max-bytes",       200000000,<br>                     nullptr);<br>        gst_caps_unref(parsedCaps);<br></div><div><br></div><div>I initially write an FLV header and an onMetaData tag to the appsrc giving it details like framerate, bitrate, etc.  Then for every video and audio message coming over the RTMP wire I write a corrosponding FLV tag to the app src.</div><div><br></div><div>The app source feeds into a decodebin and then further down to some other stuff.  The problem that I'm having is that the decodebin detects the framerate of the FLV incorrectly.  It's doing it at ~17 fps when it's really at ~30fps.  This results in the stream having the appearance of being much slower than it actually is.  I'm curious if I'm potentially missing something obvious with decodebin.</div><div><br></div><div>During debugging I wrote the FLV data to a file as well.  I found that playback of that file in vlc was also incorrectly assuming ~17fps however FFPlay (ffmpeg) played the file correctly (and ffprobe showed the correct framerate information).</div><div><br></div><div>Incase it's helpful, follows is the rest of my pipeline, each of the bins get stitched together in real time as the pipeline comes to life (this->input is the AppSrc element, and in this case this->output happens to be an rtmpsink):</div><div><br></div><div>    string decoderBinDesc = std::string("")<br>            + "queue name=input "<br>            + "   ! decodebin name=output ";<br><br>    string videoFilterBinDesc = std::string("")<br>            + "videoconvert name=input "<br>            + "   ! video/x-raw,format=" + frameFormat + " "<br>            + "   ! streamhubvideofilter name=output ";<br><br>    string videoEncoderBinDesc = std::string("")<br>            + "videoconvert name=input "<br>            + (!enableHwAccel<br>                ? "   ! x264enc bitrate=6000 pass=0 speed-preset=1 option-string=\"subq=4:bframes=2:b_pyramid=normal:weight_b\" "<br>                  "   ! video/x-h264,stream-format=avc,profile=main "<br>                : "   ! nvh264enc preset=low-latency-hp "<br>                  "   ! video/x-h264,profile=main ")<br>            + "   ! h264parse name=output ";<br><br>    string audioEncoderBinDesc = std::string("")<br>            + "audioconvert name=input "<br>            + "   ! audio/x-raw,channels=2 "<br>            + "   ! avenc_aac "<br>            + "   ! audio/mpeg,channels=2 "<br>            + "   ! aacparse name=output ";<br><br>    string muxerBinDesc = std::string("")<br>            + "multiqueue name=input max-size-bytes=0 "<br>            + "   ! flvmux name=output streamable=true ";<br><br>        this->decoderBin        = parse_bin(decoderBinDesc, false, "DecoderBin");<br>        this->videoFilterBin    = parse_bin(videoFilterBinDesc, false, "VideoFilterBin");<br>        this->videoEncoderBin   = parse_bin(videoEncoderBinDesc, false, "VideoEncoderBin");<br>        this->audioEncoderBin   = parse_bin(audioEncoderBinDesc, false, "AudioEncoderBin");<br>        this->muxerBin          = parse_bin(muxerBinDesc, false, "MuxerBin");<br>        this->input             = inputFactory("input");<br>        this->output            = outputFactory("output");<br></div><div><br></div></div>