Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Format not recognized" when input is a stream #18

Open
OptimisticLock opened this issue May 16, 2022 · 2 comments
Open

"Format not recognized" when input is a stream #18

OptimisticLock opened this issue May 16, 2022 · 2 comments

Comments

@OptimisticLock
Copy link

OptimisticLock commented May 16, 2022

Hi,

I am getting this on Intel Mac:

$ wget https://patrickdearteaga.com/audio/Chiptronical.ogg 
$ cat Chiptronical.ogg |  docker run --rm -v $PWD/:/data audiowmark add - b.ogg 1     
audiowmark: error opening -: Format not recognised.

This works fine:

docker run --rm -v $PWD/:/data audiowmark add Chiptronical.ogg   b.ogg 1 
@OptimisticLock
Copy link
Author

OptimisticLock commented May 16, 2022

Silly me. I forgot to do docker run -i. Please disregard.

@swesterfeld
Copy link
Owner

I can reproduce the problem that you cannot use stdout in this case, while it does work when you provide an output filename:

$ wget https://patrickdearteaga.com/audio/Chiptronical.ogg
$ cat Chiptronical.ogg | docker run -v $PWD:/data --rm -i audiowmark add - - f0 > /dev/null
audiowmark: error writing to -: unable to write wav format to standard out without input length information
$ cat Chiptronical.ogg | docker run -v $PWD:/data --rm -i audiowmark add - x.wav f0
Input:        -
Output:       x.wav
Message:      f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
Strength:     10

Time:         unknown
Sample Rate:  44100
Channels:     2
Data Blocks:  4

The problem is that this (pulled by Dockerfile) version of libsndfile returns SF_COUNT_MAX as number of frames for the Chiptronical.ogg file if the file is provided stdin, and audiowmark cannot really handle this case when writing to stdout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants