|
2 months ago | |
---|---|---|
internal | 2 months ago | |
pkg/encoder | 2 months ago | |
.gitignore | 2 months ago | |
LICENSE | 4 months ago | |
cmd.go | 2 months ago | |
config.yaml | 3 months ago | |
go.mod | 2 months ago | |
go.sum | 2 months ago | |
readme.md | 2 months ago |
readme.md
movie-Util
This script started out as a simple cli program that wraps Go bindings for FFMPEG but now it exists to do all the old stuff (extract SRT files from MKVs, convert the MKV to MP4, and select audio tracks).
If you wish to upload manipulated media to a linx server check out my linx client
Requirements
This script requires the user have the following two external dependencies
Building
You can build the script with Golang installed on your computer just run
go build -o movie-util
Alternatively there will be a binary provided in the releases page
Usage
It is simple to run
movie-util [file.mkv] -l
where [file.mkv] is the mkv file that has subtitles tracks.
The output will be a list of all sub and audio tracks example (note: this used to output in a stupid way, it now currently normalizes tracks from 0 the way ffmpeg expects it)
Lucky Star - Episode 01 - The Girl who Dashes Off.mkv
0 "opus" "jpn" "audio"
1 "opus" "eng" "audio"
0 "ass" "jpn" "(Moe) Full Subs" "subtitle"
1 "ass" "eng" "(Moe) Signs \u0026 Songs" "subtitle"
2 "ass" "jpn" "(Virus 123) Full Subs" "subtitle"
3 "ass" "eng" "(Virus 123) Signs \u0026 Songs" "subtitle"
4 "subrip" "jpn" "(Exiled-Destiny) Full Subs" "subtitle"
5 "subrip" "eng" "(Exiled-Destiny) Signs \u0026 Songs" "subtitle"
6 "ass" "jpn" "(Tsundere) Full Subs" "subtitle"
7 "ass" "eng" "(EpicLittleWeeblet) Full Dubtitles" "subtitle"
movie-util [file.mkv] -et N
where is the track listed above and [file.mkv] is the file to extract from.
Output:
util extract --sub-track 3 Lucky\ Star\ -\ Episode\ 01\ -\ The\ Girl\ who\ Dashes\ Off.mkv
2022/10/12 17:46:05 compiled command: ffmpeg -i Lucky Star - Episode 01 - The Girl who Dashes Off.mkv -map 0:s:3 Lucky Star - Episode 01 - The Girl who Dashes Off.srt -y
This extracts to [FileName.srt] example: 'Lucky Star - Episode 01 - The Girl who Dashes Off.srt'
movie-util [file.mkv]
where [file.mkv] is the files to convert to mp4 codec.
This can take multiple filenames as input with the -f
flag
movie-util -f [file.mkv],[file1.mkv],[file2.mkv],[fileN.mkv]
and will convert them sequentially.
movie-util -sa <n> [file.mkv]
where n is the audio track number from the list
command and filename is the name of the file. This will set the audio track to which ever is the one passed to the program however
this creates a copy of the file as I was unable to find a way to change the default audio track without doing it this method. It will create it as [filename-copy.mkv].
movie-util -c [file.srt]
where file.srt
is the srt file you wish to convert to a vtt.