4

I want to pipe uncompressed audio+video from one process to another.

It means it should be packed into some container. Which one is the best suited for the task?

I tried ffmpeg -i ... -vcodec rawvideo -acodec pcm_s16le -f ... -y test, but it mostly fails. Resulting Matroska files are playable only thought ffmpeg (not with mplayer) and AVI doesn't play well from pipe.

Update:

Looks like

ffmpeg -i ...  -vcodec rawvideo -acodec pcm_s16le -f avi  -y - | mplayer -cache 200000 -noconsolecontrols -

works more or less stable. -f matroska also works for gstreamer/ffplay, but not for mplayer/vlc.

Vi.
  • 17,755

1 Answers1

2

I didn't realize when you said "one process to another" that the video didn't already exist on disc. With that being said it would probably be best to use some variant of the .ts format. I have never tried to stream any video directly from one process to another without the video first existing on disc, but I have wrote a .ts file to disc and while the file is still being written to disc read it via another process. There is probably a way around the disc write, but I don't know what it is.

ubiquibacon
  • 8,244
  • 3
  • 31
  • 37