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

insert audiowatermark to UDP multicast Live Stream #9

Open
rtpmedia opened this issue Feb 8, 2022 · 2 comments
Open

insert audiowatermark to UDP multicast Live Stream #9

rtpmedia opened this issue Feb 8, 2022 · 2 comments

Comments

@rtpmedia
Copy link

rtpmedia commented Feb 8, 2022

Stefan. I am interested in your audio watermark solution.
Can it be used in live mpeg ts udp multicast broadcasting without video encoding ?
If yes, please send a description of how to do it

@swesterfeld
Copy link
Owner

If I understand your use case correctly, there is no direct support in audiowmark to do it (so there is no code to do anything for live mpeg ts / udp / multicast / broadcasting). However, what you could do is that you spawn an audiowmark add - - ... subprocess that does the watermarking on a stream of raw samples. You should then provide the input as raw samples and encode and send the output of the process using whatever method you want.

See

Here is an example of watermarking a stream using mpg123 1.25.13 and play the result using sox:

mpg123 -s song.mp3 | audiowmark add - - f0 --format raw --raw-rate 44100 | play -t raw -e signed -b 16 -r 44100 -c 2 -

@rtpmedia
Copy link
Author

rtpmedia commented Feb 8, 2022

Thanks for the reply. I read this

https://github.com/swesterfeld/audiowmark#output-as-stream
https://github.com/swesterfeld/audiowmark#input-from-stream
https://github.com/swesterfeld/audiowmark#raw-streams
Clarify in your example what is

mpg123 -s song.mp3 ?

The rest is clear.

In this case, it works.

ffmpeg -threads auto -thread_type 1 -i "udp://224.0.191.78:1234?fifo_size=50000000&overrun_nonfatal=1" -f s16le -acodec pcm_s16le -ar 48000 -ac 2 -vn -sn pipe:1 | ./audiowmark add - out.wav 0123456789abcdef0011223344556677 --input-format raw --raw-rate 48000

I have udp multicast at the input and udp multicast should be at the output

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