Jump to content

Search the Community

Showing results for tags 'video'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 15 results

  1. Hello all, I dont know why I'm getting this error with calculating the duration for the video, everything works fine with uploading, file is going in my database and folder, the duration of my video is ok. ​http://prnt.sc/e59i4f here is my code: // video duration ob_start(); passthru("ffmpeg -i $tmp 2>&1"); $duration = ob_get_contents(); ob_end_clean(); $search='/Duration: (.*?)[.]/'; $duration=preg_match($search, $duration, $matches, PREG_OFFSET_CAPTURE); //error is on this line botom $duration = $matches[1][0]; ​//error is on this line botom list($hours, $mins, $secs) = split('[:]', $duration); //echo "Hours: ".$hours." Minutes: ".$mins." Seconds: ".$secs; $duration=$hours.':'.$mins.':'.$secs;
  2. Say I want to allow users to chat with each other either through text or video on my site, what would be the best way to go on about doing that? I know basic text chat system can be created with PHP/Mysql/Ajax. What about video chat? Or is there a chat plugin/service out there that I can use to implement in my site? Note that I am looking for something can allow thousands of registered users to chat with each other at the same time.
  3. Hi. I am trying to create a simple video file server. I finished the skeleton of it but when it came to creating the multitude of pages I realized that there could be an easier way to do it. I started out basically getting the folder names in the server then printing them on the page. <?php $dirs = glob("*", GLOB_ONLYDIR); echo '<ul>'; foreach($dirs as $dir) { $forbidden_folders = array("not4u", "ignore", Styles); $filename = str_replace($forbidden_folders, '', $dir); if (!empty($filename)) { echo '<li><a href="'.$dir.'">'.$dir.'</a></li>'; } } echo '</ul>' ?> Then I created in each of the folders with files a php file with this code: <?php function date_sort_desc($a, $b) { preg_match('/\w+ \d{4}/', $a, $matches_a); preg_match('/\w+ \d{4}/', $b, $matches_b); $timestamp_a = strtotime($matches_a[0]); $timestamp_b = strtotime($matches_b[0]); if ($timestamp_a == $timestamp_b) return 0; return $timestamp_a < $timestamp_b; } $files = array(); $dir = opendir('.'); while(false != ($file = readdir($dir))) { if(($file != ".") and ($file != "..") and ($file != "index.php")) { $files[] = $file; } } natsort($files); $i = 0; foreach($files as $file) { $i++; $string = str_replace("TV Show Name S1 E$i - ", '' , $file); echo '<div><a href="../Discriptions/'.$file.'.php">'.basename($string, '.m4v').'</a></div><br>'; } ?> This opens up a php file with the same file name as the file to be played containing the episode's thumbnail and description. That file then contains a link pointing back to the real file. The problem here is that I'd have to make a new php file for every file in my collection. I'm wondering if there's somehow a way to simplify all of this.
  4. Do you know of a way in php to do multitrack video editing? The only tool I have found online is a MltMelt, which is a command line utility. I'm in the process of making an app that merges multiple videos, photos and audio clips into one video, but I was wondering if there was a way to process this in php. Can anyone point me to a PHP library that can handle things like multitrack merging, transitions, color effects, blurring, etc? I'm looking for adobe premier like features in code.
  5. Hey everyone! I have a question about handling video files. Are there classes available for handling videos? I've found classes to handle images and I was wondering if there is something similar for videos. I'm asking because I want to allow users to upload videos, but I want to reduce their resolution (take up less space). The video is intended to play in a small section on the page, so it doesn't require high resolution. I'll appreciate any help. Thanks!
  6. Hi everyone, I'm hoping the someone can guide me in the right direction for what I need to do. Does anyone know of a really good tutorial and/or information about a plugin product that is available to do what I need? For example, what I need is to create a website that has the ability to allow video conferencing between a teacher and students. This what I envision - a college professor can log on to his website and display a live video feed of him. Also, as each of his students log on, their live video feed is then also supplied. Would prefer a already made plugin product but would also like to look at raw code in PHP to see how something like this could be accomplished. Thank you in advance. Charles
  7. I'm trying to use phpMyAdmin to put a blob video into the database (for ease of handling), and for some reason when I put the video into the blob, and submit it, phpMyAdmin bounces back to the home page, and says "no change". Does anyone know what's going wrong in the file? I've done the same upload with the image preloader just fine, but when I go to do the video it errors.
  8. Hi, before i get burried in trying to create the code, I was hoping to get some advice before moving forward. I am creating a video sharing app for a client. The videos are highly confidential, so i want to store them outside the root and stream them when a user enters a link into a browser. Is this possible? I can seem to find any info on any forums or Google. Can I stream it direct to the browser? Many thanks Alan
  9. <!DOCTYPE html> <html> <head> <style type="text/css"> div#video_player_box{ width:550px; background:#000; margin:0px auto;} div#video_controls_bar{ background: #333; padding:10px; color:#CCC; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; } button#playpausebtn{ background:url(pause.png); border:none; width:16px; height:18px; cursor:pointer; opacity:0.5; } button#playpausebtn:hover{ opacity:1; } input#seekslider{ width:180px; } input#volumeslider{ width: 80px;} input[type='range'] { -webkit-appearance: none !important; background: #000; border:#666 1px solid; height:4px; } input[type='range']::-webkit-slider-thumb { -webkit-appearance: none !important; background: #FFF; height:15px; width:15px; border-radius:100%; cursor:pointer; } </style> <script> var vid, playbtn, seekslider, curtimetext, durtimetext, mutebtn, volumeslider, fullscreenbtn; function intializePlayer(){ // Set object references vid = document.getElementById("my_video"); playbtn = document.getElementById("playpausebtn"); seekslider = document.getElementById("seekslider"); curtimetext = document.getElementById("curtimetext"); durtimetext = document.getElementById("durtimetext"); mutebtn = document.getElementById("mutebtn"); volumeslider = document.getElementById("volumeslider"); fullscreenbtn = document.getElementById("fullscreenbtn"); // Add event listeners playbtn.addEventListener("click",playPause,false); seekslider.addEventListener("change",vidSeek,false); vid.addEventListener("timeupdate",seektimeupdate,false); mutebtn.addEventListener("click",vidmute,false); volumeslider.addEventListener("change",setvolume,false); fullscreenbtn.addEventListener("click",toggleFullScreen,false); } window.onload = intializePlayer; function playPause(){ if(vid.paused){ vid.play(); playbtn.style.background = "url(pause.png)"; vid.play(); playbtn.innerHTML = "pause"; } else { vid.pause(); playbtn.style.background = "url(play.png)"; vid.play(); playbtn.innerHTML = "play"; } } function vidSeek(){ var seekto = vid.duration * (seekslider.value / 100); vid.currentTime = seekto; } function seektimeupdate(){ var nt = vid.currentTime * (100 / vid.duration); seekslider.value = nt; var curmins = Math.floor(vid.currentTime / 60); var cursecs = Math.floor(vid.currentTime - curmins * 60); var durmins = Math.floor(vid.duration / 60); var dursecs = Math.floor(vid.duration - durmins * 60); if(cursecs < 10){ cursecs = "0"+cursecs; } if(dursecs < 10){ dursecs = "0"+dursecs; } if(curmins < 10){ curmins = "0"+curmins; } if(durmins < 10){ durmins = "0"+durmins; } curtimetext.innerHTML = curmins+":"+cursecs; durtimetext.innerHTML = durmins+":"+dursecs; } function vidmute(){ if(vid.muted){ vid.muted = false; mutebtn.innerHTML = "Mute"; } else { vid.muted = true; mutebtn.innerHTML = "Unmute"; } } function setvolume() { vid.volume = volumeslider.value / 100; } function toggleFullScreen(){ if(vid.requestFullScreen){ vid.requestFullScreen(); } else if(vid.webkitRequestFullScreen){ vid.webkitRequestFullScreen(); } else if(vid.mozRequestFullScreen){ vid.mozRequestFullScreen(); } } </script> </head> <body> <div id="video_player_box"> <video id="my_video" width="550" height="310" autoplay> <source src="Tom_and_Jerry.mp4"> </video> <div id="video_controls_bar"> <button id="playpausebtn"></button> <input id="seekslider" type="range" min="0" max="100" value="0" step="1"> <span id="curtimetext">00:00</span> / <span id="drtimetext">00:00</span> <button id="mutebtn">Mute</button> <input id="volumeslider" type="range" min="0" max="100" value="100" step="1"> <button id="fullscreenbtn">[ ]</button> </div> </div> </body> </html> i cant seem to get the play/pause button to show when the play.png and pause.png buttons arent available. also do you know where i can get free icons of play and pause button ?
  10. Gretings all. Right now i use wordpress and in my post i can add a Video by entering the Youtube address into a Custom field called "video_url" and then it outputs the video on my site wich works easy, here it is: <div class="video"> <html><center> <?php $meta_value = get_post_meta($post->ID, 'video_url', true); if($meta_value){ $url = parse_url($meta_value); $id = 0; if($url['host'] == 'youtu.be'){$id = ltrim($url['path'],'/');} else if(strpos($url['path'],'embed') == 1){$id = end(explode('/',$url['path']));} else{parse_str($url['query']);$id = $v;} echo '<p><iframe width="540" height="355" frameborder="1" allowfullscreen="true" src="http://www.youtube.com/embed/'.$id. '?version=3&theme=light&fs=1&rel=0&cc_load_policy=1&iv_load_policy=1&modestbranding=1" type="application/x-shockwave-flash" allowScriptAccess="always" allowfullscreen="true" width="600" height="355"> </iframe></p>'; } ?> </div> However i am tring to add this Modification here in wich adding the video link custom field will also bring back the youtube video title and descripiton, <?php $video_id = ’48J_DIZBNyE’; $video_info = simplexml_load_file(‘http://gdata.youtube.com/feeds/api/videos/’.$video_id.’?v=1′); echo $video_info->title . ‘<hr>’; // title echo $video_info->content; // description ?> Could anyone please help me implement the bottom code with the top piece of code !! Mucg respect>< Thanks
  11. I have been trying to create a video slideshow site similar to Animoto.com or Slide.ly with little success. I want users to be able to upload their own images, and possibly music and then have a few options with transitions and text so that they can create their own video slideshows. I found some code in php that created a slideshow and had various effects, but it created it in a .swf format and looped with no way to just make a video. It was http://www.maani.us/slideshow/ The interface seemed pretty easy, but like I said, it looped and wasn't really created into a video format similar to .mp4. I am looking for direction on where to go to be able to create such a web app. I have looked with google for hours with little success. I just want something very similar to the way animoto.com works. User uploads, creates, and done. Very basic, and very simple. Please help!
  12. Hiya I've been searching for an encompassing solution to a problem for 2 days now and was wondering if anybody could shed some light on it? I've setup a html5 video to play on various web browsers and finally got it to work for android phones. I also use flash for older browsers that will not work with the html5 code. Android seems to be the most tricky as it requires js to call the video to play. Furthermore Its worth noting as far as I have seen that android doesnt even support https video streaming which is a nightmare and pretty short sighted of them. Heres the working code so far: <script> function vidEvent() { var videos = document.getElementsByTagName('video'); var vidCount = videos.length; for(i=0;i<vidCount;i++) { videos[i].addEventListener('click',bang,false); } } function bang() { this.play(); } window.onload = vidEvent; </script> <video width="560" height="320" autoplay="autoplay"> <source src="videos/Landing-Page.mp4" type="video/mp4" /> <source src="videos/Landing-Page.mv4" type="video/mv4" /> <source src="videos/Landing-Page.ogv" type="video/ogg" /> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="320"> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="videos/player.swf" width="560" height="315"> <!--<![endif]--> <param name="movie" value="videos/player.swf" /> <param name="wmode" value="transparent" /> <param name="bgcolor" value="#FFFFFF" /> <param name="quality" value="high" /> <param name="allowFullScreen" value="true" /> <param name="allowscriptaccess" value="always" /> <a href="http://www.adobe.com/go/getflash"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /> </a> <param name="flashvars" value="vdo=videos/Landing-Page.flv&autoplay=true" /> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </video> Ok so it works on android phones (galaxy s i9000) and works in FF (if http NOT https), Chrome, IE and Safari (on my laptop). It doesn't seem to work on iphones at all so would assume thats the same for ipads.. Can you see anything obviously wrong with my code? I wonder if the js is causing the problem with iphone. Does any body know of a workable solution where a html5/flash video can be embeded on a website to be able to play on iphone/ipad, kindle, android and desktop/laptop older browsers. If anybody can shed any light on this I would so happy because this is just a mine field. Thank you
  13. Hello all, I'm new to PHP and in a bit of a jam. I have a PHP script that scans a specified folder for all the files in it. All of the files are images. It uses a foreach statement to place them all inside of hyperlinks linked to lightbox to make an image gallery. This works perfectly. Now part two of my gallery project is scanning a different file for videos. I figured it would be pretty easy to edit my existing script and conform it to video. I was wrong. Halfway through rewriting the script I realized that every video has two formats. MP4 and OGG. This will cause every video to be displayed in the gallery twice. Does anyone know how to scan a file for videos and place them on a page without making an embeded video for each format? Below is my code. <?php $videos= glob('videos/*'); natcasesort($videos); foreach($videos as $video) { echo '<video controls tabindex="0">'; echo '<source src="'.$video.'" type="video/mp4;" />'; echo '<source src="'.$video." type="video/ogg;" />'; echo '</video>'; } ?>
  14. Hi, my name is Felipe (aka Sabino) and I am new here! This is my first post! I am working on a code to make you grab a direct MP4 file from the vk.com (a russian facebook like social network) My goal is to use another player with the file, like jPlayer, for example. Here is what I've got so far: I know it's ugly coded, but still, I just want to make it work. <?php //pretending to be a browser function download_pretending($url,$user_agent='Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)') { $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_REFERER, 'http://vk.com/'); $result = curl_exec ($ch); curl_close ($ch); return $result; }//function download_pretending($url,$user_agent) $url = $_GET["url"]; $id = $_GET["id"]; $hash = $_GET["hash"]; $url = $url . "&id=" . $id . "&hash=" . $hash . "&hd=2"; $pagina = download_pretending($url,'Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10'); $host = get_string_between($pagina, 'host=', '&'); echo $host; echo "<br>"; $ps = array(); $count = preg_match_all('/<source[^>]*>(.*?)<\/source>/is', $pagina, $match); for ($i = 0; $i < $count; ++$i) { $ps[] = $match[0][$i]; } // Function to get the MP4 file URL from the page function get_string_between($string, $start, $end){ $string = " ".$string; $ini = strpos($string,$start); if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini; return substr($string,$ini,$len); } //I know I can make a for, I was lazy echo '<br>'; echo get_string_between($match[0][0], 'src="', '" type='); echo '<br>'; echo get_string_between($match[0][1], 'src="', '" type='); echo '<br>'; echo get_string_between($match[0][2], 'src="', '" type='); echo '<br>'; echo get_string_between($match[0][3], 'src="', '" type='); echo '<br>'; ?> If you test with this url: http://vk.com/video_ext.php?oid=15318088&id=151930229&hash=e5fb57179b1830c3&hd=1 The result will be something like this: http://cs12492.vk.me/u15318088/videos/aa6b0afa06.720.mp4 http://cs12492.vk.me/u15318088/videos/aa6b0afa06.480.mp4 http://cs12492.vk.me/u15318088/videos/aa6b0afa06.360.mp4 http://cs12492.vk.me/u15318088/videos/aa6b0afa06.240.mp4 But if I try to access any of those links, I gives me a 404 error, from vk.com So, I don't know if this is a protection, if the link works only for the IP that loads the page, don't know... If you want to try the script, go here: http://sabino.net16.net/vk/?url=http://vk.com/video_ext.php?oid=15318088&id=151930229&hash=e5fb57179b1830c3&hd=1 Can someone help me? Thanks in advance!
  15. Hello Everyone, I am stuck in a task to change byteArray to Video in php. I am creating a webservice in php. This service will receive video in byteArray format from iphone and need to convert it back to original video. I mean, webservice will receive byte array from POST. I could not find any way of converting byteArray into video. byteArray datatype does not seem to be supported by php. Any help would be appreciated.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.