Giter Site home page Giter Site logo

orangechannel / ocsuite Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 0.0 19 KB

Matroska ordered chapters automation script

Home Page: https://aur.archlinux.org/packages/vapoursynth-tools-ocsuite-git/

License: The Unlicense

Python 100.00%
chapters ordered-chapters mkv audio mkv-container mkv-tricks mkvtoolnix vapoursynth anime encoding

ocsuite's Introduction

ocsuite

Simple script designed to automate most of the Mastroka ordered chapters creation process.

TODO!

from ocsuite import OC

import vapoursynth as vs
core = vs.core

src_clip = core.lsmas.LWLibavSource(r'/path/to/remuxed_BDMV.mkv')
src_audio = r'/path/to/remuxed_BDMV_audio.wav'

chapters = {  # see tests.py for more examples
    '01': {
        'Part A': 0,
        'Part B': 3861,
        'Middle Card': 20884,
        'Part C': (21004, 29696),
        'OP': 30042,
        'Part D': 32201,
        'Preview': (33686, 34045)
    },
    '02': {
        'Part A': 34070,
        'OP': 35748,
        'Part B': 37907,
        'Part C': 51429,
        'ED': 65048,
        'Part D': 67181,
        'Preview': (67733, 68092)
    },
    '03': {
        'Part A': 71578,
        'Part B': 84686,
        'Part C': (90000, 94982)
    }
}

oc = OC(chapters, ['OP', 'ED'])
clips = oc.clips(src_clip)

oc.cut_audio(src_clip, src_audio, r'/path/to/audio_dir/')
oc.write_to_xml(src_clip, r'/path/to/chapter_dir/')
print(oc.suids)

Outputs:

TODO!


Getting Started

Dependencies

Installing

Windows

  1. Navigate to your Python installation folder (i.e. C:\Python\).
  2. Download the ocsuite.py file to the site-packages folder (C:\Python\Lib\site-packages\).

Arch Linux

Install the AUR package vapoursynth-tools-ocsuite-git with your favorite AUR helper:

yay -S vapoursynth-tools-ocsuite-git

Gentoo Linux

Install via the VapourSynth portage tree.


Working with Ordered Chapters

Remuxing the BDMV

ffmpeg -i bluray:BDMV/../ -map 0 -c copy -c:a pcm_s16le volume01.mkv
ffmpeg -i bluray:BDMV/../ -map 0 -c copy -c:a pcm_s16le volume02.mkv
ffmpeg -i bluray:BDMV/../ -map 0 -c copy -c:a pcm_s16le volume03.mkv
ffmpeg -i 00007.m2ts -map 0 -c copy -c:a pcm_s16le OVA.mkv

mkvmerge -o full_remux.mkv volume01.mkv + volume02.mkv + volume03.mkv + OVA.mkv

TODO

Help!

Read the docstrings included in ocsuite.py or use Python's builtin help:

help('ocsuite')

ocsuite's People

Contributors

orangechannel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.