Command without need encode

Tim Müller tim at centricular.com
Sun Aug 13 10:06:17 UTC 2017


On Sat, 2017-08-12 at 16:59 -0700, RonRog wrote:

Hi,

> dont wotk and without error
> uridecodebin uri=rtmp://127.0.0.1/test/test ! h264parse ! mpegtsmux !
> multifilesink location=/%05d.ts sync=true next-file=key-unit-event
> post-messages=true

That's because uridecodebin decodes, so the whole h264parse ... sink
branch will never be linked and thus doesn't preroll. You should get a
warning in newer versions of gst-launch.


> work but without sound and a lot of cpu
> uridecodebin uri=rtmp://127.0.0.1/test/test ! x264enc ! mpegtsmux !
> multifilesink location=/%05d.ts sync=true next-file=key-unit-event
> post-messages=true

Right, because you decode and then re-encode.


> work fine but need set input codec
> rtmpsrc name=rtmpsrc location=rtmp://127.0.0.1/test/test timeout=5 !
> queue !
> flvdemux name=demuxer ! queue ! aacparse ! muxer. demuxer. ! queue !
> h264parse ! mpegtsmux name=muxer ! multifilesink location=/%05d.ts
> sync=true
> next-file=key-unit-event post-messages=true
> 
> I want a way to do this automatically, without even using the
> h264parse,
> something that works with any input which is already in the correct
> format,
> similar to copy of ffmpeg.

There's parsebin in newer versions of GStreamer, so you might be able
to do something like:

 mpegtsmux name=mux ! filesink location=foo.ts \
 rtmpsrc ! parsebin name=parse \
   parse. ! queue ! mux. \
   parse. ! queue ! mux.

- completely untested though!

Cheers
-Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com

Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/


More information about the gstreamer-devel mailing list