I'm trying to write raw s16le audio to an audio file using ffmpeg. This is the command I'm using:
ffmpeg -y -f s16le -acodec pcm_s16le -ar 44100 -ac 1 -i - -vn -ar 44100 -ac 1 OUTPUT_FILE.wav
After this command is handled I use stdin to put data in the encoder like this:
fwrite(samples_, sizeof(short int*), numSamples, audioffmpeg);
where samples_
is a short int*
with a number of numSamples
combined. At the moment I'm trying this per sample (so numSamples
is 1).
For some reason this isn't creating a new file. Although, when I use a previously created file as input (so I don't use stdin) it does create a new file.
FFmpeg doesn't seem to be outputting so I can't give that
Aucun commentaire:
Enregistrer un commentaire