allak
7th September 2009, 21:48
Apologies in advance if this has been discussed before, but I've been unable to find an answer to a question that is puzzling me: why there is no way to make x264 CLI to assume YUV4MPEG on standard input instead of YUV ?
This would do away with the need for a named pipe when encoding from ffmpeg; and it will permit a pure script based encoding workflow on Windows, where named pipes have a very different implementation and semantics from Linux.
(and no, the mkfifo command from Cygwin does not seems to work with non-cygwin based executables)
For example the following command should work:
ffmpeg.exe -v 0 -i source.vob -f yuv4mpegpipe - | x264.exe - <options>
I have taken a look at the source code, and the funny thing is that there is already some infrastructure ready to make this option work: in muxers.c the function open_file_y4m is able to handle the case where the input file name is '-'.
So it seems that all that is lacking is just a flag to force stdinput to be interpreted as YUV4MPEG.
Is there something obvious that I am missing ? Would the developers accept a patch to implement it ?
P.S. Yes, I know that I could use the x264 library included in ffmpeg, but I would rather use the new preset system of x264.exe than the weird options of ffmpeg; and anyway the x264 binaries for windows are compiled much more frequently.
This would do away with the need for a named pipe when encoding from ffmpeg; and it will permit a pure script based encoding workflow on Windows, where named pipes have a very different implementation and semantics from Linux.
(and no, the mkfifo command from Cygwin does not seems to work with non-cygwin based executables)
For example the following command should work:
ffmpeg.exe -v 0 -i source.vob -f yuv4mpegpipe - | x264.exe - <options>
I have taken a look at the source code, and the funny thing is that there is already some infrastructure ready to make this option work: in muxers.c the function open_file_y4m is able to handle the case where the input file name is '-'.
So it seems that all that is lacking is just a flag to force stdinput to be interpreted as YUV4MPEG.
Is there something obvious that I am missing ? Would the developers accept a patch to implement it ?
P.S. Yes, I know that I could use the x264 library included in ffmpeg, but I would rather use the new preset system of x264.exe than the weird options of ffmpeg; and anyway the x264 binaries for windows are compiled much more frequently.