mirror of
https://github.com/WonderfulToolchain/psxavenc.git
synced 2025-12-17 11:30:26 +00:00
Fix compile errors and warnings, update readme
This commit is contained in:
68
README.md
68
README.md
@@ -1,6 +1,22 @@
|
||||
|
||||
# psxavenc
|
||||
|
||||
psxavenc is an open-source command-line tool allowing for the encoding of PS1-format audio and video data.
|
||||
psxavenc is an open-source command-line tool for encoding audio and video data
|
||||
into formats commonly used on the original PlayStation.
|
||||
|
||||
## Installation
|
||||
|
||||
Requirements:
|
||||
|
||||
- a recent version of FFmpeg libraries (`libavformat`, `libavcodec`,
|
||||
`libavutil`, `libswresample`, `libswscale`);
|
||||
- a recent version of Meson.
|
||||
|
||||
```shell
|
||||
$ meson setup build
|
||||
$ cd build
|
||||
$ ninja install
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -8,21 +24,49 @@ Run `psxavenc`.
|
||||
|
||||
### Examples
|
||||
|
||||
Converting a sound file to a 22050Hz SPU sample:
|
||||
Rescale a video file to ≤320x240 pixels (preserving aspect ratio) and encode it
|
||||
into a 15fps .STR file with 37800 Hz 4-bit stereo audio and 2352-byte sectors,
|
||||
meant to be played at 2x CD-ROM speed:
|
||||
|
||||
```shell
|
||||
$ psxavenc -f 22050 -t spu -c 1 -b 4 sound_file.ogg sound_file.snd
|
||||
$ psxavenc -t str2cd -f 37800 -b 4 -c 2 -s 320x240 -r 15 -x 2 in.mp4 out.str
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
Requirements:
|
||||
|
||||
* a recent version of FFmpeg,
|
||||
* a recent version of Meson.
|
||||
Convert a mono audio sample to 22050 Hz raw SPU-ADPCM data:
|
||||
|
||||
```shell
|
||||
$ meson setup build
|
||||
$ cd build
|
||||
$ ninja install
|
||||
$ psxavenc -t spu -f 22050 in.ogg out.snd
|
||||
```
|
||||
|
||||
Convert a stereo audio file to a 44100 Hz interleaved .VAG file with 8192-byte
|
||||
interleave and loop flags set at the end of each interleaved chunk:
|
||||
|
||||
```shell
|
||||
$ psxavenc -t vagi -f 44100 -c 2 -L -i 8192 in.wav out.vag
|
||||
```
|
||||
|
||||
## Supported formats
|
||||
|
||||
| Format | Audio | Channels | Video | Sector size |
|
||||
| :------- | :--------------- | :------- | :---- | :---------- |
|
||||
| `xa` | XA-ADPCM | 1 or 2 | None | 2336 bytes |
|
||||
| `xacd` | XA-ADPCM | 1 or 2 | None | 2352 bytes |
|
||||
| `spu` | SPU-ADPCM | 1 | None | |
|
||||
| `spui` | SPU-ADPCM | Any | None | Any |
|
||||
| `vag` | SPU-ADPCM | 1 | None | |
|
||||
| `vagi` | SPU-ADPCM | Any | None | Any |
|
||||
| `str2` | None or XA-ADPCM | 1 or 2 | BS v2 | 2336 bytes |
|
||||
| `str2cd` | None or XA-ADPCM | 1 or 2 | BS v2 | 2352 bytes |
|
||||
| `sbs2` | None | | BS v2 | Any |
|
||||
|
||||
Notes:
|
||||
|
||||
- `vag` and `vagi` are similar to `spu` and `spui` respectively, but add a .VAG
|
||||
header at the beginning of the file. The header is always 48 bytes long for
|
||||
`vag` files, while in the case of `vagi` files it is padded to the size
|
||||
specified using the `-a` option (2048 bytes by default). Note that `vagi`
|
||||
files with more than 2 channels and/or alignment other than 2048 bytes are not
|
||||
standardized.
|
||||
- The `sbs2` format (used in some System 573 games) is simply a series of
|
||||
concatenated BS v2 frames, each padded to the size specified by the `-a`
|
||||
option, with no additional headers besides the BS frame headers.
|
||||
|
||||
Reference in New Issue
Block a user