Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/php
- <?php include_once('function.php');// Show folder files
- $cmd='echo "hello world 2>&1 1> /dev/null" ';passthru($cmd); ?>
- <div style=" width:650px;">
- <form method="post"><input name="url" size="70" /><br/><input name="submit" type="submit" /></form>
- </div>
- <?php
- $files = array(); $dir = opendir('.');
- while(false != ($file = readdir($dir))) {
- if(($file != ".") and ($file != "..") and ($file != "index.php"))
- { $files[] = $file; } } natsort($files); foreach($files as $file) {
- if ( strpos($file,'.mp4') || strpos($file,'.flv') || strpos($file,'.avi') || strpos($file,'mpg') === true ) //تحقق اد الاتمداد لملفات فيديو فقط
- echo("$file <a href='$file'>.</a><br />\n");}
- function flv_convert($in,$out_vid)
- {$cmd ='/usr/bin/avconv -i '.$in.' -c:v libx264 -preset ultrafast -b:v 230k -bufsize 64k -s 640x360 -an '.$out_vid.' 2>&1 1> /dev/null';
- $res = passthru($cmd);}
- $in = $_POST['url'];
- $out_vid = reset(explode('.',$in)).'O.mp4' ;
- echo $res;
- if ( flv_convert($in, $out_vid) )
- echo 'done ';else echo ' <p>Fail</p> ';
- echo $cmd ;// code provided and updated by steve of phpsnaps ! thanks ?><br/>
- <a href="/H264.php">H264.php</a> |.| <a href="http://0.tld">0.tld</a>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement