Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
| <?php | |
| // src/Acme/ApiBundle/OAuth/SROCGrantType.php | |
| namespace Acme\ApiBundle\OAuth; | |
| use FOS\OAuthServerBundle\Storage\GrantExtensionInterface; | |
| use OAuth2\Model\IOAuth2Client; | |
| /** |
| /** | |
| * @When I scroll :elementId into view | |
| */ | |
| public function scrollIntoView($elementId) { | |
| $function = <<<JS | |
| (function(){ | |
| var elem = document.getElementById("$elementId"); | |
| elem.scrollIntoView(false); | |
| })() | |
| JS; |
| Without manually calling gc_collect_cycles() | |
| ============================================ | |
| Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 139264 bytes) in - on line 27 | |
| GC Statistics | |
| ------------- | |
| Runs: 0 |
As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.
You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :
| <?php | |
| $attributeValues = array( | |
| 'color' => array('Red', 'White', 'Blue'), | |
| 'size' => array(1, 2, 3, 4), | |
| 'fabric' => array('Cloth', 'Silk') | |
| ); | |
| class Cartesian | |
| { |
| <?php | |
| /** | |
| * This class can add WSSecurity authentication support to SOAP clients | |
| * implemented with the PHP 5 SOAP extension. | |
| * | |
| * It extends the PHP 5 SOAP client support to add the necessary XML tags to | |
| * the SOAP client requests in order to authenticate on behalf of a given | |
| * user with a given password. | |
| * |
| import javax.jcr.Credentials; | |
| import javax.jcr.Node; | |
| import javax.jcr.Repository; | |
| import javax.jcr.RepositoryException; | |
| import javax.jcr.Session; | |
| import javax.jcr.Workspace; | |
| import javax.jcr.SimpleCredentials; | |
| import javax.jcr.version.*; | |
| import ch.liip.jcr.davex.DavexClient; |