Avi to WebM convert


This script converts all avi files (readable by ffmpeg) in the current directory to VP8/Vorbis videos, also known as WebM.

Requirements



Tested on Linux.

The script (version 1.0.3)


ckallavi2webm.php (line 1)
  1. #!/usr/bin/php -q
  2.  
  3. <?php
  4.  
  5. /*
  6.         CkAllAvi2Webm - convert all avi files to webm using ffmpeg
  7.         Copyright (C) 2011 Ɓukasz "Cyber Killer" Korpalski
  8.  
  9.         This program is free software: you can redistribute it and/or modify
  10.         it under the terms of the GNU General Public License as published by
  11.         the Free Software Foundation, either version 3 of the License, or
  12.         (at your option) any later version.
  13.  
  14.         This program is distributed in the hope that it will be useful,
  15.         but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.         GNU General Public License for more details.
  18.  
  19.         You should have received a copy of the GNU General Public License
  20.         along with this program.  If not, see <http://www.gnu.org/licenses/>.
  21. */
  22.  
  23. system('ls -1 ./*.[a,A][v,V][i,I] > /tmp/list-ckallavi2webm.txt');
  24. $names = file('/tmp/list-ckallavi2webm.txt');
  25. system('rm /tmp/list-ckallavi2webm.txt');
  26.  
  27. foreach($names as $name)
  28. {
  29.         system('ffmpeg -i "' . rtrim($name) . '" -threads 2 "' . substr(rtrim($name),0,-4) . '.webm"');
  30. }
  31.  
  32. ?>


Just click grab to save the file, or copy&paste it yourself to your favorite editor. Remember to add executable permissions.

License


This program is under the GNU GPL v3 or later.


 
CategoryProjekty

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki