down sampling

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: down sampling

Michael Koch

>> Works fine here (unless I add funny characters) here with Windows
>> cmd, both with and without using a batch file.
>

Finally it's working here. This is the content of the batch file:

c:\\ffmpeg\ffmpeg -i 699.mp4 -f nut - | c:\\ffmpeg\ffplay -

-- all backslashes
-- no escape character before |
-- but remember: If you have a % in the command line, then it must be
escaped as %%

Thanks to all who helped to solve this problem!!!

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: down sampling

Michael Koch
In reply to this post by Paul B Mahol
Am 28.12.2018 um 11:46 schrieb Paul B Mahol:
> One can now use afftfilt to shift frequencies around in frequency domain.
> It should be easier than using amultiply filter.

c:\ffmpeg\ffmpeg -f dshow -channels 2 -i audio="Mikrofon (Realtek High
Definiti" -af
volume=30,afftfilt='real=real(b+300,ch)':'imag=imag(b+300,ch)' -f nut -
| c:\\ffmpeg\ffplay -

I've just tested this and it works fine. There is no error message when
(b+300) becomes larger than the available number of bins. How does
afftfilt handle this case?
Does real(too_large_number,ch) return zero?

Michael
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: down sampling

Paul B Mahol
On 12/30/18, Michael Koch <[hidden email]> wrote:

> Am 28.12.2018 um 11:46 schrieb Paul B Mahol:
>> One can now use afftfilt to shift frequencies around in frequency domain.
>> It should be easier than using amultiply filter.
>
> c:\ffmpeg\ffmpeg -f dshow -channels 2 -i audio="Mikrofon (Realtek High
> Definiti" -af
> volume=30,afftfilt='real=real(b+300,ch)':'imag=imag(b+300,ch)' -f nut -
> | c:\\ffmpeg\ffplay -
>
> I've just tested this and it works fine. There is no error message when
> (b+300) becomes larger than the available number of bins. How does
> afftfilt handle this case?
> Does real(too_large_number,ch) return zero?

No, it clips and return value in max bin.
If you want explicit zero you will need to change your expression.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: down sampling

Michael Koch
Am 30.12.2018 um 13:20 schrieb Paul B Mahol:

> On 12/30/18, Michael Koch <[hidden email]> wrote:
>> Am 28.12.2018 um 11:46 schrieb Paul B Mahol:
>>> One can now use afftfilt to shift frequencies around in frequency domain.
>>> It should be easier than using amultiply filter.
>> c:\ffmpeg\ffmpeg -f dshow -channels 2 -i audio="Mikrofon (Realtek High
>> Definiti" -af
>> volume=30,afftfilt='real=real(b+300,ch)':'imag=imag(b+300,ch)' -f nut -
>> | c:\\ffmpeg\ffplay -
>>
>> I've just tested this and it works fine. There is no error message when
>> (b+300) becomes larger than the available number of bins. How does
>> afftfilt handle this case?
>> Does real(too_large_number,ch) return zero?
> No, it clips and return value in max bin.
> If you want explicit zero you will need to change your expression.

yes, zero is better than using the value in the max bin. Here is the
(Windows) batch file for live ultrasonic conversion:

set "SR=44100"   :: Sample Rate
set "F=4000"     :: Subtracted Frequency
set "VOL=30"     :: Volume Factor
set /a "N=4096*%F%/%SR%"   :: N = 4096 * F / SR

c:\ffmpeg\ffmpeg -f dshow -channels 2 -i audio="Mikrofon (Realtek High
Definiti" -af
volume=%VOL%,afftfilt='real=if(lt(b+%N%,nb),real(b+%N%,ch),0)':'imag=if(lt(b+%N%,nb),imag(b+%N%,ch),0)'
-f nut - | c:\ffmpeg\ffplay -

Michael
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
12