mirror of
https://github.com/imrayya/SRTto3Dsubtitles.git
synced 2026-09-21 10:17:27 +02:00
Compare commits
7 Commits
v0.14
...
1c6848bb9e
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c6848bb9e | |||
| ad7860161a | |||
| fa679e441e | |||
| 8bd53587d1 | |||
| 817b476c5f | |||
| 02176d0d7e | |||
| 1c5d2e3934 |
@@ -0,0 +1,78 @@
|
||||
name: Build and Draft
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-and-draft:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "8.0.x"
|
||||
|
||||
# ---- Build all 5 binaries (no version in filenames needed) ----
|
||||
- name: Build CLI - Linux x64
|
||||
run: |
|
||||
dotnet publish ConvertSRTto3DASS.Cli \
|
||||
-c Release -r linux-x64 --self-contained false \
|
||||
-p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true \
|
||||
-o publish/linux-x64/
|
||||
mv publish/linux-x64/ConvertSRTto3DASS publish/linux-x64/ConvertSRTto3DASS-cli-linux-x64
|
||||
|
||||
- name: Build CLI - macOS x64
|
||||
run: |
|
||||
dotnet publish ConvertSRTto3DASS.Cli \
|
||||
-c Release -r osx-x64 --self-contained false \
|
||||
-p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true \
|
||||
-o publish/osx-x64/
|
||||
mv publish/osx-x64/ConvertSRTto3DASS publish/osx-x64/ConvertSRTto3DASS-cli-osx-x64
|
||||
|
||||
- name: Build CLI - macOS arm64
|
||||
run: |
|
||||
dotnet publish ConvertSRTto3DASS.Cli \
|
||||
-c Release -r osx-arm64 --self-contained false \
|
||||
-p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true \
|
||||
-o publish/osx-arm64/
|
||||
mv publish/osx-arm64/ConvertSRTto3DASS publish/osx-arm64/ConvertSRTto3DASS-cli-osx-arm64
|
||||
|
||||
- name: Build CLI - Windows x64
|
||||
run: |
|
||||
dotnet publish ConvertSRTto3DASS.Cli \
|
||||
-c Release -r win-x64 --self-contained false \
|
||||
-p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true \
|
||||
-o publish/win-x64/
|
||||
mv publish/win-x64/ConvertSRTto3DASS.exe publish/win-x64/ConvertSRTto3DASS-cli-win-x64.exe
|
||||
|
||||
- name: Build GUI - Windows x64
|
||||
run: |
|
||||
dotnet publish ConvertSRTto3DASS.Gui \
|
||||
-c Release -r win-x64 --self-contained false \
|
||||
-p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true \
|
||||
-p:EnableWindowsTargeting=true \
|
||||
-o publish/gui-win-x64/
|
||||
mv publish/gui-win-x64/ConvertSRTto3DASS.exe publish/gui-win-x64/ConvertSRTto3DASS-gui-win-x64.exe
|
||||
|
||||
# ---- Update (or create) the rolling draft release ----
|
||||
- name: Update Rolling Draft Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
draft: true
|
||||
tag: rolling-draft
|
||||
name: "Draft (latest build)"
|
||||
body: "Latest binaries from commit ${{ github.sha }}. Edit tag, name, and notes before publishing."
|
||||
artifacts: |
|
||||
publish/linux-x64/ConvertSRTto3DASS-cli-linux-x64
|
||||
publish/osx-x64/ConvertSRTto3DASS-cli-osx-x64
|
||||
publish/osx-arm64/ConvertSRTto3DASS-cli-osx-arm64
|
||||
publish/win-x64/ConvertSRTto3DASS-cli-win-x64.exe
|
||||
publish/gui-win-x64/ConvertSRTto3DASS-gui-win-x64.exe
|
||||
@@ -1,6 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
Generated
+2
@@ -97,6 +97,7 @@ partial class Form1
|
||||
DropDownStyle = ComboBoxStyle.DropDownList
|
||||
};
|
||||
comboBox_Mode.Items.AddRange(["SBS (Side-by-Side)", "OU (Over-Under)", "RG (Red-Green)"]);
|
||||
comboBox_Mode.SelectedIndexChanged += comboBox_Mode_SelectedIndexChanged;
|
||||
groupBox_Mode.Controls.AddRange([label_Mode, comboBox_Mode]);
|
||||
|
||||
// ---- Resolution section ----
|
||||
@@ -167,6 +168,7 @@ partial class Form1
|
||||
ForeColor = Color.White,
|
||||
FlatAppearance = { BorderSize = 0 }
|
||||
};
|
||||
button_Convert.Click += button_Convert_Click;
|
||||
|
||||
// ---- Status ----
|
||||
textBox_Status = new TextBox
|
||||
|
||||
@@ -28,19 +28,27 @@ The application runs in two modes — **GUI** (no arguments) and **CLI** (with a
|
||||
4. Adjust settings as needed
|
||||
5. Click **Convert**
|
||||
|
||||
> **Note:** The GUI is experimental. Feedback and bug reports are welcome!
|
||||
|
||||
### Command Line
|
||||
|
||||
Pass any argument to trigger CLI mode:
|
||||
The CLI runs on **Windows, Linux, and macOS**.
|
||||
|
||||
```
|
||||
ConvertSRTto3DASS.exe input.srt [options]
|
||||
```
|
||||
#### Drag and drop:
|
||||
1. Drag and drop an `.srt` file onto `ConvertSRTto3DASS`
|
||||
- Uses default settings (SBS mode, 1280x720)
|
||||
2. The resulting `.ass` file will be saved in the same directory as the `.srt`
|
||||
|
||||
Or drag and drop an `.srt` file onto the executable.
|
||||
#### Command line:
|
||||
```
|
||||
|
||||
Available options:
|
||||
ConvertSRTto3DASS.exe input.srt [options]
|
||||
|
||||
```
|
||||
|
||||
##### Available options:
|
||||
```
|
||||
|
||||
```
|
||||
--mode sbs|ou|rg 3D mode (default: sbs)
|
||||
--resx <number> Output width
|
||||
--resy <number> Output height
|
||||
@@ -54,21 +62,20 @@ Available options:
|
||||
--verticalmargin <number> General vertical margin
|
||||
--output <path> Output file path
|
||||
--help, -h, /? Show help
|
||||
```
|
||||
|
||||
Examples:
|
||||
```
|
||||
|
||||
```
|
||||
ConvertSRTto3DASS.exe movie.srt --mode sbs
|
||||
ConvertSRTto3DASS.exe movie.srt --mode ou --resx 1920 --resy 1080
|
||||
ConvertSRTto3DASS.exe movie.srt --mode rg --offsetx 6 --bottomoffset 24
|
||||
```
|
||||
##### Examples:
|
||||
```
|
||||
|
||||
> **Note:** The GUI is experimental. Feedback and bug reports are welcome!
|
||||
ConvertSRTto3DASS.exe movie.srt --mode sbs
|
||||
ConvertSRTto3DASS.exe movie.srt --mode ou --resx 1920 --resy 1080
|
||||
ConvertSRTto3DASS.exe movie.srt --mode rg --offsetx 6 --bottomoffset 24
|
||||
|
||||
```
|
||||
|
||||
## Known Issues
|
||||
|
||||
- Plex Transcoder has issues with the converted subtitles. VLC works correctly.
|
||||
- Subtitle positional data from `.srt` files is stripped during conversion.
|
||||
|
||||
## Requirements
|
||||
@@ -83,14 +90,21 @@ ConvertSRTto3DASS.exe movie.srt --mode rg --offsetx 6 --bottomoffset 24
|
||||
# Build all projects
|
||||
dotnet build
|
||||
|
||||
# Publish CLI (cross-platform)
|
||||
dotnet publish ConvertSRTto3DASS.Cli -c Release -r linux-x64 --self-contained false -p:PublishSingleFile=true
|
||||
dotnet publish ConvertSRTto3DASS.Cli -c Release -r osx-x64 --self-contained false -p:PublishSingleFile=true
|
||||
dotnet publish ConvertSRTto3DASS.Cli -c Release -r win-x64 --self-contained false -p:PublishSingleFile=true
|
||||
# Publish CLI (self-contained)
|
||||
## Linux x64
|
||||
dotnet publish ConvertSRTto3DASS.Cli -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
## OSX x64
|
||||
dotnet publish ConvertSRTto3DASS.Cli -c Release -r osx-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
## OSX arm64
|
||||
dotnet publish ConvertSRTto3DASS.Cli -c Release -r osx-arm64 --self-contained false -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
## Windows x64
|
||||
dotnet publish ConvertSRTto3DASS.Cli -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
|
||||
# Publish GUI (Windows only)
|
||||
dotnet publish ConvertSRTto3DASS.Gui -c Release -r win-x64 --self-contained false -p:PublishSingleFile=true
|
||||
```
|
||||
# Publish GUI (Windows x64 only, self-contained)
|
||||
dotnet publish ConvertSRTto3DASS.Gui -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
```
|
||||
|
||||
_Each publish produces a single .exe with no .dll sidecars._
|
||||
|
||||
## License
|
||||
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# Publish all targets for SRTto3Dsubtitles
|
||||
# Usage: ./publish.ps1
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$targets = @(
|
||||
@{ Project = "ConvertSRTto3DASS.Cli"; Runtime = "linux-x64"; Name = "ConvertSRTto3DASS-linux-x64" },
|
||||
@{ Project = "ConvertSRTto3DASS.Cli"; Runtime = "win-x64"; Name = "ConvertSRTto3DASS-win-x64.exe" },
|
||||
@{ Project = "ConvertSRTto3DASS.Cli"; Runtime = "osx-x64"; Name = "ConvertSRTto3DASS-osx-x64" },
|
||||
@{ Project = "ConvertSRTto3DASS.Cli"; Runtime = "osx-arm64"; Name = "ConvertSRTto3DASS-osx-arm64" },
|
||||
@{ Project = "ConvertSRTto3DASS.Gui"; Runtime = "win-x64"; Name = "ConvertSRTto3DASS-GUI-Win-x64.exe" }
|
||||
)
|
||||
|
||||
foreach ($t in $targets) {
|
||||
Write-Host "Publishing $($t.Name)..." -ForegroundColor Cyan
|
||||
dotnet publish $t.Project -c Release -r $t.Runtime `
|
||||
--self-contained false `
|
||||
-p:PublishSingleFile=true `
|
||||
-p:IncludeNativeLibrariesForSelfExtract=true `
|
||||
-p:OutputType=Exe `
|
||||
-p:OutputPath="publish\$($t.Runtime)\"
|
||||
|
||||
$src = "publish\$($t.Runtime)\$($t.Project).exe"
|
||||
$dst = "publish\$($t.Name)"
|
||||
if (Test-Path $src) {
|
||||
Move-Item $src $dst -Force
|
||||
Write-Host " -> $dst" -ForegroundColor Green
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "`nDone! Published files in publish/`n" -ForegroundColor Green
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
# Publish all targets for SRTto3Dsubtitles
|
||||
# Usage: ./publish.sh
|
||||
|
||||
set -e
|
||||
|
||||
declare -a targets=(
|
||||
"ConvertSRTto3DASS.Cli:linux-x64:ConvertSRTto3DASS-linux-x64"
|
||||
"ConvertSRTto3DASS.Cli:win-x64:ConvertSRTto3DASS-win-x64.exe"
|
||||
"ConvertSRTto3DASS.Cli:osx-x64:ConvertSRTto3DASS-osx-x64"
|
||||
"ConvertSRTto3DASS.Cli:osx-arm64:ConvertSRTto3DASS-osx-arm64"
|
||||
"ConvertSRTto3DASS.Gui:win-x64:ConvertSRTto3DASS-GUI-Win-x64.exe"
|
||||
)
|
||||
|
||||
rm -rf publish
|
||||
mkdir -p publish
|
||||
|
||||
for entry in "${targets[@]}"; do
|
||||
IFS=':' read -r project runtime name <<< "$entry"
|
||||
|
||||
echo "Publishing $name..."
|
||||
dotnet publish "$project" -c Release -r "$runtime" \
|
||||
--self-contained false \
|
||||
-p:PublishSingleFile=true \
|
||||
-p:IncludeNativeLibrariesForSelfExtract=true \
|
||||
-p:OutputType=Exe \
|
||||
-p:OutputPath="publish/$runtime/"
|
||||
|
||||
src="publish/$runtime/$project.exe"
|
||||
dst="publish/$name"
|
||||
if [ -f "$src" ]; then
|
||||
mv "$src" "$dst"
|
||||
echo " -> $dst"
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Done! Published files in publish/"
|
||||
Reference in New Issue
Block a user