On 12.03.2013 15:02, Anton Khirnov wrote:
Hi,
On Mon, 11 Mar 2013 19:23:12 -0400, Keith Lawson
<[email protected]> wrote:


Hello,

I'm attempting "mask" a time selection of a video using the
split, select and delogo filters but I just can't seem to get my head around the split filter. Looking at the start of the example[1] at the start of the libav documentation it certainly appears that what I want
to do is possible but I'm struggling to build the proper filter.

For
example I would like to mask the entire video of a 640x480 video from 0 - 10 seconds. Based on the example in the docs and this[2] stackoverflow
posting I've tried things like:

./avconv -i input -vf "[in] split
[T1], fifo, [T2] overlay [out]; [T1]
fifo,select='gte(t,0)*lte(t,10)',delogo=x=0:y=0:w=640:h=480 [T2]"
output

Hoping that would do something like :

input --> split --> fifo
-----------------------------------------------------> overlay -->
output
 | ^
 | |
 +------> fifo --> select 0-10 seconds --> delogo
--------+

But I'm either completely unable to get the command to run or
when I do I don't get the desired results. Any help or suggestions for a
more appropriate approach would be greatly appreciated.


First of all, when you ask for help with avconv, please always attach full commandlines that you tried and the output avconv printed. That eliminates a lot
of pointless guessing on our part.


Thanks I'll be sure to do that. I should have assumed this in the first place but I wasn't sure which of my failed filters was closest to what I wanted to accomplish.

Secondly, I'm afraid those docs are a little obsolete. For one thing, you should never insert the fifo filter manually. It is always done automatically when
needed.

Also in those complex situations when you deal with filters with multiple inputs or outputs, it's better to explicitly label everything and not rely on automatic
mappings, as it's more clear what's going on.


Is there somewhere I can read more on the split filter and the syntax for defining inputs and outputs? I'm having trouble understanding what the labels define and how they're processed.

In any case, i think that
-vf '[in] split [split_main][split_delogo]; [split_main][delogoed]overlay[out]; [split_delogo] select=gte(t\,0)*lte(t\,10),delogo=<delogo params>[delogoed];'
should do roughly what you want EXCEPT for a problem with overlay.

I haven't had a chance to test this yet as I have to rebuild and install avconv from source but I will send my results when I do.

In its current form, after overlay gets an EOF on its secondary input, it will continue overlaying the last image from it. That is useful e.g. when you want to overlay a single-picture logo on a video, but in this case you want it to stop overlaying once the secondary stream ends. That cannot be done currently, but
should be quite easy to implement. I will look into it soonish.

So in your example above [delogoed] is getting passed to the overlay filter and [delogoed] is created by the filter between [split_delog] ... [delogoed]? Am I interpreting that correctly or am I totally off base?


_______________________________________________
libav-tools mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-tools

Reply via email to