[FFmpeg-user] Overlay one subtitle stream and copy another

Hans Carlson forbyta at inbox.com
Tue Mar 8 01:52:54 CET 2016


On Mon, 7 Mar 2016, Carl Eugen Hoyos wrote:

> I suspect the stream specifiers [0:v] and [0:3] ensure
> that fifo is not used.
> I am not sure what the correct usage is but you could
> try '[0:v}fifo[v];[0:3]fifo[o];[v][o]overlay`
> (untested)

Thanks, that seems to work.  No more buffer overflow warnings and it plays 
fine without any video pauses.

In fact, it appears the fifo for the subtitle stream isn't needed, because 
this works as well:

   '[0:v]fifo[vid];[vid][0:3]overlay`

My test file is only 22 secs long... is there a chance I'd need the fifo 
on the subtitle stream if I'm processing something longer?

I'm not really sure what the fifo filter is doing or why it's needed, 
since it only seems to be needed if I'm trying to overlay a subtitle 
stream AND copy a subtitle stream.  But, in this case, the subtitle stream 
I'm copying has nothing to do with the subtitle stream which is overlayed 
on the video.  Any additional enlightenment would be appreciated.  If you 
have no further info, then thanks for the suggestion since it appears to 
fix the problem.

FYI. The 2nd example in my original post -- copying and overlaying the 
SAME subtitle stream -- also seems to work with this approach:

   '[0:v]fifo[vid];[vid][0:2]overlay'


More information about the ffmpeg-user mailing list