[x264-devel] Re: x264, ffmpeg and yuv4mpegpipe...

Andy Carrel william.a at carrel.org
Thu Nov 2 18:34:00 CET 2006


It's because you're feeding x264 Y4M rather than YUV on stdin. I have
a patch at http://gawker-image-fetch.googlecode.com/svn/trunk/x264.c.diff
for x264 that adds a "--y4m-input" long option which treats stdin as
Y4M and would probably resolve your problem, and as a bonus keeps you
from having to specify the size to x264 since it'll be in the y4m
headers. (It fixed my problem which was related to a similar
pipelining issue.)

All the input type detection seems to be based on the filename. And
FIFOs won't work since the file is reopened once if it isn't stdin.
:-/

On 11/1/06, Alec Robertson <alecr at mit.edu> wrote:
> Hi,
>
> I posted this also to the doom9 forum
> (http://forum.doom9.org/showthread.php?t=117717) but thought it might be
> worth bringing up here...
>
> Basically, I want to pipe a vob out of ffmpeg, through yuvdeinterlace
> and y4mscaler and then into x264. The following works fine:
>     mkfifo -m 660 dvd.y4m
>     ffmpeg -t 30 -i vts_01_0.vob -f yuv4mpegpipe - | \
>         yuvdeinterlace19 -s0 | \
>         y4mscaler -v0 -I active=704x352+8+64 -O size=704x384 -O sar=1:1 | \
>         > dvd.y4m &
>     x264 -b 1000 -o dvd.264 dvd.y4m
>
> But when I try to include x264 in the pipe directly I get weird
> scrolling and color shifting on the encoded video:
>     ffmpeg -t 30 -i vts_01_0.vob -f yuv4mpegpipe - | \
>         yuvdeinterlace19 -s0 | \
>         y4mscaler -v0 -I active=704x352+8+64 -O size=704x384 -O sar=1:1 | \
>         x264 -b 1000 -o dvd.264 - 704x384
>
> I've found "-f rawvideo" to work for ffmpeg directly into x264, but then
> the yuvdeinterlace and y4mscaler do not work as there is no yuv4mpeg
> header. I'm sure I could do the all-in-one-pipe with ffmpeg or mencoder,
> but I'm really looking to do it with x264...
>
> All of the source and output files are here: http://web.mit.edu/alecr/www/x264/

-- 
wac

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list