How to produce two PCM audio outputs with different sample rate. #51
Unanswered
nikolaypavlov
asked this question in
Q&A
Replies: 1 comment 5 replies
-
|
@nikolaypavlov - import ffmpegio as ff
input = 'audio.mp3'
output1 = 'audio_16000.pcm'
output2 = 'audio_8000.pcm'
ff.transcode(input,[(output1,{'ar': 16000},(output2,{'ar': 8000})], acodec='pcm_s16le', f='s16le', ac=1)Basically, feed all the common (or default) options as keyword arguments and specify the output files as a list. The one with the default output options maybe just a file path string and those with specific options, create a tuple list item with file path and its option dict. P.S., the same can be done with its input argument to feed multiple inputs. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to convert mp3 audio into two PCM outputs of different sampling rate, like in the following
ffmpegexample:ffmpeg -i audio.mp3 -ar 16000 -acodec pcm_s16le -f s16le -ac 1 audio_16000.pcm -ar 8000 -acodec pcm_s16le -f s16le -ac 1 audio_8000.pcmWhat's the best way to implement this?
Beta Was this translation helpful? Give feedback.
All reactions