Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Video player
Author Message
zero Offline
Forumaš
***

Posts: 461
Joined: Jan 2008
Reputation: 10
Post: #1
Video player
Ima li neki video player za web koji podrzava vise formata? Trenutno koristim 5 playera, svaki za neki format videa. To mi je malo nepregledno. I druga stvar, ako nema takvog playera, ima li smisla raditi konverzaciju u flv format na serveru (jos neznam mogu li na server instalirati taj php plugin)?

Brzo. Jeftino. Kvalitetno. Izaberi dva!
09-10-2010 10:19 AM
Find all posts by this user Quote this message in a reply
kecko Offline
Forumaš
***

Posts: 645
Joined: Nov 2009
Reputation: 20
Post: #2
RE: Video player
bez ffmpeg-a i flvtoola mislim ne možeš raditi konverziju u flv format, inače to ide na način da uploadaš video bilo kojeg formata pa sa ffmpegom konvertiraš u flv, to je ispravan način. Ako te zanima konkretan kod, imam još, bio sam pred neko vrijeme radio custom video cms.
11-10-2010 09:05 AM
Find all posts by this user Quote this message in a reply
zero Offline
Forumaš
***

Posts: 461
Joined: Jan 2008
Reputation: 10
Post: #3
RE: Video player
Ma radim i ja video cms. No sada sam skuzio da upload uopce ne radi na video. Maknuo sam $_FILES["type"] jer sam mislio da on zeza, no izgleda da upload bilo kojeg videa ne radi. Npr jpg slika radi, video ne. :/

Code:
<?php
if ($_FILES["file"]["size"] < 104857600)
  {
  if ($_FILES["file"]["error"] > 0)
    {
    echo "Error: " . $_FILES["file"]["error"] . "<br />Molimo vas da kasnije pokusate ponovno.";
    }
  else
    {
    $ime0 = $_FILES["file"]["name"];
    $ime1 = Array();
    $ime1 = explode('.', $ime0, -1);
    $ime = implode($ime1) . rand(0, 9) . rand(0, 9) . rand(0, 9) . rand(0, 9);
    $ext = "." . substr($ime0, strrpos($ime0, '.') + 1);
    
    while (file_exists("upload/" . $ime . $ext))
      {
      $ime .= rand(0, 9);
      }
    echo "Ime: " . $ime . "<br />";
    echo "Vrsta: " . $_FILES["file"]["type"] . "<br />";
    echo "Velicina: " . ($_FILES["file"]["size"] / 1024 /1024) . " Mb<br />";
    echo "Temp fajl: " . $_FILES["file"]["tmp_name"] . "<br />";

      move_uploaded_file($_FILES["file"]["tmp_name"],
      "upload/" . $ime . $ext);
      echo "Spremnjeno u: " . "upload/" . $ime . $ext;
      
    }
  }
else
  {
  echo "Krivi format videa ili preveliki video. Maksimalna velicina videa je do 100MB, a jedini podrzani format je .flv.";
  }
?>


Dobijem ovo ako uploadam video:

Notice: Undefined index: file in C:\wamp\www\parkour.hr video\video\test.php on line 2

Notice: Undefined index: file in C:\wamp\www\parkour.hr video\video\test.php on line 4

Notice: Undefined index: file in C:\wamp\www\parkour.hr video\video\test.php on line 10
Ime: 6338

Notice: Undefined index: file in C:\wamp\www\parkour.hr video\video\test.php on line 21
Vrsta:

Notice: Undefined index: file in C:\wamp\www\parkour.hr video\video\test.php on line 22
Velicina: 0 Mb

Notice: Undefined index: file in C:\wamp\www\parkour.hr video\video\test.php on line 23
Temp fajl:

Notice: Undefined index: file in C:\wamp\www\parkour.hr video\video\test.php on line 25
Spremnjeno u: upload/6338.


Znaci da cak ni ime nije izvukao van. xD

EDIT: Ako neznas u cemu je problem, mozes li mi molim te poslati taj tvoj kod? Thx

Brzo. Jeftino. Kvalitetno. Izaberi dva!
(This post was last modified: 11-10-2010 03:57 PM by zero.)
11-10-2010 03:06 PM
Find all posts by this user Quote this message in a reply
kecko Offline
Forumaš
***

Posts: 645
Joined: Nov 2009
Reputation: 20
Post: #4
RE: Video player
Imaš u formi prije enctype="multipart/form-data"; da je na hostingu reko bi da možda host ne podržava sve extenzije...
12-10-2010 10:24 AM
Find all posts by this user Quote this message in a reply
zero Offline
Forumaš
***

Posts: 461
Joined: Jan 2008
Reputation: 10
Post: #5
RE: Video player
Na localhostu je, wamp server.

Code:
<html>
<body>
<form action="test.php" method="post" enctype="multipart/form-data">
Izaberite video: <input type="file" name="file" id="file" />
<br /><span style="font-size: 11px;">(Moguci je upload samo videa do velicine od 100MB. Hvala.)
<br /><input type="submit" name="submit" value="Posalji!" />
</form>
</body>
</html>




To je forma. Neznam u cemu bi mogao biti problem...


EDIT: Hahha (zlobni smijeh). I got it. Zapravo, ne znam jos uvijek gdje je bio problem, ali sam sada sredio preko ftp-a :)

Brzo. Jeftino. Kvalitetno. Izaberi dva!
(This post was last modified: 12-10-2010 01:16 PM by zero.)
12-10-2010 12:56 PM
Find all posts by this user Quote this message in a reply
kecko Offline
Forumaš
***

Posts: 645
Joined: Nov 2009
Reputation: 20
Post: #6
RE: Video player
reko bi da su permisije, ali windows je u pitanju pa ne bi trebalo biti, što nisi imao folder taj stvoreni? mislim čudno mi da to preko ftp-a riješavaš na localhostu, ono wtf?
13-10-2010 01:20 PM
Find all posts by this user Quote this message in a reply
zero Offline
Forumaš
***

Posts: 461
Joined: Jan 2008
Reputation: 10
Post: #7
RE: Video player
Pokrenuo filezilla server i rijesio to preko ftp-a. Folder je dobar jer sam vec rekao da mogu slike, ne video. Kako mogu provjeriti mime type prije ftp uploada?

Brzo. Jeftino. Kvalitetno. Izaberi dva!
13-10-2010 03:49 PM
Find all posts by this user Quote this message in a reply
kecko Offline
Forumaš
***

Posts: 645
Joined: Nov 2009
Reputation: 20
Post: #8
RE: Video player
nikako, koliko ja znam, osim ako znaš ime datoteke pa po ekstenziji, ali ekstenzija je tako tako, može biti i nemora :)
14-10-2010 11:21 AM
Find all posts by this user Quote this message in a reply
zero Offline
Forumaš
***

Posts: 461
Joined: Jan 2008
Reputation: 10
Post: #9
RE: Video player
:(... Onda nista od ftp-a. Ajde ako mozes u pm poslati kod tog tvog cms-a, pa da probam.

Brzo. Jeftino. Kvalitetno. Izaberi dva!
14-10-2010 01:42 PM
Find all posts by this user Quote this message in a reply
kecko Offline
Forumaš
***

Posts: 645
Joined: Nov 2009
Reputation: 20
Post: #10
RE: Video player
ma nije problem, al kako tebi upload forma ne radi? Ti ja velim zašto? He he nije do tipa podataka, sad se sjetih problem je u veličini datoteke, php ti ima ograničenje u php.ini datoteci po defaultu d anemoš uploadat datoteke veće od 4MB :)) to si provjeri pa probaj ponovo uploadat
15-10-2010 11:01 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)