Load HTML 5 audio and video from external files not compiled

153 views
Skip to first unread message

Marcelo Aguiar

unread,
Oct 8, 2014, 10:44:17 PM10/8/14
to php...@googlegroups.com
I am in desperate need of help from you. 

I am unable to make the compiled exe load audio and video on the screen when these files are not compiled by external ZZEE .. 

example: 
My directory is like this: 

myprogram.exe 
audios 
    my_audio.mp3 
videos 
   my_video.mp4 

The audio and video folders were not compiled, so there are internal files. 

The code below would be to run the audio and video: 

<?php 

$dir_audio = "file:///".$_SERVER ['ZZEE_PHPEXE_SERVER_ROOT']; 
$dir_audio = str_replace ('\\', '/', $dir_audio)."áudios/my_audio mp3 "; 
$dir_video = "file:///".$_SERVER ['ZZEE_PHPEXE_SERVER_ROOT']; 
$dir_video = str_replace ('\\', '/', $dir_video)."videos/my_video.mp4"; 

?>

<!DOCTYPE HTML> 
<html> 
<head> 
</head> 
<body> 

<audio autoplay controls> 
   <source src = "<php ​​echo $dir_audio;?>" type = "audio/mpeg">
</audio> 

<vídeo autoplay controls> 
   <source src = "<php ​​echo $dir_video;?>" type = "video/mp4; codec =" avc1.42E01E, mp4a.40.2 "'> 
</video> 
</body> 
</html> 

The audio and video is not executed in myprogram.exe. 
What am I doing wrong? Could you help me? 
Precisor urgently solve this problem! 

I appreciate and look back.



Miike

unread,
Oct 9, 2014, 2:45:42 PM10/9/14
to php...@googlegroups.com
You probably don't want to have the large media files in the compiled output files.  I would personally separate the media files from the code, compile the code and distribute the media files in another folder that you introduce to the mix after compiling (making note or detecting the paths).

I am not sure that html 5 <audio> will work to play audio in a PHPexe.  If I remember correctly though, you might be able to use the jQuery JPlayer.js (not the IE depricated version; choose an older version V2 or less, NO subversions of V2)  This is all from a distant memory mind.

Video wise, I have successfully created a video player with PHPexe.  The files were loaded using the File dialogue feature which is great, and then I used a flash player that worked with H264 mp4 etc.

Regards,
Mike

PHPexe user.

Mike:Hewitt

unread,
Oct 9, 2014, 3:31:19 PM10/9/14
to php...@googlegroups.com
... actually jplayer helps with video too :)


Best wishes

--
--
You received this message because you are subscribed to the Google
Groups "ZZEE PHPExe" group.
To post to this group, send email to php...@googlegroups.com
To unsubscribe from this group, send email to
phpexe+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phpexe?hl=en
---
You received this message because you are subscribed to the Google Groups "ZZEE PHPExe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phpexe+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ZZEE Groups

unread,
Oct 9, 2014, 3:54:29 PM10/9/14
to php...@googlegroups.com
Cool! TH
--
Regards,
Paul.

ZZEE Groups

unread,
Oct 9, 2014, 3:54:46 PM10/9/14
to php...@googlegroups.com
Thank you for your help!
--
Regards,
Paul.

Mike:Hewitt

unread,
Oct 9, 2014, 3:55:44 PM10/9/14
to php...@googlegroups.com
If you have a problem finding version 2.0.0 of jplayer then I may have a copy on a computer here somewhere.
Message has been deleted

Marcelo Aguiar

unread,
Oct 9, 2014, 5:06:17 PM10/9/14
to php...@googlegroups.com
Mike and Paul 

Okay? 

Following their guidelines, I picked the JPlayer 2.0.0 and could rotate in any files compiled audio internally. 

How do now to run ZZeePHPExe JPlayer an external directory (not compiled)? 

Remembering, I do not wish to compile the audio folder. It will be an external directory ... 

See JPlayer code: 

$ (document) .ready (function () {
   $ ("# jpId"). JPlayer ({
     ready: function () {
       $ (this) .jPlayer ("setMedia", {
         mp3: "audios / senha.mp3" 
          // This path only works with internal paths compiled audios files. 
          // I need to change this path to seek 
          // folder audios from external files not compiled. 
       }); 
     } 
   }); 
   $ ("# jpId") JPlayer ("play").; 
}); 
</ script>

ZZEE Groups

unread,
Oct 9, 2014, 5:56:40 PM10/9/14
to php...@googlegroups.com
Put a file into c:/ for test (its path is c:\senha.mp3), and do this:

$ (this) .jPlayer ("setMedia", {
mp3: "file:///c/senha.mp3"
});

If this works, then you can get the path of a real file and change it
to the thing above

Marcelo Aguiar

unread,
Oct 9, 2014, 6:34:12 PM10/9/14
to php...@googlegroups.com
Hello. 

This change did not work as you said. 

...
      $(this).jPlayer("setMedia", {
        mp3: "file:///c/senha.mp3"
      });
...

The official website of JPlayer asks for us to put this absolute path: 

...
      $(this).jPlayer("setMedia", {
        mp3: "file:///C:/senha.mp3"
      });
...

I inserted this path and opened my html page in windows and the audio works. 

When I compile the ZeePhpExe not work !! :( 

So that means everything is ok with JPlayer. 

The real problem is when I compile with ZeePHpExe.

Have any other solution?  :(

Mike:Hewitt

unread,
Oct 9, 2014, 6:50:37 PM10/9/14
to php...@googlegroups.com
If you can't deploy jplayer, is there a reason or issue you can elaborate on?  Might be bad Google translate :)

I've located jplayer 2.0.0 if that's of any use?


More info near the lower part of this page:






2014-10-09 21:06 GMT+01:00 Marcelo Aguiar <marcelo.so...@gmail.com>:
HI Mike and Paul

Em primeiro lugar, obrigado por ouvir! 

Exatamente! 

Meu projeto tem arquivos de áudio and'video muito grande, então eu não compilar esses arquivos. 

Então, eu estou deixando de fora o projeto e compilado depois que eu estou restabelecendo as pastas de áudio e vídeo no meu projeto. 

Eu não sou capaz de implantar JPlayer no meu projeto. 

Você tem tutoriais mostrando como fazer isso?

Marcelo

Em quinta-feira, 9 de outubro de 2014 16h55min44s UTC-3, Miike escreveu:
Se você tiver problemas para encontrar a versão 2.0.0 do JPlayer então eu posso ter uma cópia em um computador em algum lugar.

Em 09 de outubro de 2014 20:54, ZZEE Grupos < gro ... @ zzee.com > escreveu:
Obrigado pela ajuda!

Em Thu, 09 outubro de 2014 às 11:54 horas, ZZEE Grupos < @ zzee.com rajadas ... > escreveu:
> Cool! TH
>
> On Thu, 09 de outubro de 2014 às 23:31, Mike: Hewitt < Froog ... @ googlemail.com > escreveu:
>> Na verdade ... JPlayer Ajuda com vídeo também :)
>>
>> http: //jplayer.org/download/
>>
Os melhores cumprimentos >>
>>
>> Em 09 de outubro de 2014 03:44, Marcelo Aguiar < marcelo.so ... @ gmail. COM >
>> escreveu:
>>>
>>> Estou precisando desesperadamente de ajuda de vocês.
>>>
>>> eu sou incapaz de marcar o exe Patrocinado carga de áudio e vídeo na tela
>>> quando esses arquivos Arent Patrocinado pelo Eterno ZZEE ..
>>>
>> > exemplo:
>>> Meu diretório é assim:
>>>
>>> myprogram.exe
áudios >>>
>>> my_audio.mp3
>>> vídeos
>>> my_video.mp4
>>>
>>> O áudio e Folders vídeo patrocinado não eram, saltar lá Interno Shutdown
>>> arquivos.
>>>
>>> O código abaixo wouldn't-- eBay para executar o áudio e vídeo:
>>>
? >>> <php
>>>
>>> $ dir_audio =: $ _ SERVER ['ZZEE_PHPEXE_SERVER_ROOT']; "arquivo ///."
. >>> $ dir_audio = str_replace ('\\', '/', $ dir_audio) "áudios / my_audio mp3";
>>> $ dir_video = "file:. ///" $ _ SERVER ['ZZEE_PHPEXE_SERVER_ROOT'];
. >>> $ dir_video = str_replace ('\\', '/', $ dir_video) ". vídeos / meu_video mp4 ";
>>>
> >>?>
>>>
>>> <! DOCTYPE html>
>>> <html>
>>> <head>
>>> </ head>
>>> <body>
>>>
>>> <controle de áudio AutoPlay >
>>> <source src = "<php ​​echo $ dir_audio;?>" type = "audio / mpeg">
>>> </ audio>
>>>
>>> <controle Pará AutoPlay>
>>> <source src = "<php ​​echo $ dir_video;?>" type = "video / mp4; codec = "
>>> avc1.42E01E, mp4a.40.2 ">
>>> </ video>
>>> </ body>
>>> </ html>
>>>
>>> O áudio eo vídeo não é executado em myprogram.exe.
>>> O que estou fazendo de errado? Você poderia me ajudar?
>>> Precisor urgentemente resolver este problema!
>>>
>>> eu aprecio e olhar para trás.
>>>
>>>
>>>
>>> -
>>> -
>>> Você recebeu Porque esta mensagem você está assinantes do Google
Groups >>> trickle "ZZEE PHPExe".
>>> Para postar neste grupo, envie um e-mail para php ... @ googlegroups.com
>>> Para sair deste grupo, envie um e-mail taxa
>>> phpexe + un ... @ googlegroups.com
>>> Para ver mais opções, visite esse grupo em
>>> http://groups.google.com/ trickle / phpexe hl = pt?
>>> - -
>>> Você recebeu esta mensagem porque está assinantes dos Grupos do Google
. grupo "ZZEE PHPExe" >>>
>>> Para sair deste grupo e parar de receber e-mails a partir dele, enviar o
e-mail para >>> phpexe + un ... @ googlegroups.com .
>>> Para mais opções, visite https://groups.google.com/d/ OptOut .
>>
>>
>> -
>> -
>> Você recebeu esta mensagem porque você assinantes de encerramento para o Google
Groups >> "ZZEE PHPExe" trickle.
>> Taxa de postar neste grupo, envie um e-mail para php ... @ googlegroups.com
>> Para sair deste grupo, envie um e-mail para
>> phpexe + un. .. @ googlegroups.com
>> Para mais opções, visite esse grupo em
>> http://groups.google.com/ Painéis / phpexe? hl = pt
>> ---
>> Você recebeu esta mensagem porque está assinantes S para os Grupos do Google
>> grupo "ZZEE PHPExe".
>> Taxa de sair deste grupo e parar de receber e-mails a partir dele, enviar o
e-mail para >> phpexe + un ... @ googlegroups.com .
>> Para mais opções, visite https://groups.google.com/d/ OptOut .
>
>
>
> -
> Atenciosamente,
> Paulo. - Saudações, Paul. - - Você recebeu esta mensagem porque está assinantes do Google Groups "ZZEE . PHPExe "trickle Para postar neste grupo, envie um e-mail para php ... @ googlegroups.com Para sair deste grupo, envie um e-mail para phpexe + un ... @ googlegroups.com Para mais opções, visite esse grupo em http: //groups.google.com/ Painéis / phpexe? hl = en --- Você está recebendo esta mensagem porque está assinantes dos Grupos do Google "ZZEE PHPExe" trickle. Para sair deste grupo e parar de receber e-mails a partir dele, enviar o E-mail para phpexe + un ... @ googlegroups.com . Para obter mais opções, visite https://groups.google.com/d/ OptOut .





















Mike:Hewitt

unread,
Oct 9, 2014, 6:51:12 PM10/9/14
to php...@googlegroups.com
Oops I missed some dialogue :)

Marcelo Aguiar

unread,
Oct 9, 2014, 7:05:33 PM10/9/14
to php...@googlegroups.com
Hi miike

I'm trying to access audio file is not compiled. 

We try to HTML5 <audio> tag and it did not work :( 
tried in JPlayer with the commands posted above and did not work :( 

We downloaded version 2.0.0 of JPlayer you guided and set here. 
Opening the htm page in windows audio works perfectly. 
Compiling the page in ZZEE my_page.exe and opening the audio does not work. 

Look up the dialogues. 

I'm starting to believe ZZEEPhpExe that is not able to read external files not compiled extensions, except the extension "txt". 

I really need this software. I loved it. I already have my credit card to make a purchase ZZEE but need to solve this problem first. 

Do you have any solution for us? :) 

Marcelo Aguiar

unread,
Oct 9, 2014, 8:54:56 PM10/9/14
to php...@googlegroups.com
Any solution?

ZZEE Groups

unread,
Oct 10, 2014, 1:36:30 AM10/10/14
to php...@googlegroups.com
Please try PHPExe with the very same URL of "file:///C:/senha.mp3".
Does it work with exactly same URL?

Marcelo Aguiar

unread,
Oct 10, 2014, 2:46:17 AM10/10/14
to php...@googlegroups.com
As I said above. This way does not work. 

It is the official way of JPlayer site. 
Project in .html it works. (my_project.html)
Project in .exe does not work (my_program.exe) :(


Mike:Hewitt

unread,
Oct 10, 2014, 4:11:10 AM10/10/14
to php...@googlegroups.com
ZZEEPhpExe is definitely able to read external files that are not compiled.  I've historically created a video convertor that interfaced with FFMPEG, a video player that used a flash player and a text editor that used many extensions.

There will be a solution somehow within the community..  I am certainly having a think whilst I'm setting up some servers..

Marcelo Aguiar

unread,
Oct 10, 2014, 7:49:17 AM10/10/14
to php...@googlegroups.com
Hello guys, 

Thank you for attention.
Let's think together. 
After performing tests here come to the conclusion that the problem is not in the HTML5 <audio> <video> tags, jplayer, flash... etc. 
You wrote that the internal browser ZZEEPhpExe not support HTML5. 
But then again, the built-in browser has support yes. 
If I compile the audio file along with the project and put this: 

<audio> 
       <source src = "audios/myaudio.mp3" type = "audio / mpeg"> 
</ audio 

The audio works in "may_program.exe" !! 
Then the internal browser is supported on ZZEEPhpExe tags <audio> <video> HTML5! 

The JPlayer ... if I put inerno this way: 

       $ (this) .jPlayer ("setMedia", {
         mp3: "audios/my_audio.mp3
       }); 

The JPlayer works perfectly in the browser inerno ZZEEPhpEXE. 
Conclusion, we can use the FLASH, JavaScript seem, JPlayer and HTML5 technology to internally compiled files that work perfectly !! 
The problem is how these files are not compiled. In this case, the ZZEE PhpExe is not being able to interpret these absolute paths "'c:/ ..." to external files. 
My thoughts helped you? 

Again, thanks for listening!

ZZEE Groups

unread,
Oct 10, 2014, 8:40:56 AM10/10/14
to php...@googlegroups.com
Great,

In this case you can create a php script that reads a file from disk
and run it like this:

<audio>
<source src = "/readFile.php/audios/myaudio.mp3" type = "audio / mpeg">
</ audio>

Where /audios/myaudio.mp3 will be availabe via pathInfo, and the
script readFile.php will read and send the file, like this:

<?php
// todo: Get path via path info
echo file_get_contents($file);
> --
> --
> You received this message because you are subscribed to the Google
> Groups "ZZEE PHPExe" group.
> To post to this group, send email to php...@googlegroups.com
> To unsubscribe from this group, send email to
> phpexe+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phpexe?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "ZZEE PHPExe" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to phpexe+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Regards,
Paul.

Marcelo Aguiar

unread,
Oct 10, 2014, 9:59:59 AM10/10/14
to php...@googlegroups.com
I Got Your guidance. I did like this: 

My source directory: 

C:/my_project/ 
    index.php 
    readFile.php 
    file.txt 

file.txt 
c:/my_project_output/audios/my_audio.mp3 

readFile.php 
<?
$file = file_get_contents("file.txt"); 
echo $file; 
?> 

# index.php 
<! DOCTYPE HTML> 
<html> 
<head> 
</ head> 
<body> 
<audio controls autoplay> 
          <source src = "<include "readFile.php"; ?>" type = "audio / mpeg"> 
</ audio> 
</ body> 
</ html> 

Remembering that only the audios folder is not compiled. 

My output directory 

C:/my_project_output/ 
    Index.exe 
    audios 
       my_audio.mp3 

It did not work :( 

I also tried entering the relative path in file.txt 
audios/my_audio.mp3 

And it did not work too. 

Also tried with JPlayer not worked :( 

I'm looking on google a program that does the same thing that makes ZZEE. I found this: OutPupExe
Perhaps my experience helps. 
In this program I can operate audio and video from external files not compiled using absolute path: "C:/..." 
I did a test build with ExeOutPut using getcwd() native function PHP.

See:

<? 
$absolute_path = getcwd(); 
$absolute_path = str_replace ("\\", "/", $absolute_path); 
?> 

<!DOCTYPE HTML> 
<html> 
<head> 
</head> 
<body> 
    <audio controls autoplay> 
        <source src = "<echo $absolute_path."/audios/my_audio.mp3"; ?>" type = "audio/mpeg"> 
    </audio> 
</body> 
</html> 

It's work!!

Assuming I've put my project in the C:\my_folder_project, if I give a "echo $absolute_path" I returns the path "C:/my_folder_project/audios/my_audio.mp3". 

So my_project.exe worked the absolute path width ExeOutPut software !: 
...<source src = "C:/my_folder_project/audios/my_audio.mp3" type = "audio/mpeg"> ...

I can you use this source and to make exactly the same with the ZZEEPhpExe to image files, txt files and local database (.mdb) for example. I tested!
Audio and video, the ZZEE not work.

The program ZZEEPhpExe perhaps should consider this way too. In the ZZEEPhpExe I can to make 

But I wanted to make it work in ZZEEPhpExe. I really liked this program. 

Thank you for your attention. 
I await return.

Mike:Hewitt

unread,
Oct 10, 2014, 10:48:34 AM10/10/14
to php...@googlegroups.com
I've found 'a' version of a video player I created some time ago.

If you install and run this program, then click File->Open and choose a small MP4 does the video file play?  (note it defaults to MOV in the filetype if no MP4s are brows-able in the open file dialogue) .  Please note this is deprecated software and is not to be redistributed.


Regards

--

Marcelo Aguiar

unread,
Oct 10, 2014, 4:32:17 PM10/10/14
to php...@googlegroups.com
Hi Miike 

I will downloading software.

Wait a moment.

Marcelo Aguiar

unread,
Oct 10, 2014, 4:46:29 PM10/10/14
to php...@googlegroups.com
Miike 

I think I'm out of luck. 

The software that you asked me to download I installed it here. 

When I open the software will lock the screen with a title bar saying "not responding" and your software does not open. 

I'm using windows 7 64-bit. 

Any solution?
print not responding.png

Marcelo Aguiar

unread,
Oct 10, 2014, 7:40:39 PM10/10/14
to php...@googlegroups.com
Mikke .. good news! 

I restart my computer. 
Your software work! 
Showed the video! 
You did this software in the ZZEE? 
Ow my God! Tell me the magic !! 

Wait!

Marcelo Aguiar

unread,
Oct 10, 2014, 8:07:46 PM10/10/14
to php...@googlegroups.com
Miike. 

I've been studying the files of your software. 

It seems to me that you used flash player that takes video information through the "video.dll" file 

Inside the video.dll file has the absolute path of the video I watched: "C:|Users|marcelo|Desktop|video1.mp4" .
 
This is the absolute path of the video!. 

Tell me how you did it :)

Mike:Hewitt

unread,
Oct 10, 2014, 8:57:06 PM10/10/14
to php...@googlegroups.com
Hi,  it's taken me a while to find, but happily here is the whole source code for the ZZEE video player.  The only file missing here is the player.swf which I've had to remove for copyright reasons.  The rest is as is, so you can study the concept. Might be useful:


Best wishes.

--

Marcelo Aguiar

unread,
Oct 10, 2014, 9:08:48 PM10/10/14
to php...@googlegroups.com
Great!!!

Thanks a lot for now. 

I'm gonig start studying the code now! 

I will post news here the result! 

Thank you for your attention. 

I know you're giving them a lot of work but I believe that in the future this post will be useful to many people because I believe the future is in HTML5!

Marcelo Aguiar

unread,
Oct 11, 2014, 2:56:30 AM10/11/14
to php...@googlegroups.com
UUUhuuuu !!! :) 

Worked !! :) 

Miike.
You saved my job! I am very happy! 

Thank you so much !! 

I'll show you how I did, perhaps because many doubt! 

My project directory source 

C:/my_project/ 
index.php 
getVideo.mp4 
.htaccess 


index.php
<?php
   error_reporting(0);
   session_start();
   $videoFullPath = getcwd() . "\\videos\\my_video.mp4";
   $_SESSION['pathvideo'] = $videoFullPath;
?>

<!DOCTYPE html> 
<html> 
<head>
<script type="text/javascript" src="func.js"></script>
</head>
<body> 
<video  width="400" height="300" autoplay controls>
<source src="getVideo.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
</video>
</body>
</html>


getVideo.mp4
<?php
error_reporting(0);
session_start();
$videoFullPath = $_SESSION['pathvideo'];

header('Content-type: video/mp4');

$fh = fopen($videoFullPath,'rb'); 
fseek($fh, 0);
while (!feof($fh)){
  print(fread($fh, filesize($fh)));
}
fclose($fh);
?>

After compiled by ZZEE ...

My project output directory 

C:/my_software / 
videos 
       my_video.mp4 
Index.exe 


It's work !!! :) 

See I did not need to use the external file "video.dll" because I used SESSION than file_get_contents. 

See also I did not use external plugin: FLASH, JPlayer, JQUERY .... 
Works on own HTML5 <video> tag

I could never imagine that would ZZEE should compile an internal video mp4 and serve it as a bridge to external videos. 

Now, Brazil is 4:00 AM. I'll sleep happy! 
You are a genius! 
I'm going purchase the software! 
Again thank you!

ZZEE Groups

unread,
Oct 11, 2014, 5:52:04 AM10/11/14
to php...@googlegroups.com
Great!
> --
> --
> You received this message because you are subscribed to the Google
> Groups "ZZEE PHPExe" group.
> To post to this group, send email to php...@googlegroups.com
> To unsubscribe from this group, send email to
> phpexe+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phpexe?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "ZZEE PHPExe" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to phpexe+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Regards,
Paul.

Mike:Hewitt

unread,
Oct 11, 2014, 4:30:42 PM10/11/14
to php...@googlegroups.com
Great news, well done! :)

It your app is to be redistributed, then a jplayer fallback might be beneficial for example for XP etc.

--
Reply all
Reply to author
Forward
0 new messages