Does this work?: Audio NumPy Array » ffmpegio audio-processing » NumPy Array #13
-
|
Good afternoon thank you very much for sharing your great work!, it's very useful to have Because ffmpeg has great audio-/video-processing features, I had this idea: Is it possible to use
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
@schittli - That's an interesting usecase that I didn't think of. I had to do some digging to find a workaround, and luckily there is an Here is a quick example: import ffmpegio as ff
import numpy as np
from matplotlib import pyplot as plt
fs = 16000
T = 1
x = np.random.default_rng().integers(2^-15,2^15,dtype='int16',size=(T*fs,2))
fsout,y = ff.audio.filter('anull', fs, x, ac=1) # no explicit filtering, just implicit stereo->mono conversion
plt.plot(x)
plt.plot(y)
plt.show()Let me know if this works for you |
Beta Was this translation helpful? Give feedback.
@schittli - That's an interesting usecase that I didn't think of. I had to do some digging to find a workaround, and luckily there is an
anullfilter, which does nothing but just pass the input samples to output. With it, you can use thefilterfunction.Here is a quick example:
Let me know if this works for you