I am interested in using this with Blip.tv. Has anyone done this and if yes. can you post the code?

Thanks

Rich

Comments

mkrakowiak’s picture

Version: 6.x-2.4 » 5.x-2.4
Category: support » feature

I would be happy to see a filter for Blip.tv, too.

mkrakowiak’s picture

Assigned: Unassigned » mkrakowiak
Status: Active » Patch (to be ported)

OK, this is not a perfect solution, but it works. This code needs to be added into the video_filter.codecs.inc file:

$codecs['bliptv'] = array(
  'name' => t('Blip.tv'),
  'callback' => 'video_filter_bliptv',
  // http: // cpj.blip.tv/#1036772
  'regexp' => '/.*\.blip\.tv\/#([0-9]+)/',
  'ratio' => 400 / 255,
);


function video_filter_bliptv($video) {
  $output = '';
	
  $output .= '<embed src="http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F'.$video['codec']['matches'][1].';%3Freferrer%3Dblip%2Etv%26source%3D1&showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf" quality="best" width="400" height="255" name="showplayer" type="application/x-shockwave-flash"></embed>';
	
  return $output;	
}

Now, this is important:
Once you're on a blip.tv page where your video is, you have to click on "Visit show page" on the right sidebar, click on the video of your choice, and then copy the URL from address bar. This is required because permalinks created by blip.tv are NOT the right links to videos. You can check that by taking a look at the "embed this video" code. The URL that you should embed looks like this: http://membername.blip.tv/#1234567

JohnnyMoney’s picture

Sorry tried your solution and is not working for me.
Does one add this code to the end of the file? If so it screws my site, cannot see it at all. I notice the original file begins with <?php but has no closing php tag. If I add your code to the end then the file has the ending php tag. is that correct?

mkrakowiak’s picture

StatusFileSize
new1.49 KB

It should work if you replace the original video_filter.codecs.inc file with the one attached here (certainly, unzip it first).

JohnnyMoney’s picture

Thanks, I confirm that this now works for Blip.

Unfortunately neither Blip nor Vimeo embedded videos in my Drupal site allow the Full Screen Toggle.
The only one that allows this without taking me to their site is Revver.

mkrakowiak’s picture

I'm not sure about Vimeo, but Blip provides a full screen toggle. And this works right from user's website.

JohnnyMoney’s picture

Well, the full screen toggle wasn't working on my site using the video_filter module so now I have removed this module and simply embedding the videos with the embed code from Blip makes them work perfectly and do toggle full screen.

blackdog’s picture

Status: Patch (to be ported) » Active

Please roll a proper patch - http://drupal.org/patch/create

mkrakowiak’s picture

Version: 5.x-2.4 » 5.x-2.x-dev
Status: Active » Patch (to be ported)
StatusFileSize
new1.16 KB

Here's a patch for Blip.tv support for D5.

The filter accepts URLs like http://username.blip.tv/#1036772

blackdog’s picture

Status: Patch (to be ported) » Needs review

Will test this later today. Thanks mkrakowiak!

blackdog’s picture

Status: Needs review » Needs work

I don't really like how this looks. Blip has some strange ways of embedding videos, video id don't match with the id in the URL, and while this solution does work, it feels a bit hackish.

blackdog’s picture

StatusFileSize
new1.47 KB

If someone still wants to use this, here's an updated patch that allows fullscreen and uses height/width default settings.

mkrakowiak’s picture

Status: Needs work » Needs review

Yes, it is hackish - because Blip uses two kinds of links: one with the username and the other one without. If you try embedding a Blip video with the latter URL, you will probably embed... some other video, not the one you want.
Thanks for your work on the module, blackdog.

idflorin’s picture

How to embed with this [video:http://blip.tv/file/2140870] ? which regex is good ?

blackdog’s picture

Status: Needs review » Postponed

How to embed with this [video:http://blip.tv/file/2140870] ? which regex is good ?

Short answer, you can't. The embed code that blip.tv uses for that file is some sort of randomized string, which we can't use. If you need to embed blip.tv videos, see comment #2 in this issue, and you'll need the patch from #12.

I'm gonna set this to postponed until we can figure out an easy way to instruct users how to embed blip.tv videos, or until someone figures out a way to use this module to embed all videos from blip.tv, without the need for instructions.

idflorin’s picture

Embedded Media Field is suporting [video:http://blip.tv/file/2140870] , can't It's metod be implemented in this module ?

blackdog’s picture

I'll take a look to see how emfield has solved it. Thanks.

Freso’s picture

Version: 5.x-2.x-dev » 6.x-2.x-dev

Seems like they use the page id to fetch an RSS feed and do some API calls to get the needed information.

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/emfield/con...

Also, let's get this in 6.x-2.x first and then backport to 5.x-2.x if needed. :)

jtsnow’s picture

Status: Postponed » Needs review
StatusFileSize
new2.67 KB

I've adapted the code from emfield to work with video_filter. Works like a charm. Here is the patch.

jtsnow’s picture

Not sure on the ratio setting in that patch. That may need tweaking.

blackdog’s picture

Great work jtsnow! I'll take a further look at this a.s.a.p. Thanks!

blackdog’s picture

Committed as is (http://drupal.org/cvs?commit=245574).

Blip.tv seems to use different ratios for different players/videos, so I left it as in the patch for now.

Thanks jtsnow!

blackdog’s picture

Assigned: mkrakowiak » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mkrakowiak’s picture

Blackdog, sorry to be late with the review. It works perfect now. Thank you and thanks jtsnow!