sushi-batch


Namesushi-batch JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/C1fer/sushi-batch
SummaryBatch Subtitle Synchronization Tool
upload_time2023-10-22 16:00:16
maintainer
docs_urlNone
authorC1fer
requires_python>=3.10,<4.0
licenseMIT
keywords subtitle sync
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Sushi Batch
Batch subtitle synchronization tool based on [FichteFoll](https://github.com/FichteFoll/Sushi)'s fork of [Sushi](https://github.com/tp7/Sushi).

### WARNING
**Sushi is not perfect, an can output subtitles with broken timings.** **You should check if the subtitle was synced correctly on completed tasks with high shift average (10s or greater).**

## Installation

`pip install sushi-batch`

### Required apps
* [FFmpeg](https://ffmpeg.org/download.html)
* [mkvmerge from MKVToolNix](https://mkvtoolnix.download/downloads.html) (Optional)
  
### Windows
Add the required binaries to PATH or install them via a package manager like [Chocolatey](https://chocolatey.org/). You can also copy the executables to the directory from which you run this app (not recommended).

### Linux
Most distros link installed packages to PATH automatically, so just make sure to install the required apps via your distribution's package manager.

## How does Sushi work?
Sushi works by finding the closest similar pattern between a provided source and destination audio track. The obtained shift value is applied to the output subtitle, which will be synced to the destination track.

### Audio-based Sync
You must provide:
* A subtitle file (ASS, SRT, SSA).
* The original audio track for that subtitle.
* A destination audio track to sync the subtitle to.

### Video-based Sync
You only need to provide:
* A source video file which contains a subtitle.
* A destination video file. 

You can select a specific subtitle or audio track from the video files. This allows you to add multi-language subtitles for a specific audio track.

FFmpeg will take care of extracting the audio and subtitle tracks for processing. 

## Usage
This program allows for:
* Batch synchronization of files within selected directories / selected files.
* Queueing of synchronization tasks
* Merging synced subtitles with destination video (more below)

### Folder Structures for Directory Select modes
#### Audio-Sync
<pre>
  <code>
    📂Source Folder
     ┣ 🔊Fullmetal Alchemist - 01 (DVD).flac
     ┣ 📜Fullmetal Alchemist - 01 (DVD).ass
     ┣ 🔊Fullmetal Alchemist - 02 (DVD).flac
     ┣ 📜Fullmetal Alchemist - 02 (DVD).ass
     ┣ 🔊Fullmetal Alchemist - 03 (DVD).flac
     ┗ 📜Fullmetal Alchemist - 03 (DVD).ass
    📂Destination Folder
     ┣ 🔊Fullmetal Alchemist - 01 (BD).flac
     ┣ 🔊Fullmetal Alchemist - 02 (BD).flac
     ┗ 🔊Fullmetal Alchemist - 03 (BD).flac
  </code>
</pre>

#### Video-Sync
<pre>
  <code>
    📂Source Folder
     ┣ 📺Fullmetal Alchemist - 01 (DVD).mkv
     ┣ 📺Fullmetal Alchemist - 02 (DVD).mkv
     ┗ 📺Fullmetal Alchemist - 03 (DVD).mkv
    📂Destination Folder
     ┣ 📺Fullmetal Alchemist - 01 (BD).flac
     ┣ 📺Fullmetal Alchemist - 02 (BD).mkv
     ┗ 📺Fullmetal Alchemist - 03 (BD).mkv
  </code>
</pre>

## Merge synced subs with video
If mkvmerge is installed, the app will automatically merge the synced subtitle to the specified destination video file. The merge can also be started manually inside the *Job Queue* section.

You can customize the arguments used for merging via the app's settings.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/C1fer/sushi-batch",
    "name": "sushi-batch",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "subtitle,sync",
    "author": "C1fer",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/0d/21/5dc051d721f6502ea96b6be7e95dffdeac84ad5d2a66df88830fd67517f8/sushi_batch-0.1.0.tar.gz",
    "platform": null,
    "description": "# Sushi Batch\nBatch subtitle synchronization tool based on [FichteFoll](https://github.com/FichteFoll/Sushi)'s fork of [Sushi](https://github.com/tp7/Sushi).\n\n### WARNING\n**Sushi is not perfect, an can output subtitles with broken timings.** **You should check if the subtitle was synced correctly on completed tasks with high shift average (10s or greater).**\n\n## Installation\n\n`pip install sushi-batch`\n\n### Required apps\n* [FFmpeg](https://ffmpeg.org/download.html)\n* [mkvmerge from MKVToolNix](https://mkvtoolnix.download/downloads.html) (Optional)\n  \n### Windows\nAdd the required binaries to PATH or install them via a package manager like [Chocolatey](https://chocolatey.org/). You can also copy the executables to the directory from which you run this app (not recommended).\n\n### Linux\nMost distros link installed packages to PATH automatically, so just make sure to install the required apps via your distribution's package manager.\n\n## How does Sushi work?\nSushi works by finding the closest similar pattern between a provided source and destination audio track. The obtained shift value is applied to the output subtitle, which will be synced to the destination track.\n\n### Audio-based Sync\nYou must provide:\n* A subtitle file (ASS, SRT, SSA).\n* The original audio track for that subtitle.\n* A destination audio track to sync the subtitle to.\n\n### Video-based Sync\nYou only need to provide:\n* A source video file which contains a subtitle.\n* A destination video file. \n\nYou can select a specific subtitle or audio track from the video files. This allows you to add multi-language subtitles for a specific audio track.\n\nFFmpeg will take care of extracting the audio and subtitle tracks for processing. \n\n## Usage\nThis program allows for:\n* Batch synchronization of files within selected directories / selected files.\n* Queueing of synchronization tasks\n* Merging synced subtitles with destination video (more below)\n\n### Folder Structures for Directory Select modes\n#### Audio-Sync\n<pre>\n  <code>\n    \ud83d\udcc2Source Folder\n     \u2523 \ud83d\udd0aFullmetal Alchemist - 01 (DVD).flac\n     \u2523 \ud83d\udcdcFullmetal Alchemist - 01 (DVD).ass\n     \u2523 \ud83d\udd0aFullmetal Alchemist - 02 (DVD).flac\n     \u2523 \ud83d\udcdcFullmetal Alchemist - 02 (DVD).ass\n     \u2523 \ud83d\udd0aFullmetal Alchemist - 03 (DVD).flac\n     \u2517 \ud83d\udcdcFullmetal Alchemist - 03 (DVD).ass\n    \ud83d\udcc2Destination Folder\n     \u2523 \ud83d\udd0aFullmetal Alchemist - 01 (BD).flac\n     \u2523 \ud83d\udd0aFullmetal Alchemist - 02 (BD).flac\n     \u2517 \ud83d\udd0aFullmetal Alchemist - 03 (BD).flac\n  </code>\n</pre>\n\n#### Video-Sync\n<pre>\n  <code>\n    \ud83d\udcc2Source Folder\n     \u2523 \ud83d\udcfaFullmetal Alchemist - 01 (DVD).mkv\n     \u2523 \ud83d\udcfaFullmetal Alchemist - 02 (DVD).mkv\n     \u2517 \ud83d\udcfaFullmetal Alchemist - 03 (DVD).mkv\n    \ud83d\udcc2Destination Folder\n     \u2523 \ud83d\udcfaFullmetal Alchemist - 01 (BD).flac\n     \u2523 \ud83d\udcfaFullmetal Alchemist - 02 (BD).mkv\n     \u2517 \ud83d\udcfaFullmetal Alchemist - 03 (BD).mkv\n  </code>\n</pre>\n\n## Merge synced subs with video\nIf mkvmerge is installed, the app will automatically merge the synced subtitle to the specified destination video file. The merge can also be started manually inside the *Job Queue* section.\n\nYou can customize the arguments used for merging via the app's settings.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Batch Subtitle Synchronization Tool",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/C1fer/sushi-batch",
        "Repository": "https://github.com/C1fer/sushi-batch"
    },
    "split_keywords": [
        "subtitle",
        "sync"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dfa5c0b027629553eef9cc4d99f6cc8f40d7421d2ef5bc1a7d9b9f013e5a0c1a",
                "md5": "a2e92743a4633c0fb482e69b0bdd4de6",
                "sha256": "5a1e05e06d77eef4057c0f7e06716d607d312f0f2a4b11d1059c436b862bb0c0"
            },
            "downloads": -1,
            "filename": "sushi_batch-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a2e92743a4633c0fb482e69b0bdd4de6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 20608,
            "upload_time": "2023-10-22T16:00:14",
            "upload_time_iso_8601": "2023-10-22T16:00:14.374414Z",
            "url": "https://files.pythonhosted.org/packages/df/a5/c0b027629553eef9cc4d99f6cc8f40d7421d2ef5bc1a7d9b9f013e5a0c1a/sushi_batch-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d215dc051d721f6502ea96b6be7e95dffdeac84ad5d2a66df88830fd67517f8",
                "md5": "d57ef81910810590113de80b1014979b",
                "sha256": "f248412ffcc69bcc9542acb7539b7547db6a8984506dafb2128afe567a6612b6"
            },
            "downloads": -1,
            "filename": "sushi_batch-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d57ef81910810590113de80b1014979b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 16906,
            "upload_time": "2023-10-22T16:00:16",
            "upload_time_iso_8601": "2023-10-22T16:00:16.360147Z",
            "url": "https://files.pythonhosted.org/packages/0d/21/5dc051d721f6502ea96b6be7e95dffdeac84ad5d2a66df88830fd67517f8/sushi_batch-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-22 16:00:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "C1fer",
    "github_project": "sushi-batch",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "sushi-batch"
}
        
Elapsed time: 0.12539s