[FFmpeg-user] Two outputs for ffmpeg

Brandon Ooi brandono at gmail.com
Mon Apr 4 21:14:38 CEST 2011


On Mon, Apr 4, 2011 at 5:03 AM, Victor Petrescu <victor.petrescu13 at gmail.com
> wrote:

> Good day to all.
>
> I need to stream something from a live cam and to record it in the same
> time.
>
> I use ffsever for streaming and use a pipe to feed ffmpeg.
>
> So I have the 2 commands
>
> ffmpeg -i pipe.avi -async 1 -r 25 http://localhost:8090/feed1.ffm -> for
> streaming
> ffmpeg -i pipe.avi -async 1 -vcodec flv -f flv -r 25 somename.flv -> for
> recording
>
> Both work fine independent.
>
> The problem is that when I use them together The recording is decent (not
> good) but the stream look like hell (random colors everywhere).
>
> Can any1 tell me how to fix this?
>
>
A pipe as in a fifo? To use correctly you need to split/copy the fifo into 2
fifos (mkfifo + tee?). Because once one ffmpeg pulls data from a fifo, it's
gone. The other ffmpeg gets whatever comes after.


More information about the ffmpeg-user mailing list