mpegts muxing of arbitrary movies for streaming
Tim Müller
tim at centricular.com
Tue Sep 8 03:32:07 PDT 2015
On Sat, 2015-09-05 at 17:00 +0100, Manusha Wijekoon wrote:
Hi
> I am trying to demux/decode an arbitrary movie file and then re-mux it
> to a mpegts stream to use in streaming. I am able to do this for
> video, but it needs to support audio as well as subtitles. As a first
> step I tried adding audio to the already working video only pipeline.
> (NOTE: I have removed the streaming elements here).
>
>
> gst-launch-1.0 -v filesrc location=movie.mkv ! decodebin name=dec !
> queue ! videoconvert ! videorate ! avenc_mpeg2video ! mpegtsmux
> name=mux ! tsdemux name=de ! video/mpeg ! queue ! avdec_mpeg2video !
> autovideosink de. ! queue ! audio/mpeg ! avdec_mp2float ! alsasink
> dec. ! audioparse ! audioconvert ! audioresample ! audiorate !
> avenc_mp2 ! mux.
>
>
>
> however this does not work and gives this error.
>
>
> :00:01.214010413 14290 0x7fb228012b20 DEBUG GST_PADS
> gstpad.c:5150:gst_pad_send_event_unchecked:<src_2:proxypad5> sent
> event, ret error
> 0:00:01.218444164 14290 0x7fb228012990 DEBUG videodecoder
> gstvideodecoder.c:3008:gst_video_decoder_decode_frame:<avdec_h264-0>
> flow error not-negotiated
> 0:00:01.220119392 14290 0x7fb22c0484f0 WARN matroskademux
> matroska-demux.c:4500:gst_matroska_demux_loop:<matroskademux0> error:
> stream stopped, reason not-negotiated
not-negotiated indicates a problem with caps/format negotiation. It's
probably an error propagated upstream in the pipeline, so probably
happens somewhere downstream.
I would recommend to simplify your pipeline one step at a time to see
where it comes from. That is, replace sinks by fakesink, then replace
element by element. Remove audio branches, remove video branches, etc.
Alternatively, make a GST_DEBUG=*:6 log and grep for the first
occurrence of 'not-negotiated' to see what element/pad it is.
avdec_mp2float ! alsasink might be problematic, depending on the device
chosen. Check if adding an audioconvert between the two helps.
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
Join us at the GStreamer Conference: 8-9 October 2015 in Dublin, Ireland
More information about the gstreamer-devel
mailing list