[vlc-devel] Video filter - picture_t versus subpicture_t
Juha Jeronen
juha.jeronen at jyu.fi
Sat Feb 4 14:39:08 CET 2012
Hi all,
and thanks Antoine.
I'll add this info to the video filter hacker's guide on the wiki if
there are no objections?
-J
On 02/03/2012 11:48 PM, Antoine Cellerier wrote:
> Hello,
>
> On Fri, Feb 03, 2012, Peter Tap wrote:
>> 1. What is the difference between picture_t and subpicture_t? I was
>> thinking a subpicture is only a small part of the picture and that is what
>> I need to blend with the actual picture. However, it appears filter_Blend
>> requires picture_t and not subpicture_t as parameter.
> A picture_t is a full image. Typically a decoded video frame.
>
> A subpicture_t is an element (well a list of elements to be exact) which
> can be overlayed on top of an image. Two types of elements exist: text
> and images. Text elements are rendered by the vlc core before overlay.
>
>> 2. In general, what are the steps to create a picture and merge it with
>> the existing picture?
> Code-wise the simplest way is to create a subpicture filter (which seems
> to be call subpicture source nowadays). A subpicture source will just
> create a subpicture_t and then let the vlc core deal with blending it on
> top of the video stream.
>
>> 3. What is the simplest example I can look at for writing a filter?
> Such filters can be found in modules/video_filter/ and match capability
> "sub source". Noteworthy examples include:
>
> * logo.c: overlay an image on top of the video. Note that this is also
> implemented as a video filter2 which directly edits the
> picture_t. So that might not be the simplest source to look at.
>
> * marq.c: overlay text on top of the video
>
> * rss.c: overlay text from an RSS stream on top of the video. This one
> also includes picture elements sometimes which makes it a
> good example to understand how composite subpicture_t
> elements can be used.
>
> I hope that this answers your questions.
>
> Cheers,
>
More information about the vlc-devel
mailing list