[FFmpeg-trac] #8520(documentation:closed): wrong examples in streamselect documentation

FFmpeg trac at avcodec.org
Thu Feb 13 14:38:17 EET 2020


#8520: wrong examples in streamselect documentation
-------------------------------------+-------------------------------------
             Reporter:  mkoch        |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:
                                     |  documentation
              Version:  git-master   |               Resolution:  invalid
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by mkoch):

 Replying to [comment:14 Gyan]:
 > That is a limitation of implementing "metafilters" as filters. Their
 execution is handled by the same scheduler as the one which governs the
 order of regular filter execution.
 >
 > You could feed one of the inputs to a null filter followed by sendcmd
 which in turn relays output to streamselect.

 Yes, I know that I can place sendcmd in the filter chain at the beginning,
 using one of the two inputs. The null filter seems unnecessary, it also
 works stand-alone:
 [0]sendcmd='3.0 streamselect at my map 1'[a],...

 But this trick does also have a pitfall and I fell into it (Murphy's
 law...):
 If the two inputs have different lengths, it's important to place sendcmd
 at the longer input. In my case the second input was a few seconds shorter
 (I didn't notice that at first), and I placed sendcmd after the second
 input: [1]otherfilter,sendcmd=...[a];
 This didn't work as expected, because when the second input had ended
 after 8s, the sendcmd filter did still get 8s as time, instead of 8s-10s,
 and so sendcmd did use the wrong time for changing the options of other
 filters.

 All of these problems could be avoided, if sendcmd could be placed in the
 complex filter chain directly before the target filter. That means it must
 accept any number of inputs and just pass them to the next filter, which
 needs these inputs.

 The examples in the documentation do only work if you don't write [0][1]
 before them. They fail in the more general case when the inputs are in a
 different order.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8520#comment:18>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list