Giter Site home page Giter Site logo

pt-muxer's Introduction

pt-muxer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pt-muxer's Issues

Support Delayed Tracks

Kino Lorber BD; Not sure how this would be done

Get a full bdinfo log, look at the Files section, run mediainfo on the first M2TS file. If the file has a video track, but no audio, then other audio, subtitles, and chapters need to be delayed by length of the file.

Use the length property from mediainfo and add delay to eac3to demux command

from datetime import datetime
# for example, first_file["length"] = '0:00:11.010'
length = datetime.strptime(first_file["length"], "%H:%M:%S.%f")
delay = int(length.second * 1000 + (length.microsecond / 1000))
# track_delay = "+11010ms"
track_delay = "+{}ms".format(delay)

Then demux, assume audio track is track 2, and needs a delay of 11010ms.

eac3to 1) 2:audio.dtsma +11010ms

Add Docstrings

Update all function and class with docstrings

  • app.py
  • config.py
  • src/args.py
  • src/demux/action.py
  • src/demux/base.py
  • src/demux/demuxMovies.py
  • src/demux/demuxTV.py
  • src/mediadata/movieData.py
  • src/mediadata/sourceData.py
  • src/mediadata/trackObj.py
  • src/mediatools/bdinfo.py
  • src/mediatools/chapters.py
  • src/mediatools/dgdemux.py
  • src/mediatools/eac3to.py
  • src/mediatools/mkvtoolnix.py
  • src/remux/action.py
  • src/remux/base.py
  • src/remux/remuxMovies.py
  • src/remux/remuxTV.py
  • src/sites/animebytes/siteMuxData.py
  • src/sites/animebytes/siteSourceData.py
  • src/sites/animebytes/siteTrackSorter.py
  • src/sites/base/siteMuxData.py
  • src/sites/base/siteSourceData.py
  • src/sites/base/siteTrackSorter.py
  • src/sites/beyondHD/siteMuxData.py
  • src/sites/beyondHD/siteSourceData.py
  • src/sites/beyondHD/siteTrackSorter.py
  • src/sites/blu/siteMuxData.py
  • src/sites/blu/siteSourceData.py
  • src/sites/blu/siteTrackSorter.py
  • src/sites/pickers/siteMuxPicker.py
  • src/sites/pickers/siteSortPicker.py
  • src/sites/pickers/siteSourcePicker.py
  • src/subtitles/image.py
  • src/subtitles/nativeimage.py
  • src/subtitles/ocr.py
  • src/subtitles/subreader.py
  • src/tools/commands.py
  • src/tools/directory.py
  • src/tools/exit.py
  • src/tools/general.py
  • src/tools/install.py
  • src/tools/logger.py
  • src/tools/paths.py
  • src/transcription/transcriper.py
  • src/transcription/voiceRecord.py

Installation Fails

(env) USERNAME@PC:/mnt/c/Users/USERNAME/Documents/GitHub/PT-Muxer$ pip3 install -r requirements.txt
ERROR: Exception:
Traceback (most recent call last):
  File "/mnt/c/Users/USERNAME/Documents/GitHub/PT-Muxer/env/lib/python3.10/site-packages/pip/_vendor/packaging/markers.py", line 278, in __init__
    self._markers = _coerce_parse_result(MARKER.parseString(marker))
  File "/mnt/c/Users/USERNAME/Documents/GitHub/PT-Muxer/env/lib/python3.10/site-packages/pip/_vendor/pyparsing/core.py", line 1134, in parse_string
    raise exc.with_traceback(None)
