Skip to content

Commit

Permalink
[stream_arranger] v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yajrendrag committed Jun 9, 2024
1 parent 1885147 commit ebb59ee
Show file tree
Hide file tree
Showing 11 changed files with 394 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@
[submodule "source/asad_audio_encoder/lib/ffmpeg"]
path = source/asad_audio_encoder/lib/ffmpeg
url = https://github.com/Josh5/unmanic.plugin.helpers.ffmpeg.git
[submodule "source/stream_arranger/lib/ffmpeg"]
path = source/stream_arranger/lib/ffmpeg
url = https://github.com/Josh5/unmanic.plugin.helpers.ffmpeg.git
4 changes: 4 additions & 0 deletions source/stream_arranger/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/__pycache__
*.py[cod]
**/site-packages
settings.json
3 changes: 3 additions & 0 deletions source/stream_arranger/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Stream Arranger

plugin for [Unmanic](https://github.com/Unmanic)
3 changes: 3 additions & 0 deletions source/stream_arranger/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

**<span style="color:#56adda">0.0.1</span>**
- initial release
28 changes: 28 additions & 0 deletions source/stream_arranger/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

##### Description

This plugin arranges the streams in a video file, keeping the source container, to be in the following order:
- video
- audio
- subtitles
- data
- attachments

Note that some stream types may not be compatible or even able to be copied to the existing container type. If you get an error about incompatible streams, you may need to
couple the use of this plugin with other plugins that remove subtitles, data, or attachment streams before this plugin executes (place them before this plugin
in your worker flow).

In addition, you can sort the audio streams by a combination of number of channels and languages. You can choose to sort by channels first and then language
or by language first and then channels. You specifiy a list of languages to sort by in the order in which you wish them to appear in the output. Any streams
with languages not matching your list of languages will be place after the langauges you list. Channel sort will be based on the actual audio streams in the file;
you just specify whether the sort is ascending or descending.


##### Configuration Options
- audio primary sort key is either channels or languages - specify it in the dropdown.
- channels sort direction is either ascending (2, 5.1, 7.1), or descending (5.1, 2).
- Enter a comma delimited list of audio language codes to sort by.

Three letter language codes should be used where applicable.


Binary file added source/stream_arranger/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions source/stream_arranger/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"author": "yajrendrag",
"compatibility": [
1,
2
],
"description": "Arrange streams in video file and sort audio by channels and language",
"icon": "https://raw.githubusercontent.com/Unmanic/plugin.remove_stream_by_language/master/icon.png",
"id": "stream_arranger",
"name": "Stream arranger",
"platform": [
"all"
],
"priorities": {
"on_library_management_file_test": 99,
"on_worker_process": 1
},
"tags": "audio, ffmpeg,library file test",
"version": "0.0.1"
}
23 changes: 23 additions & 0 deletions source/stream_arranger/lib/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
plugins.__init__.py
Written by: Josh.5 <[email protected]>
Date: 23 Aug 2021, (20:38 PM)
Copyright:
Copyright (C) 2021 Josh Sunnex
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see <https://www.gnu.org/licenses/>.
"""
1 change: 1 addition & 0 deletions source/stream_arranger/lib/ffmpeg
Submodule ffmpeg added at 35ae11
Loading

0 comments on commit ebb59ee

Please sign in to comment.