1
0
mirror of https://github.com/danog/magnaluna.git synced 2024-11-26 11:34:39 +01:00

Fixup readme

This commit is contained in:
Daniil Gentili 2023-08-14 21:22:49 +02:00
parent 538081f6cc
commit 25f83d460a
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 16 additions and 2 deletions

View File

@ -20,8 +20,8 @@ Don't forget to install the [required dependencies](https://docs.madelineproto.x
## 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
View 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]));