oggdec error - seems to be endianness problem
I am trying to use ezstream to send a vorbis ogg music file to icecast. The error simplifies down to this - when I use the following two commands to manually decode and then encode an ogg file, the resulting test.ogg file plays correctly oggdec -R -b 16 -e 0 -s 1 -o file.raw file.ogg
oggenc -r -B 16 -C 2 -R 44100 --raw-endianness 0 -q 5 -o test.ogg file.raw
But if I try to pipe the output of oggdec into the input of offenc as ezstream would do, the resulting file is only static. The defective pipe command is
oggdec -R -b 16 -e 0 -s 1 -o - file.ogg | oggenc -r -B 16 -C 2
-R 44100 --raw-endianness 0 -q 5 -o test.ogg -
However if I reverse the endianness in the pipe command of oggdec to -e 1 the resulting test.ogg plays properly. Somewhere in the handling of stdout the endianness is being reversed. This only happens when piping. Version info: linux 4.6.2 vorbis-tools-1.4.0 libvorbis-1.3.5 libogg-1.3.2 icecast-2.4.3 ezstream-0.6
Hardware is an intel i5 based system.