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):
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.
When it didn’t work here are the error messages (below).
Does this mean I need to deinterleave the audio stream?
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)```
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.
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