Skip to content

Commit

Permalink
--audio-source/--sub-sourceのコマンドライン分解方法を変更。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed May 14, 2023
1 parent c874886 commit 8e5bb3a
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 26 deletions.
8 changes: 8 additions & 0 deletions NVEnc/NVEnc_readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,19 @@ Geforce RTX 4080
Geforce GTX 1060
NVIDIA グラフィックドライバ 527.56
NVIDIA グラフィックドライバ 528.02
NVIDIA グラフィックドライバ 531.68

【お断り】
今後の更新で設定ファイルの互換性がなくなるかもしれません。

【メモ】
2023.05.14 (7.25)
[NVEncC]
- 音声処理をトラックごとに並列化。
- dshowのカメラ入力等に対応。
- --audio-source, --sub-sourceのコマンドラインの区切りを変更。
- --vpp-colorspaceの調整。

2023.04.25 (7.24)
[NVEncC]
- NVEnc 7.22で--sub-sourceが正常に動作しなくなっていたのを修正。
Expand Down
18 changes: 9 additions & 9 deletions NVEncC_Options.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@
- [--audio-metadata \[\<int/string\>?\]\<string\> or \[\<int/string\>?\]\<string\>=\<string\>](#--audio-metadata-intstringstring-or-intstringstringstring)
- [--audio-bsf \[\<int/string\>?\]\<string\>](#--audio-bsf-intstringstring)
- [--audio-ignore-decode-error \<int\>](#--audio-ignore-decode-error-int)
- [--audio-source \<string\>\[:{\<int\>?}\[;\<param1\>=\<value1\>\]...\]...](#--audio-source-stringintparam1value1)
- [--audio-source \<string\>\[:{\<int\>?}\[;\<param1\>=\<value1\>...\]/\[\]...\]](#--audio-source-stringintparam1value1)
- [--chapter \<string\>](#--chapter-string)
- [--chapter-copy](#--chapter-copy)
- [--chapter-no-trim](#--chapter-no-trim)
- [--key-on-chapter](#--key-on-chapter)
- [--keyfile \<string\>](#--keyfile-string)
- [--sub-source \<string\>\[:{\<int\>?}\[;\<param1\>=\<value1\>\]...\]...](#--sub-source-stringintparam1value1)
- [--sub-source \<string\>\[:{\<int\>?}\[;\<param1\>=\<value1\>...\]/\[\]...\]](#--sub-source-stringintparam1value1)
- [--sub-copy \[\<int/string\>;\[,\<int/string\>\]...\]](#--sub-copy-intstringintstring)
- [--sub-disposition \[\<int/string\>?\]\<string\>](#--sub-disposition-intstringstring)
- [--sub-metadata \[\<int/string\>?\]\<string\> or \[\<int/string\>?\]\<string\>=\<string\>](#--sub-metadata-intstringstring-or-intstringstringstring)
Expand Down Expand Up @@ -1222,7 +1222,7 @@ The default is 10.
--audio-ignore-decode-error 0
```

### --audio-source &lt;string&gt;[:{&lt;int&gt;?}[;&lt;param1&gt;=&lt;value1&gt;]...]...
### --audio-source &lt;string&gt;[:{&lt;int&gt;?}[;&lt;param1&gt;=&lt;value1&gt;...]/[]...]
Mux an external audio file specified.

- **file params**
Expand Down Expand Up @@ -1271,10 +1271,10 @@ Mux an external audio file specified.

- Examples
```
Example1: --audio-source "<audio_file>":copy
Example2: --audio-source "<audio_file>":codec=aac
Example3: --audio-source "<audio_file>":1?codec=aac;bitrate=256:2?codec=aac;bitrate=192;metadata=language=jpn
Example4: --audio-source --audio-source "hw:1:format=alsa,codec=aac;bitrate=256"
Example1: --audio-source "<audio_file>:copy"
Example2: --audio-source "<audio_file>:codec=aac"
Example3: --audio-source "<audio_file>:1?codec=aac;bitrate=256/2?codec=aac;bitrate=192;metadata=language=jpn;disposition=default,forced"
Example4: --audio-source "hw:1:format=alsa/codec=aac;bitrate=256"
```

### --chapter &lt;string&gt;
Expand Down Expand Up @@ -1354,7 +1354,7 @@ Set keyframes on chapter position.
Set keyframes on frames (starting from 0, 1, 2, ...) specified in the file.
There should be one frame ID per line.

### --sub-source &lt;string&gt;[:{&lt;int&gt;?}[;&lt;param1&gt;=&lt;value1&gt;]...]...
### --sub-source &lt;string&gt;[:{&lt;int&gt;?}[;&lt;param1&gt;=&lt;value1&gt;...]/[]...]
Read subtitle from the specified file and mux into the output file.

- **file params**
Expand All @@ -1377,7 +1377,7 @@ Read subtitle from the specified file and mux into the output file.
- Examples
```
Example1: --sub-source "<sub_file>"
Example2: --sub-source "<sub_file>":disposition=default;metadata=language=jpn
Example2: --sub-source "<sub_file>:disposition=default,forced;metadata=language=jpn"
```

### --sub-copy [&lt;int/string&gt;;[,&lt;int/string&gt;]...]
Expand Down
14 changes: 7 additions & 7 deletions NVEncC_Options.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
- [--audio-metadata \[\<int/string\>?\]\<string\> or \[\<int/string\>?\]\<string\>=\<string\>](#--audio-metadata-intstringstring-or-intstringstringstring)
- [--audio-bsf \[\<int/string\>?\]\<string\>](#--audio-bsf-intstringstring)
- [--audio-ignore-decode-error \<int\>](#--audio-ignore-decode-error-int)
- [--audio-source \<string\>\[:{\<int\>?}\[;\<param1\>=\<value1\>\]...\]...](#--audio-source-stringintparam1value1)
- [--audio-source \<string\>\[:\[{\<int\>?}\]\[;\<param1\>=\<value1\>...\]/\[\]...\]](#--audio-source-stringintparam1value1)
- [--chapter \<string\>](#--chapter-string)
- [--chapter-copy](#--chapter-copy)
- [--chapter-no-trim](#--chapter-no-trim)
Expand Down Expand Up @@ -1214,7 +1214,7 @@ tsなどでエラーが出るなどしてうまく動作しない場合は、[--

デフォルトは10。 0とすれば、1回でもデコードエラーが起これば処理を中断してエラー終了する。

### --audio-source &lt;string&gt;[:{&lt;int&gt;?}[;&lt;param1&gt;=&lt;value1&gt;]...]...
### --audio-source &lt;string&gt;[:[{&lt;int&gt;?}][;&lt;param1&gt;=&lt;value1&gt;...]/[]...]
外部音声ファイルをmuxする。

- **ファイルのパラメータ**
Expand Down Expand Up @@ -1263,10 +1263,10 @@ tsなどでエラーが出るなどしてうまく動作しない場合は、[--

- 使用例
```
例1: --audio-source "<audio_file>":copy
例2: --audio-source "<audio_file>":codec=aac
例3: --audio-source "<audio_file>":1?codec=aac;bitrate=256:2?codec=aac;bitrate=192;metadata=language=jpn
例4: --audio-source "hw:1:format=alsa,codec=aac;bitrate=256"
例1: --audio-source "<audio_file>:copy"
例2: --audio-source "<audio_file>:codec=aac"
例3: --audio-source "<audio_file>:1?codec=aac;bitrate=256/2?codec=aac;bitrate=192;metadata=language=jpn;disposition=default,forced"
例4: --audio-source "hw:1:format=alsa/codec=aac;bitrate=256"
```

### --chapter &lt;string&gt;
Expand Down Expand Up @@ -1369,7 +1369,7 @@ nero形式、apple形式、matroska形式に対応する。--chapter-copyとは
- 使用例
```
例1: --sub-source "<sub_file>"
例2: --sub-source "<sub_file>":disposition=default;metadata=language=jpn
例2: --sub-source "<sub_file>:disposition=default,forced;metadata=language=jpn"
```

### --sub-copy [&lt;int/string&gt;;[,&lt;int/string&gt;]...]
Expand Down
37 changes: 30 additions & 7 deletions NVEncCore/rgy_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3646,7 +3646,7 @@ int parse_one_common_option(const TCHAR *option_name, const TCHAR *strInput[], i
return 0;
}
src.filename = tstring(strInput[i]).substr(0, qtr - ptr);
auto channel_select_list = split(qtr+1, _T(","));
auto channel_select_list = split(qtr+1, _T("/"));
for (size_t ichannel = 0; ichannel < channel_select_list.size(); ichannel++) {
auto& channel = channel_select_list[ichannel];
{
Expand Down Expand Up @@ -4393,7 +4393,7 @@ int parse_one_common_option(const TCHAR *option_name, const TCHAR *strInput[], i
}
src.filename = tstring(strInput[i]).substr(0, qtr - ptr);
const auto paramList = std::vector<std::string>{ "codec", "enc_prm", "copy", "disposition", "select-codec", "bsf" };
auto channel_select_list = split(qtr+1, _T(","));
auto channel_select_list = split(qtr+1, _T("/"));

for (size_t ichannel = 0; ichannel < channel_select_list.size(); ichannel++) {
auto& channel = channel_select_list[ichannel];
Expand Down Expand Up @@ -6278,8 +6278,18 @@ tstring gen_cmd(const RGYParamCommon *param, const RGYParamCommon *defaultPrm, b
for (const auto &src : param->audioSource) {
if (src.filename.length() > 0) {
cmd << _T(" --audio-source ") << _T("\"") << src.filename << _T("\"");
for (const auto &channel : src.select) {
cmd << _T(":");
auto source_delim = _T(":");
if (src.format.length() > 0) {
cmd << source_delim << _T("format=") << src.format;
source_delim = _T("/");
}
for (auto& opt : src.inputOpt) {
cmd << source_delim << _T("input_opt=") << opt.first << _T("=") << opt.second;
source_delim = _T("/");
}
for (const auto& channel : src.select) {
cmd << source_delim;
source_delim = _T("/");
if (channel.first == TRACK_SELECT_BY_LANG) {
cmd << char_to_tstring(channel.second.lang) << _T("?");
} else if (channel.first > 0) {
Expand All @@ -6299,8 +6309,11 @@ tstring gen_cmd(const RGYParamCommon *param, const RGYParamCommon *defaultPrm, b
if (sel.addDelayMs > 0) {
tmp << _T(";delay=") << sel.addDelayMs;
}
if (sel.decCodecPrm.length() > 0) {
tmp << _T(";dec_prm=") << sel.decCodecPrm;
}
if (sel.encCodecPrm.length() > 0) {
tmp << _T(";prm=") << sel.encCodecPrm;
tmp << _T(";enc_prm=") << sel.encCodecPrm;
}
if (sel.encCodecProfile.length() > 0) {
tmp << _T(";profile=") << sel.encCodecProfile;
Expand Down Expand Up @@ -6352,8 +6365,18 @@ tstring gen_cmd(const RGYParamCommon *param, const RGYParamCommon *defaultPrm, b
for (const auto &src : param->subSource) {
if (src.filename.length() > 0) {
cmd << _T(" --sub-source ") << _T("\"") << src.filename << _T("\"");
for (const auto &channel : src.select) {
cmd << _T(":");
auto source_delim = _T(":");
if (src.format.length() > 0) {
cmd << source_delim << _T("format=") << src.format;
source_delim = _T("/");
}
for (auto& opt : src.inputOpt) {
cmd << source_delim << _T("input_opt=") << opt.first << _T("=") << opt.second;
source_delim = _T("/");
}
for (const auto& channel : src.select) {
cmd << source_delim;
source_delim = _T("/");
if (channel.first == TRACK_SELECT_BY_LANG) {
cmd << char_to_tstring(channel.second.lang) << _T("?");
} else if (channel.first > 0) {
Expand Down
6 changes: 3 additions & 3 deletions NVEncCore/rgy_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#ifndef __RGY_CONFIG_H__
#define __RGY_CONFIG_H__

#define VER_FILEVERSION 0,7,25,0
#define VER_STR_FILEVERSION "7.25 beta1"
#define VER_STR_FILEVERSION_TCHAR _T("7.25 beta1")
#define VER_FILEVERSION 0,7,25,1
#define VER_STR_FILEVERSION "7.25"
#define VER_STR_FILEVERSION_TCHAR _T("7.25")

#ifdef _M_IX86
#define BUILD_ARCH_STR _T("x86")
Expand Down

0 comments on commit 8e5bb3a

Please sign in to comment.