Play mp4 video in php desktop

754 views
Skip to first unread message

Ragu Nathan

unread,
Nov 30, 2015, 1:45:50 AM11/30/15
to PHP Desktop
I need to play mp4 video in php desktop.

I have tried following code and it's not working.

<video width="400" controls>
 
<source src="abc.mp4" type="video/mp4">
</video>

But it's working fine with webm format video. Following code working fine.

<video width="400" controls>
 
<source src="/abc.webm" type="video/webm4">
</video>

I have added "enable-media-stream": "" also in settings.json.




Czarek Tomczak

unread,
Nov 30, 2015, 5:18:45 AM11/30/15
to phpde...@googlegroups.com
PHP Desktop Chrome does not support commercial codecs like mp4. Such support requires license fees.

--
You received this message because you are subscribed to the Google Groups "PHP Desktop" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phpdesktop+...@googlegroups.com.
Visit this group at http://groups.google.com/group/phpdesktop.
To view this discussion on the web visit https://groups.google.com/d/msgid/phpdesktop/a5d35474-1617-4ec9-bdc1-4e37dab15408%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ragu Nathan

unread,
Dec 10, 2015, 12:02:00 AM12/10/15
to PHP Desktop
Can you please explain. I need to play any video format in PHP desktop. Is it possible?

Czarek Tomczak

unread,
Dec 10, 2015, 12:48:26 AM12/10/15
to phpde...@googlegroups.com

You could build CEF/Chromium/PHPDesktop from sources with added mp4 support but this is not trivial.

Sam Cohen

unread,
Jan 18, 2022, 11:50:24 PMJan 18
to PHP Desktop
Couldn't we use  Download FFmpeg
and then:

<?php 
 echo "Starting ffmpeg...\n\n";
 echo shell_exec("ffmpeg -i input.avi output.webm&"); echo "Done.\n"; ?>
Message has been deleted

Sam Cohen

unread,
Jan 21, 2022, 2:08:00 AMJan 21
to PHP Desktop
FOUND a workaround!!
Execute and use the regular chrome browser in --app mode  as an pop-out for playing mp4 and mp3!

<a href="?url=http://127.0.0.1:8888"> Go to your phpdesktop location </a>
<?php
if(isset($_REQUEST['url'])):

//Some flags to add to chrome.exe if desired
    // –disable-sync
    // –ash-enable-night-light
    // –allow-outdated-plugins
    // –incognito
    // –disable-background-mode
    // –disable-translate
    // –purge-memory-button
    // –start-maximized
    // –disable-gpu
    // –disable-plugins
    // –dns-prefetch-disable
    //--repl --crash-dumps-dir=./tmp

$cmd=sprintf( '"C:\Program Files\Google\Chrome\Application\chrome.exe" –disable-plugins --disable-gpu –disable-background-mode –incognito -window-size=1280,780 --app=%s', $_REQUEST['url'] );
exec( $cmd );

endif;
?>
Reply all
Reply to author
Forward
0 new messages