Completly cut a frequency range

Questions involving a Windows version of FFmpeg.
pandy
Posts: 183
Joined: Mon Feb 24, 2014 1:46 pm

Re: Completly cut a frequency range

Post by pandy » Tue Jul 09, 2019 5:48 pm

Djketley wrote:
Mon Jul 08, 2019 10:07 pm
Thank you for your explanation you have been super helpfull. It would probably help if you understood the context in which this is needed for:

Im developing a system to watermark audio using complete frequecny cuts cutting 100hz at the most dominant frequency then using showspectrum and image recognition based on the those cuts im able to generate an id thats matched in my database the cuts only last for 0.3 seconds (ideally trying to be inaudable but still visible in the spectrum using high res images) ive been having success with simply using sinc filters but they have been unable to cut the audio comepletely and if the audio is piticularly noisy in the area selected for the watermark the cuts are even less visible. Ideally the cuts need to be -180db (giving me a black spot on the spectrum). I come from C# world and not so much the audio world so its been a learning curve but you guy's have been extremely helpful. Im going to experiment with your response and hopefully it solves my issue. After that id ideally like to make some kind of warpper class for ffmpeg to remove the use of the exe.
This kind of watermark (protection) was used in beginning of 90's if i recall correctly (and it was audible), your watermark will be very easy to defeat by spectrum interpolation. Good and robust watermarking usually modulate (usually in pseudo-random way - check Direct Spread Spectrum or Code Spread https://en.wikipedia.org/wiki/Direct-se ... d_spectrum) phase of signal (complex FFT, manipulating imaginary part then iFFT - within some spectrum (usually this spectrum part where based on ATH human ear is less sensitive), phase changes are usually small (less than 15 - 30 deg) to anyway prevent being detected by human ear. modulation speed is also relatively slow. Such watermarking if done correctly is extremely difficult to be defeated (look at famous Cinavia - they occupying spectrum between 7 and 9kHz wisely using pseudrandomly coded phase).

IMHO you should start friendly relation with FFT and you should use FFT in wise way not by modifying amplitude of signal but phase (check also something called OFDM https://en.wikipedia.org/wiki/Orthogona ... ltiplexing ). There is few other possibilities (add modulated noise with sufficiently low level etc)

btw you can even create own signature like this https://twistedsifter.com/2013/01/hidde ... trographs/

Djketley
Posts: 8
Joined: Sat May 25, 2019 1:20 am

Re: Completly cut a frequency range

Post by Djketley » Tue Jul 09, 2019 7:03 pm

pandy wrote:
Tue Jul 09, 2019 5:48 pm

This kind of watermark (protection) was used in beginning of 90's if i recall correctly (and it was audible), your watermark will be very easy to defeat by spectrum interpolation. Good and robust watermarking usually modulate (usually in pseudo-random way - check Direct Spread Spectrum or Code Spread https://en.wikipedia.org/wiki/Direct-se ... d_spectrum) phase of signal (complex FFT, manipulating imaginary part then iFFT - within some spectrum (usually this spectrum part where based on ATH human ear is less sensitive), phase changes are usually small (less than 15 - 30 deg) to anyway prevent being detected by human ear. modulation speed is also relatively slow. Such watermarking if done correctly is extremely difficult to be defeated (look at famous Cinavia - they occupying spectrum between 7 and 9kHz wisely using pseudrandomly coded phase).

IMHO you should start friendly relation with FFT and you should use FFT in wise way not by modifying amplitude of signal but phase (check also something called OFDM https://en.wikipedia.org/wiki/Orthogona ... ltiplexing ). There is few other possibilities (add modulated noise with sufficiently low level etc)

btw you can even create own signature like this https://twistedsifter.com/2013/01/hidde ... trographs/
I actually first used DSS encdoing for my prototype the issue i had is i could mostly defeat it by uploading to youtube (reducing bit rates etc) or multiple conversions between file fortmats. The use of phase is something i never considered thats something im going to look into. it has a few backup methods one of those being inserting a super low frequecny sine wave and an increadibly low volume as once i boost the gain on the spectrum im able to see that i understand that is is easy to defeat but the object of this is not really to completely fool proof i understand dertmined people will find a way to deafeat it. Mainly this is being used in a small comunity of music producers and DJ's where we have a major issue of someone leaking promo music online.

pandy
Posts: 183
Joined: Mon Feb 24, 2014 1:46 pm

Re: Completly cut a frequency range

Post by pandy » Wed Jul 10, 2019 7:19 pm

I recall CD protection by removing (notch filter) frequency 315 or 3150Hz (this was like 25 years ago so perhaps this is not correct frequency but for sure butchering audio by notch filter).

And modulating phase with proper way (i.e. https://en.wikipedia.org/wiki/Process_gain) is extremely robust and can't be defeated easily... you don't need large bandwidth - in your case bitrate like 0.5 bit per second is sufficient to watermark audio and using only 1kHz bandwidth your gain will be easily 30 - 40dB.

"To do picture" way, you should first convert audio to image, modify image in "pixel" domain and after all invert process.
https://ffmpeg.org/ffmpeg-filters.html#spectrumsynth

Post Reply