# Some files lead to an error: GStreamer error: Internal data stream error

**URL:** <https://discourse.mopidy.com/t/some-files-lead-to-an-error-gstreamer-error-internal-data-stream-error/5831>\
**Category:** Help and support\
**Created:** [October 14, 2023, 8:49pm UTC](https://discourse.mopidy.com/t/some-files-lead-to-an-error-gstreamer-error-internal-data-stream-error/5831 "2023-10-14T20:49:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/zhao/32/2424_2.png) [@Zhao](https://discourse.mopidy.com/u/Zhao)\
**Post date:** [October 14, 2023, 8:49pm UTC](https://discourse.mopidy.com/t/some-files-lead-to-an-error-gstreamer-error-internal-data-stream-error/5831/1 "2023-10-14T20:49:23Z")

</div>

I’m not sure why this is happening. Some files run perfectly fine (playing normally with sound output), whilst others with the same extension result in a Gstreamer error (the file doesn’t play at all, no sound):

```auto
ERROR 2023-10-14 20:03:59,512 [1:MainThread] mopidy.audio.gst
  GStreamer error: Internal data stream error.

```

My audio line in the conf file is:

```auto
[audio]
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! autoaudiosink

```

Can anyone offer some things to try please?

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [October 14, 2023, 9:27pm UTC](https://discourse.mopidy.com/t/some-files-lead-to-an-error-gstreamer-error-internal-data-stream-error/5831/2 "2023-10-14T21:27:02Z")

</div>

Do you need that resampling? What happens if you remove it? Are the erroring files a different bitrate to the working ones?

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [October 14, 2023, 9:27pm UTC](https://discourse.mopidy.com/t/some-files-lead-to-an-error-gstreamer-error-internal-data-stream-error/5831/3 "2023-10-14T21:27:47Z")

</div>

Otherwise, there’s [Troubleshooting — Mopidy 3.4.1-7-g1e299e58 documentation](https://docs.mopidy.com/en/latest/troubleshooting/#debugging-gstreamer)

---

<div class="post-metadata">

**Author:** ![Zhao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/zhao/32/2424_2.png) [@Zhao](https://discourse.mopidy.com/u/Zhao)\
**Post date:** [October 14, 2023, 9:29pm UTC](https://discourse.mopidy.com/t/some-files-lead-to-an-error-gstreamer-error-internal-data-stream-error/5831/4 "2023-10-14T21:29:46Z")

</div>

Yes, if I don’t resample I get a bit of a static sound coming out. Also, even when removing the resampling, the problem files don’t play for some reason.

---

<div class="post-metadata">

**Author:** ![Zhao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/zhao/32/2424_2.png) [@Zhao](https://discourse.mopidy.com/u/Zhao)\
**Post date:** [October 14, 2023, 10:17pm UTC](https://discourse.mopidy.com/t/some-files-lead-to-an-error-gstreamer-error-internal-data-stream-error/5831/5 "2023-10-14T22:17:32Z")

</div>

When it didn’t work here are the error messages (below).  
Does this mean I need to deinterleave the audio stream?

````auto
0:00:22.748341178 1 0x7f757803d140 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<conv> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)352800, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:22.748729587 1 0x7f757803d140 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<conv> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)352800, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:22.748737499 1 0x7f757803d140 WARN GST_PADS gstpad.c:4226:gst_pad_peer_query:<sink:proxypad9> could not send sticky events
0:00:22.749223845 1 0x7f757803d140 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<conv> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)352800, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:22.749232752 1 0x7f757803d140 WARN GST_PADS gstpad.c:4226:gst_pad_peer_query:<sink:proxypad9> could not send sticky events
0:00:22.749824065 1 0x7f757803d140 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<conv> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)352800, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:22.750131864 1 0x7f757803d140 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<conv> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)352800, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:22.750425699 1 0x7f757803d140 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<conv> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)352800, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:22.750722170 1 0x7f757803d140 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<conv> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)352800, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:22.750858664 1 0x7f758c240770 WARN libav gstavdemux.c:1548:gst_ffmpegdemux_loop:<avdemux_dsf0> stream_movi flow: not-negotiated / not-negotiated
0:00:22.750874104 1 0x7f758c240770 WARN libav gstavdemux.c:1597:gst_ffmpegdemux_loop:<avdemux_dsf0> error: Internal data stream error.
0:00:22.750878873 1 0x7f758c240770 WARN libav gstavdemux.c:1597:gst_ffmpegdemux_loop:<avdemux_dsf0> error: streaming stopped, reason not-negotiated (-4)```
````

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [October 14, 2023, 11:01pm UTC](https://discourse.mopidy.com/t/some-files-lead-to-an-error-gstreamer-error-internal-data-stream-error/5831/6 "2023-10-14T23:01:05Z")

</div>

Do the bad files all contain 6 channel audio?

---

<div class="post-metadata">

**Author:** ![Zhao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/zhao/32/2424_2.png) [@Zhao](https://discourse.mopidy.com/u/Zhao)\
**Post date:** [October 14, 2023, 11:21pm UTC](https://discourse.mopidy.com/t/some-files-lead-to-an-error-gstreamer-error-internal-data-stream-error/5831/7 "2023-10-14T23:21:48Z")

</div>

That particular album has 6 channel audio, yes. I haven’t been able to find any other albums (out of maybe 30) that won’t play yet but haven’t had the chance to go through all of them yet.

There’s another flac file that gives the following error that otherwise plays fine on Windows PC [https://freesound.org/people/Philip\_Goddard/sounds/705761/](https://freesound.org/people/Philip_Goddard/sounds/705761/). The error is below:

```auto
0:38:27.425804706 1 0x26f5000 WARN flacparse gstflacparse.c:821:gst_flac_parse_handle_frame:<flacparse20> EOS
0:38:27.425846766 1 0x26f5000 WARN flacparse gstflacparse.c:821:gst_flac_parse_handle_frame:<flacparse20> EOS
0:38:27.425876550 1 0x26f5000 WARN flacparse gstflacparse.c:821:gst_flac_parse_handle_frame:<flacparse20> EOS
0:38:27.425932849 1 0x26f5000 WARN basesrc gstbasesrc.c:2445:gst_base_src_update_length:<source> processing at or past EOS
0:38:27.425972878 1 0x26f5000 WARN audiodecoder gstaudiodecoder.c:2263:gst_audio_decoder_sink_eventfunc:<flacdec20> error: No valid frames decoded before end of stream
0:38:27.425978284 1 0x26f5000 WARN audiodecoder gstaudiodecoder.c:2263:gst_audio_decoder_sink_eventfunc:<flacdec20> error: no valid frames found
ERROR 2023-10-14 23:11:42,462 [1:MainThread] mopidy.audio.gst
  GStreamer error: No valid frames decoded before end of stream
0:38:27.427852327 1 0x28fe180 WARN default oss4-property-probe.c:303:gst_oss4_property_probe_get_values:<autoaudiosink0-actual-sink-oss4> Can't open file descriptor to probe available devices: No such file or directory
0:38:27.427872440 1 0x28fe180 WARN oss4sink oss4-sink.c:514:gst_oss4_sink_open:<autoaudiosink0-actual-sink-oss4> error: Could not open audio device for playback.
0:38:27.427877209 1 0x28fe180 WARN oss4sink oss4-sink.c:514:gst_oss4_sink_open:<autoaudiosink0-actual-sink-oss4> error: system error: No such file or directory

```

They both have the `basesrc gstbasesrc.c:2445:gst_base_src_update_length:<source> processing at or past EOS` error in common

Edit: One of them (the flac file) was a seektable metadata block that was corrupted (the flac file linked above). Re-encoding it allows it to be played (`flac -V input.flac`).

Edit 2: The other one is a dsf file. Converting this to flac (eg `ffmpeg -i 'input.dsf' -c:a flac -af "lowpass=24000, volume=6dB" -sample_fmt s16 -ar 48000 'output.flac'`) does the job

Not sure if these are solutions or workarounds. They can be easily tested from console with `gst-play-1.0 --gst-debug=*:3 'song_name''` once the appropriate package(s) are installed (`apt install gstreamer1.0-plugins-base-apps`) and so on.

To convert an entire folder do this: `for i in *.dsf; do ffmpeg -i "$i" -c:a flac -af "lowpass=24000, volume=6dB" -sample_fmt s16 -ar 48000 "${i%.*}.flac";done`

Maybe someone will find this useful.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/system/32/1_2.png) [@system](https://discourse.mopidy.com/u/system)\
**Post date:** [April 14, 2024, 11:22am UTC](https://discourse.mopidy.com/t/some-files-lead-to-an-error-gstreamer-error-internal-data-stream-error/5831/8 "2024-04-14T11:22:31Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
