Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

new Flag for 'archive' allows to set the languages for subtitles #48

Merged
merged 4 commits into from
Sep 5, 2022
Merged

Conversation

LordBex
Copy link
Contributor

@LordBex LordBex commented Sep 5, 2022

I have added a new Flag for the archive command to set the Languages of Subtitels which should be downloaded
If not specified, all subtitles will be loaded

Tested with Command

./crunchy archive 'LINK' --merge audio  -v --resolution worst -l ja-JP -l de-DE --sublang de-DE -s  en-US

Log:

[debug] Executing `archive` command with 1 arg(s)
[debug] Validating arguments
[debug] FFmpeg detected
[debug] Using following audio locales: ja-JP, de-DE
[debug] Using following subtitels locales: de-DE, en-US
[debug] Using audio merge behavior
[debug] Using resolution 'worst'

[debug] Parsing url 1
[debug] Parsed url 1
...
[debug] Merging segments
[debug] Downloaded 'de-DE' video
[debug] Downloaded 'en-US' subtitles
[debug] Downloaded 'de-DE' subtitles
[debug] FFmpeg merge command: ffmpeg .....
[debug] Re-encode to short video length
[debug] Download finished
[debug] Stopped signal catcher

Message on 'crunchy-cli archive --help'

...
-s, --sublang strings     Subtitles langs which should be downloaded. Can be used multiple times
...

MediaInfo

Allgemein
Format                                   : Matroska
Format-Version                           : Version 4
Dateigröße                               : 109 MiB
Dauer                                    : 24 min 2s
Gesamte Bitrate                          : 632 kb/s

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Dauer                                    : 24 min 2s
Titel                                    : Japanese
Sprache                                  : Japanisch (JP)

Audio #1
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Dauer                                    : 24 min 2s
Titel                                    : Japanese
Sprache                                  : Japanisch (JP)

Audio #2
ID                                       : 3
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Dauer                                    : 24 min 2s
Titel                                    : German
Sprache                                  : Deutsch (DE)

Text #1
ID                                       : 4
Format                                   : ASS
Dauer                                    : 22 min 39s
Titel                                    : English (US)
Sprache                                  : Englisch (US)

Text #2
ID                                       : 5
Format                                   : ASS
Dauer                                    : 23 min 1s
Titel                                    : German
Sprache                                  : Deutsch (DE)

cli/commands/archive/archive.go Outdated Show resolved Hide resolved
Copy link
Member

@bytedream bytedream left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bytedream bytedream merged commit b99c339 into crunchy-labs:master Sep 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants