Remote videos for cpg1.5.x - Page 8 Remote videos for cpg1.5.x - Page 8
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Remote videos for cpg1.5.x

Started by Αndré, June 18, 2009, 05:03:20 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Αndré

I noticed on my private gallery that all YouTube videos stopped to work. I guess you're facing the same problem, but I don't know what you mean with "redirect" in your explanation.

I just had a look at the embed code YouTube currently provides. It obviously changed to iframe. I'll perform some tests as soon as possible.

Αndré

Version 1.10 (attached to initial post) should fix the YouTube issues.

SFdrifter

Wow!  Thanks for the quick turnaround...works fine!

kylemj

i've tried to figure out the code to embed
<iframe src="http://vk.com/video_ext.php?oid=164681391&id=162151261&hash=45dcf38e51031b2f" width="607" height="360" frameborder="0"></iframe>
but every method i tried brings up  Error: invalid video id

Any ideas?

Αndré

Please post more details. What exactly have you tried?

kylemj

Quote from: Αndré on August 04, 2015, 08:21:13 PM
Please post more details. What exactly have you tried?

I didn't keep all the tests but this was the last one i tried, I don't know coding and tried to manipulate existing ones but it didn't work as the VK embed code uses 3 different IDs



        case 'vk':

            $params = array(

                'search_pattern' => '/http:\/\/(?:www\.)?vk\.com\/\?video_ext.php?oid=([A-Za-z0-9]+)&id=([A-Za-z0-9]+)&hash=([A-Za-z0-9]+)/',

                'default_width'  => 640,

                'default_height' => 480,

                'player'         => 'http://vk.com/video_ext.php?oid={MATCH_1}&id={MATCH_2}&hash={MATCH_3}',

                'player_height'  => 0,

            );

            return remote_videos_html_replace($params, $pic_html);

        break;



