A streaming problem

20 views
Skip to first unread message

Irina R

unread,
Mar 28, 2022, 12:37:16 AM3/28/22
to audiowmark
Hi,

I am running this command: 

$ docker run -v ${PWD}:/data -it audiowmark_image  add s.ogg - 555 --json=a.json | head -n 10


I am getting this output:


Input:        s.ogg

Output:       -

Message:      55555555555555555555555555555555

Strength:     10


Time:         4:03

Sample Rate:  44100

Channels:     2

RIFF<^?WAVEfmt D?? data^???????m???b???????????7"W????????2????Y???????4??????{??????

???                                                                                       ??p???????

?? a???=???=

  ??????????^


Question. How can I silence the header, so that my output become a legitimate wav file that can be piped into ffplay?

Also, a.json isn't found, perhaps I am doing something wrong.

On a side note, perhaps you know from the top of your head why the command below plays white noise?  

$ docker run -v ${PWD}:/data -it audiowmark_image  add s.ogg - 555 --json a.json --strength 5 | tail -n +9 | ffplay -


Stefan Westerfeld

unread,
Mar 28, 2022, 8:15:40 AM3/28/22
to audio...@googlegroups.com
Hi!

Ok, there are two different issues here:

(1) audiowmark writes status information to stderr and the watermarked
audio data to stdout. So you need not split the streams or disable the
status information, simply use stdout and everything will be fine.

The problem in your case is that you use "-it" as options for docker,
which will effectively merge stdout and stderr, as I found here:

https://unix.stackexchange.com/questions/616616/separate-stdout-and-stderr-for-docker-run

So if you use "-i" for docker run instead of "-it" everything should be
fine.

(2) You use --json for "audiowmark add", but the option only affects
"audiowmark get", so the --json option actually does nothing in your case.

For issue (1) I should probably update the documentation, for issue (2)
I should probably update the code to fail if you pass --json to
"audiowmark add".

Cu... Stefan

Am 28.03.22 um 06:37 schrieb Irina R:
> Hi,
>
> I am running this command:
>
> *$ docker run -v ${PWD}:/data -it audiowmark_image  add s.ogg - 555
> --json=a.json | head -n 10*
>
>
> I am getting this output:
>
>
> *Input:        s.ogg*
>
> *Output:       -*
>
> *Message:      55555555555555555555555555555555*
>
> *Strength:     10*
>
> *
> *
>
> *Time:         4:03*
>
> *Sample Rate:  44100*
>
> *Channels:     2*
>
> *RIFF<^?WAVEfmt
> D?? data^???????m???b???????????7"W????????2????Y???????4??????{??????*
>
> *???
>                   ??p???????*
>
> *?? a???=???=*
>
> *  ??????????^*
>
>
> Question. How can I silence the header, so that my output become a
> legitimate wav file that can be piped into ffplay?
>
> Also, a.json isn't found, perhaps I am doing something wrong.
>
> On a side note, perhaps you know from the top of your head why the
> command below plays white noise?
>
> *$ docker run -v ${PWD}:/data -it audiowmark_image  add s.ogg - 555
> --json a.json --strength 5 | tail -n +9 | ffplay -*
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "audiowmark" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to audiowmark+...@googlegroups.com
> <mailto:audiowmark+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/audiowmark/6bab7f79-40f7-4635-8374-dcf5271bd590n%40googlegroups.com
> <https://groups.google.com/d/msgid/audiowmark/6bab7f79-40f7-4635-8374-dcf5271bd590n%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Stefan Westerfeld, http://space.twc.de/~stefan

Irina R

unread,
Mar 30, 2022, 1:09:12 AM3/30/22
to audiowmark
Oh. Thank you! It worked. 
Reply all
Reply to author
Forward
0 new messages