Saturday 13 August 2016

OpenLP - How to embed YouTube clips


Goal: To add/play a YouTube clip in an OpenLP service


Secondary goal: To view any website in an OpenLP service


So, your preacher or youth leader wants you to play a youtube clip in one of your services. 

Problem is, it's illegal to download or "rip" a clip from YT, and play that copied .mp4 file from your computer. To stay within the law you MUST stream it from the YouTube site.

In OpenLP there isn't a nifty "Play a YT clip" button, but, with a little effort, you can stream YouTube clips.

You need to configure OpenLP to make this work. Here goes...


Configuring OpenLP


1) Start OpenLP

2) From the Settings menu, choose Configure Formatting Tags... You should see something like this...


3) Click the New button in the bottom left corner...

4) Complete the fields as follows:
  • Description YouTube
  • Tag tube
  • Start HTML <iframe height=100% width=100% src=http://www.youtube.com/embed/
  • End HTML ?autoplay=1&modestbranding=1&rel=0&showinfo=0></iframe>


5) Once you've created the custom tag, double check there are no spaces at the end of the Start HTML field, and no spaces at the beginning of the End HTML field.

6) Don't forget to Save your changes.


Adding YouTube clips to a service


1) Find your required clip on the YouTube site. Here, I've already performed my search and have the clip loaded in my web browser...


2) Use your mouse to select the CLIP REFERENCE from the address bar, as shown below, and copy it to your clipboard...


3) Back to OpenLP, choose Custom Slides from the Library area, then hit New to create a new slide...


4) Complete your new slide form:


  • Add your title - prefix "YouTube" just to make things easier to remember.
  • Add your slide. It's USEFUL to make sure your 1st line is a blank line, as shown.
  • Use the format you see below - adding curly braces around the 1st {tube}, then NO SPACES, paste the YouTube CLIP REFERENCE you copied to your clipboard, NO SPACES, then finish off with curly braces and IMPORTANTLY A SLASH tube -  {/tube}


5) Once you've saved, add the custom slide to your service. It'll look something similar to this..


6) Then load your item / run your service. Initially you'll be showing a black (or whatever theme you have) page. When you then click to page 2 (or page down etc), your YouTube clip should start to play automatically.


When it doesn't work...


The most basic thing to check is that you have a working internet connection at your presentation computer.

Double check everything.

Secondary goal: I want to load any website I like...


Simply create a generic formatting tag as shown below, and use it in a custom slide...



16 comments:

  1. Audio started playing for me, but the video itself didn't show up.

    ReplyDelete
    Replies
    1. Hi Michael.

      I should describe our working configuration:

      * Ubuntu 16.04
      * OpenLP 2.4.2 (June 26th release)
      * VLC 2.2.2

      I've not tested on Mac or Windows.

      --d

      Delete
    2. Thanks for this tutorial. Coded this but only partly worked on my Windows 10 system using OPENLP version 2.4.1. The Youtube video sound came through but the video never appeared only the Theme appeared. With the Internet page option it worked mostly but sometimes required reloading to get the complete page displayed.

      Delete
  2. Thank you so so much I tried this and it worked. We are using a Mac Pro and VLC has been loaded and with a black theme. Works very well. Thank you one again :)

    ReplyDelete
  3. Took a few tries - I missed the "?" for the variable (duh) but once I added that it worked like a charm. Great solution!

    ReplyDelete
  4. Thanks for this article very helpful. thanks. 10

    ReplyDelete
  5. Thank you for a verv helpful post. Works fine on Windows 10 and saves a great deal of pain having to close open LP to play a YouTube clip.

    ReplyDelete
  6. I've found that the YouTube clip starts to play twice (it creates a delay) and I need to go into "Custom slides" and select our "blank slide" to stop it. Do you know how I can fix this? Has anyone else had this issue?

    ReplyDelete
  7. Google has changed its policy on Autoplaying media, this caught us out with YouTube clips not starting. There is a registry setting on Windows to enable auto play mode again.
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
    "AutoplayAllowed"=dword:00000001

    ReplyDelete
  8. Congratulations and thank you very much, dear brothers.
    It was very useful to me and I thank God for your kindness sharing your knowledge.
    Best regards

    ReplyDelete
  9. Thanks for this, it is really helpful.

    For me it currently plays perfectly but it is not aligned correctly. It is a bit to the right and there is a big band of blank space at the top, any idea how to tweak this, I would have thought it could be done quite simply but have struggled so far?
    Thanks.

    ReplyDelete
  10. Hi, great tip. Any idea how to play in higher quality? Only allows 360p and when I click on the settings gear on the youtube window it says "Missing options?" and only allows 360p option. (Video is available in higher.)

    ReplyDelete
  11. This is now broken. We need a way to play youtube videos as we are a streaming church.

    ReplyDelete
  12. I did it with help of this link:

    https://youtu.be/O9D9mx4pnLw



    Everything worked but only autoplay when music is muted.

    ReplyDelete
  13. I am saving your article in my favorite’s folder to visit again You made valid points within this content that I feel need further exploration. I agree with most all of this info. Great work. https://www.buyyoutubesubscribers.in

    ReplyDelete