pip._vendor.pyparsing.exceptions.ParseException: Expected {Group:({'implementation_version' | 'platform_python_implementation' | 'implementation_name' | 'python_full_version' | 'platform_release' | 'platform_version' | 'platform_machine' | 'platform_system' | 'python_version' | 'sys_platform' | 'os_name' | 'os.name' | 'sys.platform' | 'platform.version' | 'platform.machine' | 'platform.python_implementation' | 'python_implementation' | 'extra'} | {string enclosed in "'" | string enclosed in '"'}} {'===' | '==' | '>=' | '<=' | '!=' | '~=' | '>' | '<' | 'not in' | 'in'} {{'implementation_version' | 'platform_python_implementation' | 'implementation_name' | 'python_full_version' | 'platform_release' | 'platform_version' | 'platform_machine' | 'platform_system' | 'python_version' | 'sys_platform' | 'os_name' | 'os.name' | 'sys.platform' | 'platform.version' | 'platform.machine' | 'platform.python_implementation' | 'python_implementation' | 'extra'} | {string enclosed in "'" | string enclosed in '"'}) | Group:({{Suppress:('(') : ...} Suppress:(')')})}, found 'pytho'  (at char 0), (line:1, col:1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/c/Users/USERNAME/Documents/GitHub/PT-Muxer/env/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 165, in exc_logging_wrapper
    status = run_func(*args)
  File "/mnt/c/Users/USERNAME/Documents/GitHub/PT-Muxer/env/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "/mnt/c/Users/USERNAME/Documents/GitHub/PT-Muxer/env/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 305, in run
    reqs = self.get_requirements(args, options, finder, session)
  File "/mnt/c/Users/USERNAME/Documents/GitHub/PT-Muxer/env/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 439, in get_requirements
    req_to_add = install_req_from_parsed_requirement(
  File "/mnt/c/Users/USERNAME/Documents/GitHub/PT-Muxer/env/lib/python3.10/site-packages/pip/_internal/req/constructors.py", line 463, in install_req_from_parsed_requirement
    req = install_req_from_line(
  File "/mnt/c/Users/USERNAME/Documents/GitHub/PT-Muxer/env/lib/python3.10/site-packages/pip/_internal/req/constructors.py", line 390, in install_req_from_line
    parts = parse_req_from_line(name, line_source)
  File "/mnt/c/Users/USERNAME/Documents/GitHub/PT-Muxer/env/lib/python3.10/site-packages/pip/_internal/req/constructors.py", line 295, in parse_req_from_line
    markers = Marker(markers_as_string)
  File "/mnt/c/Users/USERNAME/Documents/GitHub/PT-Muxer/env/lib/python3.10/site-packages/pip/_vendor/packaging/markers.py", line 280, in __init__
    raise InvalidMarker(
pip._vendor.packaging.markers.InvalidMarker: Invalid marker: 'pytho', parse error at 'pytho'

chapters

Look into chapterdb or other sources for chapter names

installation&demux fails

    ERROR: Command errored out with exit status 1:
     command: 'C:\PT-Muxer\env\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administator\\AppData\\Local\\Temp\\pip-install-q0wzclsb\\hunspell_45122889f86c4c3db671a46137b41c84\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administator\\AppData\\Local\\Temp\\pip-install-q0wzclsb\\hunspell_45122889f86c4c3db671a46137b41c84\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Administator\AppData\Local\Temp\pip-record-713b3uia\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\PT-Muxer\env\include\site\python3.8\hunspell'
         cwd: C:\Users\Administator\AppData\Local\Temp\pip-install-q0wzclsb\hunspell_45122889f86c4c3db671a46137b41c84\
    Complete output (7 lines):
    running install
    C:\PT-Muxer\env\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running build
    running build_ext
    building 'hunspell' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\PT-Muxer\env\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administator\\AppData\\Local\\Temp\\pip-install-q0wzclsb\\hunspell_45122889f86c4c3db671a46137b41c84\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administator\\AppData\\Local\\Temp\\pip-install-q0wzclsb\\hunspell_45122889f86c4c3db671a46137b41c84\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Administator\AppData\Local\Temp\pip-record-713b3uia\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\PT-Muxer\env\include\site\python3.8\hunspell' Check the logs for full command output.
WARNING: You are using pip version 21.1.1; however, version 22.3.1 is available.
You should consider upgrading via the 'C:\PT-Muxer\env\Scripts\python.exe -m pip install --upgrade pip' command.

tmp folder runs out of space

Depending on your OS and permission you may not be able to use the default temp folder
Or it may not have enough space

This setting can be change in config.py
tempFolder=tempfile.gettempdir()

Just change tempfile.gettempdir() to the directory you want to use

This is very important on seedboxes since you probably don't have access to the system temp folder.
or in some causes your partitions may be setup with very limited space for the temp folder

Bdinfo errors are ignored

When bdinfo returns an error (mono installation is missing some required dependencies for examples), the scripts do not handle them. It fails after that because no playlist were detected.

DVD

add some support for dvds

Add information about accepted data types for functions

  • app.py
  • config.py
  • src/args.py
  • src/demux/action.py
  • src/demux/base.py
  • src/demux/demuxMovies.py
  • src/demux/demuxTV.py
  • src/mediadata/movieData.py
  • src/mediadata/sourceData.py
  • src/mediadata/trackObj.py
  • src/mediatools/bdinfo.py
  • src/mediatools/chapters.py
  • src/mediatools/dgdemux.py
  • src/mediatools/eac3to.py
  • src/mediatools/mkvtoolnix.py
  • src/remux/action.py
  • src/remux/base.py
  • src/remux/remuxMovies.py
  • src/remux/remuxTV.py
  • src/sites/animebytes/siteMuxData.py
  • src/sites/animebytes/siteSourceData.py
  • src/sites/animebytes/siteTrackSorter.py
  • src/sites/base/siteMuxData.py
  • src/sites/base/siteSourceData.py
  • src/sites/base/siteTrackSorter.py
  • src/sites/beyondHD/siteMuxData.py
  • src/sites/beyondHD/siteSourceData.py
  • src/sites/beyondHD/siteTrackSorter.py
  • src/sites/blu/siteMuxData.py
  • src/sites/blu/siteSourceData.py
  • src/sites/blu/siteTrackSorter.py
  • src/sites/pickers/siteMuxPicker.py
  • src/sites/pickers/siteSortPicker.py
  • src/sites/pickers/siteSourcePicker.py
  • src/subtitles/image.py
  • src/subtitles/nativeimage.py
  • src/subtitles/ocr.py
  • src/subtitles/subreader.py
  • src/tools/commands.py
  • src/tools/directory.py
  • src/tools/exit.py
  • src/tools/general.py
  • src/tools/install.py
  • src/tools/logger.py
  • src/tools/paths.py
  • src/transcription/transcriper.py
  • src/transcription/voiceRecord.py

Couldn't demux in Linux seedbox without root

I couldn't demux movies on my seedbox, it requires wine to run eac3to, but I only can access it through SSH and wine seems to try to open a window display.
I've been looking for a solution to this problem, but not with eac3to, instead I've found DGDemux for linux, and it works perfectly.
Would it be possible to turn PTMuxer a seedbox friendly by replacing eac3to with wine for dgdemux for linux?

You can find it here.

Thank you very much.

Feature Request: WEB UI

Motivation is to have an easier method of working though the script

Some quick features

  • of course editing of a single track
  • Make it easy to add and remove tracks before remuxing
  • some ease of use functions like adding all tracks of a certain language
  • Mass editing of tracks. For example setting a flag on all selected tracks
  • Ability to move tracks around
  • should be able to walk user through demuxing and remuxing.

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.