A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
| <?php | |
| # Nginx don't have PATH_INFO | |
| if (!isset($_SERVER['PATH_INFO'])) { | |
| $_SERVER['PATH_INFO'] = substr($_SERVER["ORIG_SCRIPT_FILENAME"], strlen($_SERVER["SCRIPT_FILENAME"])); | |
| } | |
| $request = substr($_SERVER['PATH_INFO'], 1); | |
| $file = $request; | |
| $fp = @fopen($file, 'rb'); |
| <?php | |
| /* | |
| * Remote File Copy PHP Script 2.0.0 | |
| * | |
| * Copyright 2012, Sebastian Tschan | |
| * https://blueimp.net | |
| * | |
| * Licensed under the MIT license: | |
| * http://www.opensource.org/licenses/MIT | |
| */ |
| <?php | |
| /** | |
| * Stream or Download big files using php (support multipart and remote url) | |
| * @param $file is the path or remote url | |
| * @param $size is the filesize of the file | |
| */ | |
| function streamDownload($file,$size,$mime='video/mp4') { | |
| header('Content-type: ' . $mime); | |
| header('Content-Disposition: attachment; filename="' . basename($file) . '"'); |
| <?php | |
| /** | |
| * Get the file size of any remote resource (using get_headers()), | |
| * either in bytes or - default - as human-readable formatted string. | |
| * | |
| * @author Stephan Schmitz <eyecatchup@gmail.com> | |
| * @license MIT <http://eyecatchup.mit-license.org/> | |
| * @url <https://gist.github.com/eyecatchup/f26300ffd7e50a92bc4d> | |
| * | |
| * @param string $url Takes the remote object's URL. |
| #!/usr/bin/php | |
| <?php | |
| /** | |
| * Usage: | |
| * php downloader.php http://path.to/remote/file.ext /local/file/path | |
| * | |
| * Output: | |
| * [############################################################################################### ] 96% | |
| */ |
| <?php | |
| // ---------------------- S C R I P T --------------------------------------- | |
| $chunk_size = $chunk_size_default = 8192 * 1024; // default is 8192 kB | |
| $break_symbol = $break_symbol_default = ";"; // default is semicolon | |
| $filename = ""; | |
| process_params(); | |
| echo "chunk size: " . $chunk_size . " bytes " . ($chunk_size == $chunk_size_default ? "(default)" : "") . "\n"; |
| <?php | |
| /* | |
| * Output buffer for large output to temporary file on disk (>2MB) | |
| * | |
| * @link http://stackoverflow.com/questions/5446647/how-can-i-use-var-dump-output-buffering-without-memory-errors/ | |
| */ | |
| /** | |
| * Iterate over lines of a stream resource. | |
| * |
| <?php | |
| /***************************************** | |
| * App : create / merge file chunks using php | |
| * File : file_chunks.php | |
| * Date : Wed Nov 28 16:40:42 +03 2018 | |
| * Version : 1.0.0 | |
| * Email : yasinkarabulak@gmail.com | |
| * | |
| * MIT License | |
| * Copyright (c) 2018 Yasin KARABULAK |
| <?php | |
| /* | |
| A simple cache for remote files/URLs | |
| 2011 Carlo Alberto Ferraris <cafxx@strayorange.com> | |
| =================================================== | |
| The cache function allows you to get the contents of a remote URL at | |
| most once every N seconds. It also supports the If-Modified-Since HTTP | |
| header to avoid fetching the resource again if it hasn't changed. |