All Projects → tp7 → Sushi

tp7 / Sushi

Licence: mit
Automatic subtitle shifter based on audio

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Sushi

BDMatch
An automatic subtitle shifter from a video to another. 将字幕由一个视频匹配到另一个的自动时间轴平移工具。
Stars: ✭ 44 (-89.19%)
Mutual labels:  audio-analysis, subtitle
Go Astisub
Manipulate subtitles in GO (.srt, .ssa/.ass, .stl, .ttml, .vtt (webvtt), teletext, etc.)
Stars: ✭ 305 (-25.06%)
Mutual labels:  subtitle
HandySub
Download Subtitle from Subscene and other sources
Stars: ✭ 42 (-89.68%)
Mutual labels:  subtitle
meyda-rs
This may become an audio feature extraction library for Rust.
Stars: ✭ 15 (-96.31%)
Mutual labels:  audio-analysis
iptvx
IPTV player and streamer for Linux that allows to play any stream that LibVLC can play, offers an overlay based on WebKit using HTML5, JavaScript and CSS and uses XMLTV data for EPG information. It allows the playback of URLs, files and can grab URLs from shell scripts. XMLTV EPG data can be downloaded from URLs or grabbed from shell scripts.
Stars: ✭ 65 (-84.03%)
Mutual labels:  subtitle
Audio-Classification-using-CNN-MLP
Multi class audio classification using Deep Learning (MLP, CNN): The objective of this project is to build a multi class classifier to identify sound of a bee, cricket or noise.
Stars: ✭ 36 (-91.15%)
Mutual labels:  audio-analysis
MixingBear
Package for automatic beat-mixing of music files in Python 🐻🎚
Stars: ✭ 73 (-82.06%)
Mutual labels:  audio-analysis
Bilili
🍻 bilibili video (including bangumi) and danmaku downloader | B站视频(含番剧)、弹幕下载器
Stars: ✭ 379 (-6.88%)
Mutual labels:  subtitle
Essentia.js
JavaScript library for music/audio analysis and processing powered by Essentia WebAssembly
Stars: ✭ 294 (-27.76%)
Mutual labels:  audio-analysis
deepcurator
A convolutional neural network trained to recognize good* electronic music
Stars: ✭ 38 (-90.66%)
Mutual labels:  audio-analysis
subslider.js
A script to fix out of sync subtitles - in javascript
Stars: ✭ 16 (-96.07%)
Mutual labels:  subtitle
nekocap
Browser extension for creating & uploading community captions for YouTube, niconico and other video sharing sites.
Stars: ✭ 27 (-93.37%)
Mutual labels:  subtitle
beqdesigner
No description or website provided.
Stars: ✭ 15 (-96.31%)
Mutual labels:  audio-analysis
VTT-to-SRT-Converter
Convert WebVTT subtitles to SubRip.
Stars: ✭ 29 (-92.87%)
Mutual labels:  subtitle
Inaspeechsegmenter
CNN-based audio segmentation toolkit. Allows to detect speech, music and speaker gender. Has been designed for large scale gender equality studies based on speech time per gender.
Stars: ✭ 352 (-13.51%)
Mutual labels:  audio-analysis
DumpTS
Extract elementary stream from all kinds of media files, show inside media meta information and reconstruct Transport-Stream, ISOBMFF, Matroska and MMT media files
Stars: ✭ 25 (-93.86%)
Mutual labels:  audio-analysis
chromecast-api
📺 Chromecast Node.js module
Stars: ✭ 122 (-70.02%)
Mutual labels:  subtitle
LycricsTextView
No description or website provided.
Stars: ✭ 14 (-96.56%)
Mutual labels:  subtitle
Netflix To Srt
Rip, extract and convert subtitles to .srt closed captions from .xml/dfxp/ttml and .vtt/WebVTT (e.g. Netflix, YouTube)
Stars: ✭ 387 (-4.91%)
Mutual labels:  subtitle
Ass
A JavaScript ASS subtitle format renderer
Stars: ✭ 356 (-12.53%)
Mutual labels:  subtitle

Sushi Build Status

Automatic shifter for SRT and ASS subtitle based on audio streams.

Purpose

Imagine you've got a subtitle file synced to one video file, but you want to use these subtitles with some other video you've got via totally legal means. The common example is TV vs. BD releases, PAL vs. NTSC video and releases in different countries. In a lot of cases, subtitles won't match right away and you need to sync them.

The purpose of this script is to avoid all the hassle of manual syncing. It attempts to synchronize subtitles by finding similarities in audio streams. The script is very fast and can be used right when you want to watch something.

Downloads

The latest Windows binary release can always be found in the releases section. You need the 7z archive in the top entry.

How it works

You need to provide two audio files and a subtitle file that matches one of those files. For every line of the subtitles, the script will extract corresponding audio from the source audio stream and will try to find the closest similar pattern in the destination audio stream, obtaining a shift value which is later applied to the subtitles.

Detailed explanation of Sushi workflow and description of command-line arguments can be found in the wiki.

Usage

The minimal command line looks like this:

python sushi.py --src hdtv.wav --dst bluray.wav --script subs.ass

Output file name is optional - "{destination_path}.sushi.{subtitles_format}" is used by default. See the usage page of the wiki for further examples.

Do note that WAV is not the only format Sushi can work with. It can process audio/video files directly and decode various audio formats, provided that ffmpeg is available. For additional info refer to the Demuxing part of the wiki.

Requirements

Sushi should work on Windows, Linux and OS X. Please open an issue if it doesn't. To run it, you have to have the following installed:

  1. Python 2.7.x
  2. NumPy (1.8 or newer)
  3. OpenCV 2.4.x or newer (on Windows putting this file in the same folder as Sushi should be enough, assuming you use x86 Python)

Optionally, you might want:

  1. FFmpeg for any kind of demuxing
  2. MkvExtract for faster timecodes extraction when demuxing
  3. SCXvid-standalone if you want Sushi to make keyframes
  4. Colorama to add colors to console output on Windows

The provided Windows binaries include all required components and Colorama so you don't have to install them if you use the binary distribution. You still have to download other applications yourself if you want to use Sushi's demuxing capabilities.

Installation on Mac OS X

No binary packages are provided for OS X right now so you'll have to use the script form. Assuming you have python 2, pip and homebrew installed, run the following:

brew tap homebrew/science
brew install git opencv
pip install numpy
git clone https://github.com/tp7/sushi
# create a symlink if you want to run sushi globally
ln -s `pwd`/sushi/sushi.py /usr/local/bin/sushi
# install some optional dependencies
brew install ffmpeg mkvtoolnix

If you don't have pip, you can install numpy with homebrew, but that will probably add a few more dependencies.

brew tap homebrew/python
brew install numpy

Installation on Linux

If you have apt-get available, the installation process is trivial.

sudo apt-get update
sudo apt-get install git python python-numpy python-opencv
git clone https://github.com/tp7/sushi
ln -s `pwd`/sushi/sushi.py /usr/local/bin/sushi

Limitations

This script will never be able to property handle frame-by-frame typesetting. If underlying video stream changes (e.g. has different telecine pattern), you might get incorrect output.

This script cannot improve bad timing. If original lines are mistimed, they will be mistimed in the output file too.

In short, while this might be safe for immediate viewing, you probably shouldn't use it to blindly shift subtitles for permanent storing.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].