The `concat` and `flacenc` elements don’t interact well together, leading to an SIGABRT
Describe your issue
Running a gstreamer pipeline that combines concat
and flacenc
like so can sometimes abort the entire process (and doesn’t work if it doesn't)
gst-launch-1.0 concat name=input audiotestsrc num-buffers=100 ! input.sink_0 audiotestsrc num-buffers=100 ! input.sink_1 input. ! flacenc ! fakesink
Expected Behavior
This failing probably has a pretty good reason. I’m not seeing a good way to resolve it quite yet. This aborting, probably does not – I would expect gstreamer pipelines combining high quality elements to generally never abort.
Observed Behavior
The command fails with SIGABRT and the following messages:
WARNING: from element /GstPipeline:pipeline0/GstFlacEnc:flacenc0: The stream is in the wrong format.
Additional debug info:
../ext/flac/gstflacenc.c(1396): gst_flac_enc_handle_frame (): /GstPipeline:pipeline0/GstFlacEnc:flacenc0: Stream discontinuity detected. The output may have wrong timestamps, consider using audiorate to handle discontinuities
ERROR: from element /GstPipeline:pipeline0/GstFlacEnc:flacenc0: received more encoded samples 4608 than provided 4096 as inputs
Additional debug info:
../gst-libs/gst/audio/gstaudioencoder.c(1039): gst_audio_encoder_finish_frame (): /GstPipeline:pipeline0/GstFlacEnc:flacenc0
Execution ended after 0:00:00.004580563
Setting pipeline to NULL ...
**
GStreamer-Audio:ERROR:../gst-libs/gst/audio/gstaudioencoder.c:1046:gst_audio_encoder_finish_frame: code should not be reached
Bail out! GStreamer-Audio:ERROR:../gst-libs/gst/audio/gstaudioencoder.c:1046:gst_audio_encoder_finish_frame: code should not be reached
fish: Job 1, 'gst-launch-1.0 concat name=inpu…' terminated by signal SIGABRT (Abort)
Setup
- Operating System: NixOS
- GStreamer Version: 1.20.3
-
Command line:
gst-launch-1.0 concat name=input audiotestsrc num-buffers=100 ! input.sink_0 audiotestsrc num-buffers=100 ! input.sink_1 input. ! flacenc ! fakesink
Steps to reproduce the bug
- Run
gst-launch-1.0 concat name=input audiotestsrc num-buffers=100 ! input.sink_0 audiotestsrc num-buffers=100 ! input.sink_1 input. ! flacenc ! fakesink
How reproducible is the bug?
Always
Solutions you have tried
Changing the number of buffers can hide the abort, but the discontinuity error remains.