Closed rayvbr closed 4 years ago
Hi @rayvbr,
/* check if the input file is in YUV4MPEG2 (y4m) format */
EB_BOOL check_if_y4m(EbConfig_t *cfg) {
...
//If we found this file is not y4m, we seek it back to the beginning.
if (cfg->inputFile != stdin) {
fseek(cfg->inputFile, 0, SEEK_SET);
}
}
The problem is that, if inputFile is fifo, the fseek doesn’t work:
ESPIPE The file descriptor underlying stream is not seekable (e.g.,refers to a pipe, FIFO, or socket).
So in ReadInputFrames, we need to copy the 9 bytes back for input buffer.
When sending N frames worth of raw YUV frames to SVT through a fifo pipe (note: without y4m header), SVT doesn't read the last frame. After some debugging, I believe this is caused by the following lines in
Source/App/EbAppProcessCmd.c
:The problem seems to be that this process is not applied when the input is fifo/named pipe.
The following patch seems to resolve the issue: