Skip to content

Commit da2c4a9

Browse files
committed
Test: ytdlp opt set
1 parent d0b1500 commit da2c4a9

File tree

173 files changed

+839
-981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+839
-981
lines changed
0 Bytes
Binary file not shown.
-53.3 KB
Binary file not shown.
54.4 KB
Binary file not shown.

.vs/Program/v17/.futdcache.v2

0 Bytes
Binary file not shown.

.vs/Program/v17/.suo

1 KB
Binary file not shown.

.vs/Program/v17/DocumentLayout.backup.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"Version": 1,
33
"WorkspaceRootPath": "C:\\Projects\\C#-Video-downloader\\Program\\",
44
"Documents": [
5-
{
6-
"AbsoluteMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|c:\\projects\\c#-video-downloader\\program\\program\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}",
7-
"RelativeMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|solutionrelative:program\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}"
8-
},
95
{
106
"AbsoluteMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|c:\\projects\\c#-video-downloader\\program\\program\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
117
"RelativeMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|solutionrelative:program\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
128
},
9+
{
10+
"AbsoluteMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|c:\\projects\\c#-video-downloader\\program\\program\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}",
11+
"RelativeMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|solutionrelative:program\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}"
12+
},
1313
{
1414
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Projects\\C#-Video-downloader\\Program\\TODO.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}",
1515
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:TODO.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}"
@@ -22,7 +22,7 @@
2222
"DocumentGroups": [
2323
{
2424
"DockedWidth": 200,
25-
"SelectedChildIndex": 3,
25+
"SelectedChildIndex": 2,
2626
"Children": [
2727
{
2828
"$type": "Bookmark",
@@ -42,19 +42,20 @@
4242
},
4343
{
4444
"$type": "Document",
45-
"DocumentIndex": 1,
45+
"DocumentIndex": 0,
4646
"Title": "MainWindow.xaml.cs",
4747
"DocumentMoniker": "C:\\Projects\\C#-Video-downloader\\Program\\Program\\MainWindow.xaml.cs",
4848
"RelativeDocumentMoniker": "Program\\MainWindow.xaml.cs",
4949
"ToolTip": "C:\\Projects\\C#-Video-downloader\\Program\\Program\\MainWindow.xaml.cs",
5050
"RelativeToolTip": "Program\\MainWindow.xaml.cs",
51-
"ViewState": "AgIAAK0BAAAAAAAAAAAAAM8BAAAJAAAAAAAAAA==",
51+
"ViewState": "AgIAAHYAAAAAAAAAAAAiwIoAAAAvAAAAAAAAAA==",
5252
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
53-
"WhenOpened": "2025-01-28T12:16:21.333Z"
53+
"WhenOpened": "2025-01-28T12:16:21.333Z",
54+
"EditorCaption": ""
5455
},
5556
{
5657
"$type": "Document",
57-
"DocumentIndex": 0,
58+
"DocumentIndex": 1,
5859
"Title": "MainWindow.xaml",
5960
"DocumentMoniker": "C:\\Projects\\C#-Video-downloader\\Program\\Program\\MainWindow.xaml",
6061
"RelativeDocumentMoniker": "Program\\MainWindow.xaml",

.vs/Program/v17/DocumentLayout.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"Version": 1,
33
"WorkspaceRootPath": "C:\\Projects\\C#-Video-downloader\\Program\\",
44
"Documents": [
5-
{
6-
"AbsoluteMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|c:\\projects\\c#-video-downloader\\program\\program\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}",
7-
"RelativeMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|solutionrelative:program\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}"
8-
},
95
{
106
"AbsoluteMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|c:\\projects\\c#-video-downloader\\program\\program\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
117
"RelativeMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|solutionrelative:program\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
128
},
9+
{
10+
"AbsoluteMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|c:\\projects\\c#-video-downloader\\program\\program\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}",
11+
"RelativeMoniker": "D:0:0:{81AD4069-45F9-43B4-8FBE-EA033511663C}|Program\\Program.csproj|solutionrelative:program\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}"
12+
},
1313
{
1414
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Projects\\C#-Video-downloader\\Program\\TODO.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}",
1515
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:TODO.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}"
@@ -22,7 +22,7 @@
2222
"DocumentGroups": [
2323
{
2424
"DockedWidth": 200,
25-
"SelectedChildIndex": 3,
25+
"SelectedChildIndex": 2,
2626
"Children": [
2727
{
2828
"$type": "Bookmark",
@@ -42,19 +42,20 @@
4242
},
4343
{
4444
"$type": "Document",
45-
"DocumentIndex": 1,
45+
"DocumentIndex": 0,
4646
"Title": "MainWindow.xaml.cs",
4747
"DocumentMoniker": "C:\\Projects\\C#-Video-downloader\\Program\\Program\\MainWindow.xaml.cs",
4848
"RelativeDocumentMoniker": "Program\\MainWindow.xaml.cs",
4949
"ToolTip": "C:\\Projects\\C#-Video-downloader\\Program\\Program\\MainWindow.xaml.cs",
5050
"RelativeToolTip": "Program\\MainWindow.xaml.cs",
51-
"ViewState": "AgIAAK0BAAAAAAAAAAAAAM8BAAAJAAAAAAAAAA==",
51+
"ViewState": "AgIAAHYAAAAAAAAAAAAiwIoAAAAvAAAAAAAAAA==",
5252
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
53-
"WhenOpened": "2025-01-28T12:16:21.333Z"
53+
"WhenOpened": "2025-01-28T12:16:21.333Z",
54+
"EditorCaption": ""
5455
},
5556
{
5657
"$type": "Document",
57-
"DocumentIndex": 0,
58+
"DocumentIndex": 1,
5859
"Title": "MainWindow.xaml",
5960
"DocumentMoniker": "C:\\Projects\\C#-Video-downloader\\Program\\Program\\MainWindow.xaml",
6061
"RelativeDocumentMoniker": "Program\\MainWindow.xaml",
238 Bytes
Binary file not shown.
25.6 KB
Binary file not shown.

Program/MainWindow.xaml.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using YoutubeDLSharp;
99
using YoutubeDLSharp.Metadata;
1010
using System.Text.Json;
11+
using YoutubeDLSharp.Options;
1112

1213
namespace Program
1314
{
@@ -37,7 +38,7 @@ public class User
3738
{
3839
ProgramInfo = new ProgramInfo
3940
{
40-
AppVersion = new Version(1, 0, 0, 0),
41+
AppVersion = new Version(1, 2, 0, 1),
4142
Website = "http://github.com/Chester-xx/Youtube-Video-Downloader",
4243
Developer = "Chester-xx",
4344
Language = "en-US"
@@ -126,7 +127,25 @@ private async void BtnDownload_Click(object sender, RoutedEventArgs e, Label lbl
126127
// Standard
127128
if (rgbCombined.IsChecked == true)
128129
{
130+
// overrideOptions: opts
131+
//var opts = new OptionSet()
132+
//{
133+
// Format = "bestvideo+bestaudio/best",
134+
// RestrictFilenames = true,
135+
// NoMtime = true,
136+
// FragmentRetries = int.MaxValue,
137+
// ConcurrentFragments = 5,
138+
// RecodeVideo = VideoRecodeFormat.Mp4,
139+
// PostprocessorArgs = new[]
140+
// {
141+
// "ffmpeg:-vcodec h264_nvenc",
142+
// "ffmpeg_i1:-hwaccel cuda -hwaccel_output_format cuda"
143+
// }
144+
//};
145+
//ErrorState = await yt.RunWithOptions(url: $@"{GetURL()}",options: opts, output: Output, progress: DownloadProgress);
146+
129147
ErrorState = await yt.RunVideoDownload(url: $@"{GetURL()}", progress: DownloadProgress, output: Output, recodeFormat: YoutubeDLSharp.Options.VideoRecodeFormat.Mp4);
148+
130149
if (ErrorState.Success)
131150
{
132151
sc1 = true;

0 commit comments

Comments
 (0)