I have a .wmv file which I want to convert to .wav file and I am using ffmpeg for the same, the command is as follows:
ffmpeg -i file.wmv -ar 8000 -sample_fmt s16 -f wav pipe:1
the pipe:1 outputs the output wave file in STDOUT. I want to capture that wave file from STDOUT and pass it as a command line argument to my executable called foo. I want to do the conversion from wmv to wav on the fly rather than saving the .wav file. Things I have tried are as follows but none of them seem to work:
./foo $(ffmpeg -i file.wmv -ar 8000 -sample_fmt s16 -f wav pipe:1)
./foo $(<(ffmpeg -i file.wmv -ar 8000 -sample_fmt s16 -f wav pipe:1))
ffmpeg -i file.wmv -ar 8000 -sample_fmt s16 -f wav pipe:1 | xargs ./foo
ffmpeg -i file.wmv -ar 8000 -sample_fmt s16 -f wav - | ./foo -
<(ffmpeg ...), and not the$(and)? The result of that would look something like./foo /dev/fd/63, where the fd was populated by the output of the command.ffmpeg -i file.wmv -ar 8000 -sample_fmt s16 -f wav - | ./foo /dev/stdinis another option, subject to most of the caveats relevant to process substitution (FIFO, non-seekable, &c)