Hi all,
I am trying to come up with a pipeline that transcodes the video in a transport stream, but leaves everything else intact: tsdemux emit-stats=true name=demux ! queue leaky=downstream max-size-time=5000000000 ! h264parse ! mpegtsmux name=mux ! hlssink target-duration=0 demux. ! queue leaky=downstream max-size-time=5000000000 ! mux. So far, the transcoding part works fine. The problem starts when I want to pass all other streams (auto, subtitles) through unchanged. I’ve found not clear examples on how to do this, so I’ve tried wiring the demuxer direct to the muxer through a queue. This fails as follows: (gst-launch-1.0:4202): GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed Can anyone confirm what the correct way is to pass through streams from a demuxer to a muxer unchanged? Regards, Graham — _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel smime.p7s (4K) Download Attachment |
Hi,
On Mon, 2016-10-24 at 00:22 +0200, Graham Leggett wrote: > I am trying to come up with a pipeline that transcodes the video in a > transport stream, but leaves everything else intact: > > tsdemux emit-stats=true name=demux ! queue leaky=downstream max-size- > time=5000000000 ! h264parse ! mpegtsmux name=mux ! hlssink target- > duration=0 demux. ! queue leaky=downstream max-size- > time=5000000000 ! mux. > > So far, the transcoding part works fine. The problem starts when I > want to pass all other streams (auto, subtitles) through unchanged. > I’ve found not clear examples on how to do this, so I’ve tried wiring > the demuxer direct to the muxer through a queue. This fails as > follows: > > (gst-launch-1.0:4202): GStreamer-CRITICAL **: > gst_segment_to_running_time: assertion 'segment->format == format' > failed > > Can anyone confirm what the correct way is to pass through streams > from a demuxer to a muxer unchanged? You need to add a parser for the audio codec, for example, aacparse if the audio is AAC. -- Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On 24 Oct 2016, at 3:03 AM, Olivier Crête <[hidden email]> wrote:
>> Can anyone confirm what the correct way is to pass through streams >> from a demuxer to a muxer unchanged? > > You need to add a parser for the audio codec, for example, aacparse if > the audio is AAC. Unfortunately that would only have an effect if an AAC stream is present, what I’m after is passing through everything other than video from the demuxer to the muxer, unchanged. Is this possible? Regards, Graham — _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel smime.p7s (4K) Download Attachment |
Hi,
Then you muse use the appropriate parser for each stream. You can try using parsebin from git master or you can use decodebin and select to decode or not using the "autoplug-continue" signal to autoplug the parser. Sadly, we still don't have a nice transcoding/transmuxing API in the core of GStreamer, but gst-transcoder[1] from the pitivi project may be a start in the direction you want. Olivier [1] https://github.com/pitivi/gst-transcoder On Mon, 2016-10-24 at 12:46 +0200, Graham Leggett wrote: > On 24 Oct 2016, at 3:03 AM, Olivier Crête <[hidden email] > m> wrote: > > > > > > > > > Can anyone confirm what the correct way is to pass through > > > streams > > > from a demuxer to a muxer unchanged? > > > > You need to add a parser for the audio codec, for example, aacparse > > if > > the audio is AAC. > > Unfortunately that would only have an effect if an AAC stream is > present, what I’m after is passing through everything other than > video from the demuxer to the muxer, unchanged. > > Is this possible? > > Regards, > Graham > — > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On 24 Oct 2016, at 6:26 PM, Olivier Crête <[hidden email]> wrote:
> Then you muse use the appropriate parser for each stream. You can try > using parsebin from git master or you can use decodebin and select to > decode or not using the "autoplug-continue" signal to autoplug the > parser. Sadly, we still don't have a nice transcoding/transmuxing API > in the core of GStreamer, but gst-transcoder[1] from the pitivi project > may be a start in the direction you want. Right now I’m keen to start with anything that’ll give me working audio, I can optimise things later. I’ve tried decodebin3 as below (this is a guess, I cannot find any usable decodebin3 examples that show it being used anywhere apart from this presentation[1]): - Video only worked fine, now hangs after 10 seconds or so: ... ! decodebin3 name=demux ! omxh264enc target-bitrate=500000 control-rate=variable-skip-frames inline-header=true periodicty_idr=25 ! h264parse config-interval=10 ! mpegtsmux name=mux ! hlssink target-duration=0 - Video + audio hangs immediately: ... ! decodebin3 name=demux ! omxh264enc target-bitrate=500000 control-rate=variable-skip-frames inline-header=true periodicty_idr=25 ! h264parse config-interval=10 ! mpegtsmux name=mux ! hlssink target-duration=0 demux. ! queue ! audiorate ! voaacenc ! aacparse ! mux. - Audio only hangs after about 5 seconds, and video decoder is started for no clear reason: … ! decodebin3 name=demux ! audioconvert ! voaacenc ! aacparse ! mpegtsmux name=mux ! hlssink target-duration=0 Does anyone have any examples of how decodebin3 is used in practise? [1] https://gstreamer.freedesktop.org/data/events/gstreamer-conference/2015/Edward%20Hervey%20-%20decodebin3.pdf Regards, Graham — _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel smime.p7s (4K) Download Attachment |
In reply to this post by Graham Leggett
Le 24/10/2016 à 00:22, Graham Leggett a écrit :
> So far, the transcoding part works fine. The problem starts when I want to pass all other streams (auto, subtitles) through unchanged. I’ve found not clear examples on how to do this, so I’ve tried wiring the demuxer direct to the muxer through a queue. This fails as follows: > > (gst-launch-1.0:4202): GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed > > Can anyone confirm what the correct way is to pass through streams from a demuxer to a muxer unchanged? Hello, For subtitle, you may fall on this bug : https://bugzilla.gnome.org/show_bug.cgi?id=759807 There is a proposed patch that worked in my case. regards, -- vincent. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |