[MPlayer-users] trying to pipe mencoder to ffmpeg2theora
Roman Haefeli
reduzierer at yahoo.de
Thu May 17 01:52:04 CEST 2007
On Wed, 2007-05-16 at 22:31 +0200, Nico Sabbi wrote:
> Roman Haefeli wrote:
> > hello
> >
> > i'd like to be able to pipe the stdout of mencoder to stdin of
> > ffmpeg2theora, but i troubles to bring the output of mencoder into a
> > form, that is understood by ffmpeg2theora.
> >
> > i tried the following:
> >
> > mencoder tv:// -tv
> > driver=v4l:device=/dev/video1:width=320:height=240:fps\=25:immediatemode
> > \=0:adevice\=hw.1:amode\=0:alsa:audiorate\=44100:forceaudio \
> > -oac pcm -af resample=22050 -ovc lavc -lavcopts vcodec=ffvhuff \
> > -o /dev/stdout | \
> > ffmpeg2theora -x 320 -y 240 -V 400 -a 1 -H 22050 -c 1 -o file.ogg -
>
>
> stdout is seriously polluted, so
>
> mkfifo /tmp/pipe
> mencoder -o /tmp/pipe ...
> ffmpeg2theora -x 320 -y 240 -V 400 -a 1 -H 22050 -c 1 -o file.ogg
> /tmp/pipe
first, i found a way to capture the cam with mplayer and output the data
in a format, that can be read by theora_encoder_example:
mplayer tv:// -tv driver=v4l:device=/dev/video1:width=320:height=240:fps
\=25:immediatemode\=0:adevice\=hw.3:amode\=0:alsa:audiorate
\=44100:forceaudio \
-ao pcm:file=stream.wav \
-vo yuv4mpeg:file=stream.yuv
then :
theora_encoder_example stream.wav stream.yuv | oggfwd mydomain.org 8010
password /video.ogg
this works quite well so far. but since i plan to setup a live stream,
i would like to pass the data directly from the first to the second
command. therefore, i tried what you suggested. i replaced the regular
files by named pipes (mkfifo stream.[wav|yuv]). but then, when both
commandline were started, on both ends the commands just waited and
obviously no data has passed. i tried every possible order to start the
commands. how is that supposed to work? do i need to create special
pipes?
roman
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
More information about the MPlayer-users
mailing list