/*

        case '':

            $params = array(

                'search_pattern' => '',

                'default_width'  => ,

                'default_height' => ,

                'player'         => '{MATCH_1}',

                'player_height'  => ,

            );

            return remote_videos_html_replace($params, $pic_html);

        break;


This is the embed code VK gives
<iframe src="http://vk.com/video_ext.php?oid=164681391&id=162151261&hash=45dcf38e51031b2f" width="607" height="360" frameborder="0"></iframe>
So theoretically just need to know how to get the oid, id and hash values

Αndré

'search_pattern' => '/http:\/\/(?:www\.)?vk\.com\/video_ext\.php\?oid=([A-Za-z0-9]+)&id=([A-Za-z0-9]+)&hash=([A-Za-z0-9]+)/',
removes the invalid video ID message.

Unfortunately the vk.com player needs some more parameters to play the video:
<param name="flashvars" value="uid=164681391&amp;vid=162151261&amp;oid=164681391&amp;host=http://cs505420v4.vk.me/&amp;vtag=3db79b5d6d&amp;ltag=l_6b169856&amp;vkid=162151261&amp;md_title=%26lt%3Biframe+src%3D%22http%3A%2F%2Fvk.com%2Fvideo_ext.php%3Foid%3D7324586%26id%3D162001297%26hash%3Db7d57fd756ecf0d3%26sd%22+width%3D%26quot&amp;md_author=Elena+Rotsel&amp;author_id=164681391&amp;author_href=/id164681391&amp;hd=0&amp;no_flv=1&amp;hd_def=0&amp;dbg_on=0&amp;t=0&amp;duration=63&amp;thumb=http://cs505420.vk.me/u164681391/video/l_6b169856.jpg&amp;hash=6b3a8670eb0ed9db33fef5cd5dc3487f&amp;hash2=45dcf38e51031b2f&amp;angle=0&amp;img_angle=0&amp;repeat=0&amp;show_ads_preroll=0&amp;show_ads_postroll=0&amp;show_ads_overlay=0&amp;legal_owner=0&amp;eid1=0&amp;slot=0&amp;g=0&amp;a=0&amp;puid34=0&amp;water_mark=&amp;can_rotate=1&amp;c3=&amp;no_adfox=1&amp;ads_preview=0&amp;puid4=0&amp;url240=http://cs505420v4.vk.me/u164681391/videos/3db79b5d6d.240.mp4?extra=D0j3UO6n8dPwDgaNZXS5TbpsaynlgivH2y_L8viVqgfY7xW98I-99CNw08vomo0qwM7NyMTi3mmG4EjeM-J4qNC_IdjPOFI&amp;jpg=http://cs505420.vk.me/u164681391/video/l_6b169856.jpg&amp;ip_subm=1&amp;video_ext=1&amp;is_yandex=0&apm;&amp;is_vk=1&amp;is_ext=1&amp;referrer=&amp;lang_add=Add+to+My+Videos&amp;lang_added=Video+added+to+My+Videos&amp;lang_share=Share&amp;lang_like=Like&amp;lang_subscribe=Subscribe&amp;lang_subscribed=You+have+subscribed&amp;lang_volume_on=Unmute&amp;lang_volume_off=Mute&amp;lang_volume=Volume&amp;lang_hdsd=Change+Video+Quality&amp;lang_open_popup=Expand&amp;lang_fullscreen=Full+Screen&amp;lang_window=Minimize&amp;lang_rotate=Rotate&amp;lang_ads_link=Advertiser%27s+Site&amp;lang_ads=Ads&amp;lang_ads_skip=Skip+ad&amp;lang_next=Next+video&amp;lang_replay=Replay&amp;lang_next_cancel=Cancel&amp;lang_ads_skip_time=Skip+ads+in+%7Btime%7D&amp;lang_report_problem=Report+a+problem..&amp;video_play_hd=Watch+in+HD&amp;video_stop_loading=Stop+Download&amp;video_player_version=VK+Video+Player&amp;goto_orig_video=Go+to+Video&amp;video_get_video_code=Copy+video+code&amp;video_load_error=The+video+has+not+uploaded+yet+or+the+server+is+not+available&amp;video_get_current_url=Copy+frame+link"></param>


so the video player cannot be embedded directly in Coppermine, but needs an iframe. Please have a look how it has been solved for vine.

kylemj

After many days of clueless testing i have got it to work  ;D

ok and to share

find
$params['player'] = str_replace("{MATCH_2}", $video_id[2], $params['player']);


and below add
$params['player'] = str_replace("{MATCH_3}", $video_id[3], $params['player']);


find
$params['extra_params'] = str_replace("{MATCH_2}", $video_id[2], $params['extra_params']);

and below add
$params['extra_params'] = str_replace("{MATCH_3}", $video_id[3], $params['extra_params']);

after the last case (eg. vine after break; add
        case 'vk':

            $params = array(

'search_pattern' => '/http:\/\/(?:www\.)?vk\.com\/video_ext\.php\?oid=([A-Za-z0-9]+)&id=([A-Za-z0-9]+)&hash=([A-Za-z0-9]+)/',

                'default_width'  => 660,

                'default_height' => 415,

                'player'         => 'http://vk.com/video?act=get_swf&oid={MATCH_1}&vid={MATCH_2}&embed_hash={MATCH_3}',

kylemj

You'll need to take the url out of the embed code and to save the text file extension as .vk

chant_s

Quote from: Αndré on June 18, 2009, 05:03:20 PM
With this plugin you can 'upload' videos from Youtube and other video file hosters to your website.

Please find the button for the config page on the plugin manager. There you can enable/disable the different video hosters.

Usage:
1. Create a text file and insert the permalink or url from the browser address bar (e.g. http://www.youtube.com/watch?v=6B26asyGKDo)
2. Rename the text file to <filename>.<provider> (e.g. my_video.youtube)
3. Upload the text file to your Coppermine gallery (use the upload form or the batch-add feature)
4. Optional: upload a thumbnail for your video by using this plugin

Download: http://sourceforge.net/projects/coppermine/files/Plugins/1.5.x/cpg1.5.x_plugin_remote_videos_v1.9.zip/download

Ive uploaded the folder to the gallery directory, as well as the txt file, but this plugin doenst show in plugin directory? nor does the video work

Αndré

Please read the docs how to install Coppermine plugins.

Αndré

Version 1.11 (attached to initial post) adds general iframe support. Additionally the deprecated <object> embed was replaced by an iframe for YouTube.

Siava

#152
cpg 1.5.46
plugin latest 1.11 version
I get a error when I try to upload file "test.youtube":

QuoteOnly files with the following extensions are accepted: jpg/jpeg/gif/png/asf/asx/mpg/mpeg/wmv/swf/avi/mov/mp3/midi/mid/wma/wav/ogg/doc/txt/rtf/pdf/xls/pps/ppt/zip/gz/mdb

Youtube provider enabled. Extension .youtube enabled and present in allowed movie files.

P.S.
Fixed after adding mime-type with this.

sonpao

need an help to embed clip from videos.sh, thanks to anyone could help me - thanks