Use plugins in twig files

Hello, i can’t find a way to use plugin Youtube or MediaEmbed in twig file. I want set youtube urls in the page header

title: 2009
youtubes:
    - header: Video1
      url: https://www.youtube.com/watch?v=BK8guP9ov2U
    - header: Video2
      url: https://www.youtube.com/watch?v=BK8guP9ov2U

And use them in twig

  {% for youtube in page.header.youtubes %}
          {% if youtube.header %}
            <h6>{{ youtube.header }}</h6>
          {% endif %}
          {% if youtube.url %}
              [plugin:youtube]({{ youtube.url }})
          {% endif %}
  {% endfor %}

BTW I set in system.yaml “pages: process: twig: true”, but no luck.

Typically twig is processed after markdown is processed. In your case, your trying to dynamically put a twig variable into markdown syntax. You just need to tell Grav to process the Twig first with the header option:

twig_first: true

Thank you for your answer! Main thing that

[plugin:youtube]({{ youtube.url }})

in twig do not applyed Just show

[plugin:youtube](https://www.youtube.com/watch?v=BK8guP9ov2U)

Is there special tag for youtube plugin in twig?

No, it’s intended for markdown only.

Ok, thanks. Will use in markdown.