Pipe entry in ffmpeg

I am trying to use ffmpeg to decode audio data. Although it works to load from a file, I would like to avoid using files because I would like to use a temporary one for this. Instead, I would like to pass the data (which I previously uploaded) using stdin.

Is it possible?

eg.

  • Manually upload mp3 file
  • Connect it to the process created by ffmpeg.
  • Get the original output

(it should also work with ffprobe and ffplay)

+4
source share
1 answer

ffmpeg has a special pipe flag that instructs the program to consume stdin. note that usually the input format should be specified explicitly.

Example

( 16- PCM):

cat file.mp3 | ffmpeg -f mp3 -i pipe: -c:a pcm_s16le -f s16le pipe:

docs

-1

Source: https://habr.com/ru/post/1684544/


All Articles