change/ edit video extension

Started by AlexH,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AlexHTopic starter

@Mario

In the latest version and the previous one how and where i can edit for extension .mkv be accepted at both upload and remote link.
or any other extension that I want to add or to delete.


neospider69

admin cp -> Settings -> Uploading

there is a option box with "Allowed video extensions"
  •  

AlexHTopic starter

Quote from: neospider69 on
admin cp -> Settings -> Uploading

there is a option box with "Allowed video extensions"

thk you

I know this set, but not work.

moderator/?sk=add-video

try to add site.com/video.mkv
Seems that link it's not valid or link is wrong

neospider69

those settings are for upload.

You CANNOT add external videos in other formats, as they will not be processed and will not play.

U need to download those videos from source and upload to your site
  •  

AlexHTopic starter

.mkv play on VideoJS player or any other html5 player.

neospider69

wrong, they will play mkv if it's encoded with h264 codec..

anyway, i'm not a coder, so i cannot help more on this issue
  •  

Marius P.

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.

if(!validateRemote(_post('vremote'))){



This stops you in that file.


functions.php
//validate remote
function validateRemote($url){
$pieces_array = explode('.', $url);
$ext = end($pieces_array);
$file_supported = array("mp4","m4v","3gp", "flv", "webm", "ogv", "m3u8", "ts", "tif");
if(in_array($ext, $file_supported) || is_image($url)) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
// don't download content
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if(curl_exec($ch)!==FALSE)
{
return true;
}
else
{
return false;
}
} else {
return false;
}
}
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

AlexHTopic starter

@Mario thk you.
Can i send you by e-mail or PM the code for mkv to check that work very well.

Marius P.

I won't risk adding something like this to the cms by default, but thank you!

You only need to add mkv to the files extensions

$file_supported = array("mp4","m4v","3gp", "flv", "webm", "ogv", "m3u8", "ts", "tif", "mkv");



to solve your problem.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

AlexHTopic starter

thk you again. send you a PM with the code.

Similar topics (7)