项目作者: OrangeChannel

项目描述 :
Mastroka ordered chapters automation script
高级语言: Python
项目地址: git://github.com/OrangeChannel/ocsuite.git
创建时间: 2020-03-17T11:08:18Z
项目社区:https://github.com/OrangeChannel/ocsuite

开源协议:The Unlicense

下载


ocsuite

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

TODO!

  1. from ocsuite import OC
  2. import vapoursynth as vs
  3. core = vs.core
  4. src_clip = core.lsmas.LWLibavSource(r'/path/to/remuxed_BDMV.mkv')
  5. src_audio = r'/path/to/remuxed_BDMV_audio.wav'
  6. chapters = { # see tests.py for more examples
  7. '01': {
  8. 'Part A': 0,
  9. 'Part B': 3861,
  10. 'Middle Card': 20884,
  11. 'Part C': (21004, 29696),
  12. 'OP': 30042,
  13. 'Part D': 32201,
  14. 'Preview': (33686, 34045)
  15. },
  16. '02': {
  17. 'Part A': 34070,
  18. 'OP': 35748,
  19. 'Part B': 37907,
  20. 'Part C': 51429,
  21. 'ED': 65048,
  22. 'Part D': 67181,
  23. 'Preview': (67733, 68092)
  24. },
  25. '03': {
  26. 'Part A': 71578,
  27. 'Part B': 84686,
  28. 'Part C': (90000, 94982)
  29. }
  30. }
  31. oc = OC(chapters, ['OP', 'ED'])
  32. clips = oc.clips(src_clip)
  33. oc.cut_audio(src_clip, src_audio, r'/path/to/audio_dir/')
  34. oc.write_to_xml(src_clip, r'/path/to/chapter_dir/')
  35. 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:

  1. yay -S vapoursynth-tools-ocsuite-git

Gentoo Linux

Install via the VapourSynth portage tree.


Working with Ordered Chapters

Remuxing the BDMV

  1. ffmpeg -i bluray:BDMV/../ -map 0 -c copy -c:a pcm_s16le volume01.mkv
  2. ffmpeg -i bluray:BDMV/../ -map 0 -c copy -c:a pcm_s16le volume02.mkv
  3. ffmpeg -i bluray:BDMV/../ -map 0 -c copy -c:a pcm_s16le volume03.mkv
  4. ffmpeg -i 00007.m2ts -map 0 -c copy -c:a pcm_s16le OVA.mkv
  5. 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:

  1. help('ocsuite')