An open API service indexing awesome lists of open source software.

https://github.com/rakambdaorg/mediaconverter

Create scripts to convert videos to h265 using ffmpeg
https://github.com/rakambdaorg/mediaconverter

batch converter ffmpeg h265 ps1

Last synced: 6 months ago
JSON representation

Create scripts to convert videos to h265 using ffmpeg

Awesome Lists containing this project

README

          

= MediaConverter

Convert in batches some formats into another.

== CLI arguments

[cols="3,1,3"]
|===
|Flag |Mandatory / Optional |Description

|-c
|O
|Path to the configuration file.
Default is `./config.json`.

|-t
|O
|How may conversions are performed in parallel

|-ft
|O
|FFMPEG threads (-threads option)

|--ffprobe
|O
|Path to ffprobe

|--ffmpeg
|O
|Path to ffmpeg
|===

== Configuration file

Configuration is now declared in a json file with the following format:

[source,json]
----
{
"conversions": [
{
"input": "/path/to/input",
"output": "/path/to/output",
"database": "/path/to/database.db",
"temp": "/path/to/temp",
"deleteInput": false,
"excluded": [
"subfolder/to/exclude",
"another/too"
],
"processors": [
"VIDEO_HEVC_MKV",
"AUDIO"
],
"extensions": [
"mp4",
"mts",
"mp3"
],
"filters": [
{"name": "LengthMoreThan", "value": 50}
]
}
]
}
----

[cols="3,1,3a"]
|===
|Key |Mandatory / Optional |Description

|conversions
|O
|List of conversions to perform

|conversions.input
|M
|Path to the input folder.

WARNING: This folder is scanned recursively

|conversions.output
|M
|Path to the output folder.

Structure will be kept the same as the input folder.

|conversions.database
|O
|Path to a database file that will keep scan results between executions.
This is useful if input folder is large and converted files never move.

|conversions.temp
|O
|Path to a directory where temporary files (conversions in progress) will be placed

|conversions.deleteInput
|O
|Delete input file on success or not (default true)

|conversions.excluded
|O
|List of relative paths to be excluded from the conversion.

|conversion.processors
|O
|List of processors to apply.
If left empty, all of them will be applied.

- VIDEO_HEVC_MKV
- VIDEO_AV1
- AUDIO
- TIFF

|conversion.extensions
|O
|List of file extensions to process.
If left empty the default one is used.

|conversion.filters
|O
|List of filters to apply after scanning files.
Can be one of :

- LengthMoreThan (`value` : seconds)
- LengthLessThan (`value` : seconds)
|===

=== Processors

- VIDEO_TO_HEVC_MKV: `H264`, `VP9`, `WV3`, `MPEG2VIDEO` -> `HEVC` + `AAC` in a `MKV` container
- VIDEO_TO_HEVC_MP4: `H264`, `VP9`, `WV3`, `MPEG2VIDEO` -> `HEVC` + `AAC` in a `MP4` container
- VIDEO_TO_AV1: `H264`, `HEVC`, `VP9`, `WV3`, `MPEG2VIDEO` -> `AV1` + `OPUS`
- MP3_TO_AAC: `MP3` -> `AAC`
- AUDIO_TO_OPUS: `MP3`, `AAC` -> `OPUS`
- TIFF_TO_JPG: `TIFF` -> `JPEG`
- PHOTO_TO_AVIF: `JPEG` -> `AVIF`
- PHOTO_TO_JXL: `JPEG` -> `JXL`