mirror of
https://github.com/danog/magnaluna.git
synced 2024-11-26 11:34:39 +01:00
Fixup readme
This commit is contained in:
parent
538081f6cc
commit
25f83d460a
@ -20,8 +20,8 @@ Don't forget to install the [required dependencies](https://docs.madelineproto.x
|
|||||||
|
|
||||||
## Converting songs
|
## Converting songs
|
||||||
|
|
||||||
In order to play songs, they must be first converted to raw PCM format (support for OGG OPUS files will be added soon):
|
In order to play songs, they must be first converted to the correct format, using the convert.php script:
|
||||||
|
|
||||||
```
|
```
|
||||||
ffmpeg -i anyaudioorvideo.mp3 -f s16le -ac 1 -ar 48000 -acodec pcm_s16le mysong.raw
|
wget https://github.com/danog/magnaluna/raw/master/convert.php && php convert.php in.mp3 out.ogg
|
||||||
```
|
```
|
||||||
|
14
convert.php
Normal file
14
convert.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if (!file_exists('madeline.php')) {
|
||||||
|
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
|
||||||
|
}
|
||||||
|
include 'madeline.php';
|
||||||
|
|
||||||
|
use danog\MadelineProto\LocalFile;
|
||||||
|
|
||||||
|
if ($argc < 3) {
|
||||||
|
die("Usage: {$argv[0]} input output.ogg".PHP_EOL);
|
||||||
|
}
|
||||||
|
|
||||||
|
\danog\MadelineProto\Ogg::convert(new LocalFile($argv[1]), new LocalFile($argv[2]));
|
Loading…
Reference in New Issue
Block a user