You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
<?php
|
|
$flacs = shell_exec('find "$(pwd)" -type f -name "*.flac"');
|
|
$flacs_ex = preg_split("/\\r\\n|\\r|\\n/", $flacs);
|
|
$flacs_total = sizeof($flacs_ex);
|
|
$playlist = 'playlist.txt';
|
|
|
|
for($i = 0; $i < $flacs_total - 1; $i++){
|
|
|
|
$flac = $flacs_ex[$i];
|
|
$ogg = str_replace('.flac', '.ogg', $flac);
|
|
|
|
# Generating the list
|
|
file_put_contents($playlist, $ogg . PHP_EOL, FILE_APPEND | LOCK_EX);
|
|
# The conversion command
|
|
shell_exec('ffmpeg -i "' . $flac . '" "' . $ogg . '"');
|
|
}
|
|
?>
|