Using YouTube for web TV

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
westis's picture

Howdy,

When YouTube allowed for uploading of content longer than 15 minutes we decided to migrate our web TV content to YouTube. It's cheaper (free actually) than storing the flv/h264/WebM files on your own server (or Amazon S3 as we used to) and YouTube does the conversion.

By help of the module Video Upload I added a field to the om_show content type. It allows the user with permissions to upload a video file to YouTube when adding/editing a show node, and have metadata such as title, description and tags to be synched. The YouTube video is then embedded on the show page and the YouTube thumbnails can be used too.

It required some tweaking, which I could write more about if there is interest. But my main reason to write this now is that today we suddenly no longer had the possibility to upload longer videos than 15 minutes... Oh no! But fear not... We'd had two videos blocked (because of music rights), one that I had removed and when I removed the other it seems like we again got the permission back! I hope it's as easy as that...

It's good to be able to use YouTube for checking music permissions on videos submitted by our users. Easy enough to remove them if they are blocked (I hope).

Our site is www.okv.se/play. If anyone would like to know more details about how we use YouTube in our workflow, let me know and I can give further details!

Comments

Sounds like a nice solution

jdcreativity's picture

Sounds like a nice solution to your needs and I'd be interested in knowing a little. It would be nice to have this kind of functionality with Blip.TV / Archive. The module looks Youtube specific, though.

I guess during the last mile of the Open Media integration, inevitably things get site specific.

I'd like to hear more

Techivist's picture

Sounds like a great solution, Daniel! This sounds very interesting & I'd for sure like to hear more about how you went about building out your feature set. Nice site, btw, very elegant & clean.

On a side note, folks can "vote up" your story with the little arrows on the side. It's a great feature (that, sadly, not enough folks use) here on gdo that allows for popular content to bubble up to the top.

Miguel Hernandez - www.migshouse.com
Founder & CEO - The OpenMindz Group
Writer- Linux Journal & TechZulu

Internet Archive Module

deproduction's picture

The functionality available through Archive.org goes beyond this. See Brian's recent post. Archive.org is now encoding all our content for the web and broadcast at DOM, and makes a PEG-Server-Standards-Compliant Mpeg2 of every show submitted in the OMP collection to enable sharing. Plus, its partnering with a nonprofit, and if you have an internet-2 connection, you can reach them with very high speeds.

Whatever your first issue of concern, media had better be your second, because without change in the media, the chances of progress in your primary area are far less likely. http://denveropenmedia.org

Can you embed playlists as well?

jjclint's picture

I'm running on d.7 and have tried to achieve this with media and media: youtube but no luck so far. When a user uploads a www.youtube.com/p/[playlistid] link it gives an error message stating it can't handle the url.

Did you manage to solve that?

@jjclint The media_[provider]

kreynen's picture

@jjclint The media_[provider] modules are designed to understand the URL of a specific video... not a feed. To pull items from a feed, you need media_feeds. I created a screencast of how to do this with Media, Media Feeds, and TelVue's PEG.tv VOD service, but you can just a easily use a YouTube, Blip.tv, or Vimeo playlist...

http://blip.tv/open-media-project/using-media-feeds-with-peg-tv-5414899

You should also look at http://drupal.org/project/feeds_youtube. I haven't used it, but it looks like it exposes more of the YouTube feed elements to Feeds for mapping to fields in the Drupal content type.

Good luck!

I think I should clarify a bit

jjclint's picture

@kreynen I'm already using media feeds and I have no problem importing new nodes from a youtube feed or a youtube page.

What I can't do is create a single node from a whole youtube playlist with the media: youtube or oEmbed providers. just to clarify:

when I attach a new video link with the media file selector it works like a charm, but only if the url of the link is www.youtube.com/v[rest of the url].

If instead the url points to a youtube playlist such as www.youtube.com/p[rest of url] I get a can't handle the url pattern error message.

Perhaps this can shed some more light on the subject:

http://drupal.org/node/177207

As you can see at #18 there is a patch that was comitted to the 6.x branch of media:youtube but apparently not to the 7.x branch.

I think it's also noticeable at the relevant url pattern handlers that can be found in the mediainternetyoutubehandler.inc here's the relevant bit of code:

<?php

/**
* Implementation of MediaInternetBaseHandler.
*
* @see hook_media_internet_providers().
*/
class MediaInternetYouTubeHandler extends MediaInternetBaseHandler {
  public function parse($embedCode) {
    $patterns = array(
      '@youtube.com/watch[#\?]v=([^"\& ]+)@i',
      '@youtube.com/embed/([^"\&\? ]+)@i',
      '@youtube.com/v/([^"\&\? ]+)@i',
      '@youtube.com/\?v=([^"\& ]+)@i',
      '@youtu.be/([^"\&\? ]+)@i',
    );
    foreach ($patterns as $pattern) {
      preg_match($pattern, $embedCode, $matches);
      if (isset($matches[1])) {
        return file_stream_wrapper_uri_normalize('youtube://v/' . $matches[1]);
      }
    }
  }

It should include a pattern and handling for www.youtube.com/p