("Front:CORS");
56 | Console.WriteLine("CORS Settings: " + origins);
57 | app.UseCors(
58 | options => options.WithOrigins(origins).AllowAnyMethod()
59 | );
60 |
61 | app.UseMvc();
62 | app.UseStaticFiles();
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/Uploader.Web/Uploader.Web.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp2.0
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Uploader.Web/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | },
10 | "Front": {
11 | "CORS": "http://localhost:3000"
12 | },
13 | "General": {
14 | "MaxGetProgressCanceled": 120,
15 | "ImageMagickPath": "",
16 | "TempFilePath": "/home/dr/testfolder",
17 | "FinalFilePath": "/home/dr/testfolder2"
18 | },
19 | "Ipfs": {
20 | "AddVideoSource": true,
21 | "OnlyHash": true
22 | },
23 | "Video": {
24 | "GpuEncodeMode": true,
25 | "NbSpriteDaemon": 1,
26 | "NbAudioVideoCpuEncodeDaemon": 0,
27 | "NbAudioCpuEncodeDaemon": 1,
28 | "NbVideoGpuEncodeDaemon": 1,
29 | "AuthorizedQuality": "240p",
30 | "NVidiaCard": "1080GTX"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Uploader.Web/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "Debug": {
5 | "LogLevel": {
6 | "Default": "Warning"
7 | }
8 | },
9 | "Console": {
10 | "LogLevel": {
11 | "Default": "Warning"
12 | }
13 | }
14 | },
15 |
16 | "Front": {
17 | "CORS": "https://d.tube"
18 | },
19 |
20 | "General": {
21 | "MaxGetProgressCanceled": 20,
22 | "ImageMagickPath": "",
23 | "TempFilePath": "/home/dr/testfolder",
24 | "ErrorFilePath": "/home/dr/testfolder3",
25 | "FinalFilePath": "/home/dr/testfolder2",
26 | "Version": "0.7.5"
27 | },
28 |
29 | "Encode": [
30 | {
31 | "urlTag": "144p",
32 | "maxRate": "100k",
33 | "width": 256,
34 | "height": 144,
35 | "MinSourceHeightForEncoding": 80,
36 | "qualityOrder": 1
37 | },
38 | {
39 | "urlTag": "240p",
40 | "maxRate": "200k",
41 | "width": 426,
42 | "height": 240,
43 | "MinSourceHeightForEncoding": 120,
44 | "qualityOrder": 2
45 | },
46 | {
47 | "urlTag": "360p",
48 | "maxRate": "400k",
49 | "width": 640,
50 | "height": 360,
51 | "MinSourceHeightForEncoding": 300,
52 | "qualityOrder": 3
53 | },
54 | {
55 | "urlTag": "480p",
56 | "maxRate": "1000k",
57 | "width": 854,
58 | "height": 480,
59 | "MinSourceHeightForEncoding": 360,
60 | "qualityOrder": 4
61 | },
62 | {
63 | "urlTag": "720p",
64 | "maxRate": "2000k",
65 | "width": 1280,
66 | "height": 720,
67 | "MinSourceHeightForEncoding": 600,
68 | "qualityOrder": 5
69 | },
70 | {
71 | "urlTag": "1080p",
72 | "maxRate": "3200k",
73 | "width": 1920,
74 | "height": 1080,
75 | "MinSourceHeightForEncoding": 900,
76 | "qualityOrder": 6
77 | }
78 | ],
79 |
80 | "Ipfs": {
81 | "IpfsTimeout": 108000,
82 | "VideoAndSpriteTrickleDag": true,
83 | "AddVideoSource": true,
84 | "OnlyHash": false
85 | },
86 |
87 | "Video": {
88 | "FfProbeTimeout": 10,
89 | "EncodeGetImagesTimeout": 600,
90 | "EncodeTimeout": 108000,
91 | "MaxVideoDurationForEncoding": 1800,
92 | "NbSpriteImages": 100,
93 | "HeightSpriteImages": 118,
94 | "GpuEncodeMode": true,
95 | "NbSpriteDaemon": 0,
96 | "NbAudioVideoCpuEncodeDaemon": 0,
97 | "NbAudioCpuEncodeDaemon": 0,
98 | "NbVideoGpuEncodeDaemon": 0,
99 | "AuthorizedQuality": "240p",
100 | "NVidiaCard":"QuadroP5000"
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/Uploader.Web/appsettings.prod_cpu.json:
--------------------------------------------------------------------------------
1 | {
2 | "Ipfs": {
3 | "AddVideoSource": true
4 | },
5 | "Video": {
6 | "GpuEncodeMode": false,
7 | "NbSpriteDaemon": 1,
8 | "NbAudioVideoCpuEncodeDaemon": 1,
9 | "AuthorizedQuality": "480p"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Uploader.Web/appsettings.prod_gpu.json:
--------------------------------------------------------------------------------
1 | {
2 | "Ipfs": {
3 | "AddVideoSource": true
4 | },
5 | "Video": {
6 | "GpuEncodeMode": true,
7 | "NbSpriteDaemon": 1,
8 | "NbAudioCpuEncodeDaemon": 2,
9 | "NbVideoGpuEncodeDaemon": 4,
10 | "AuthorizedQuality": "240p,480p,720p"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Uploader.Web/log4net.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/Uploader.Web/overlay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dtube/ipfs-uploader/7766a5fffb9cf8cdc021ebfbcd27982d35680f97/Uploader.Web/overlay.png
--------------------------------------------------------------------------------
/Uploader.Web/wwwroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
81 |
82 |
83 |
96 |
97 | Video
98 |
99 |
111 |
112 | Image
113 |
114 |
126 |
127 | Subtitle
128 |
129 |
135 |
136 |
137 |
138 |
--------------------------------------------------------------------------------
/Uploader.Web/wwwroot/scripts/fine-uploader-gallery.min.css:
--------------------------------------------------------------------------------
1 | .qq-gallery .qq-btn{float:right;border:none;padding:0;margin:0;box-shadow:none}.qq-gallery .qq-upload-button{display:inline;width:105px;padding:7px 10px;float:left;text-align:center;background:#00abc7;color:#fff;border-radius:2px;border:1px solid #37b7cc;box-shadow:0 1px 1px rgba(255,255,255,.37) inset,1px 0 1px rgba(255,255,255,.07) inset,0 1px 0 rgba(0,0,0,.36),0 -2px 12px rgba(0,0,0,.08) inset}.qq-gallery .qq-upload-button-hover{background:#33b6cc}.qq-gallery .qq-upload-button-focus{outline:1px dotted #000}.qq-gallery.qq-uploader{position:relative;min-height:200px;max-height:490px;overflow-y:hidden;width:inherit;border-radius:6px;border:1px dashed #ccc;background-color:#fafafa;padding:20px}.qq-gallery.qq-uploader:before{content:attr(qq-drop-area-text) " ";position:absolute;font-size:200%;left:0;width:100%;text-align:center;top:45%;opacity:.25}.qq-gallery .qq-upload-drop-area,.qq-upload-extra-drop-area{position:absolute;top:0;left:0;width:100%;height:100%;min-height:30px;z-index:2;background:#f9f9f9;border-radius:4px;text-align:center}.qq-gallery .qq-upload-drop-area span{display:block;position:absolute;top:50%;width:100%;margin-top:-8px;font-size:16px}.qq-gallery .qq-upload-extra-drop-area{position:relative;margin-top:50px;font-size:16px;padding-top:30px;height:20px;min-height:40px}.qq-gallery .qq-upload-drop-area-active{background:#fdfdfd;border-radius:4px}.qq-gallery .qq-upload-list{margin:0;padding:10px 0 0;list-style:none;max-height:450px;overflow-y:auto;clear:both;box-shadow:none}.qq-gallery .qq-upload-list li{display:inline-block;position:relative;max-width:120px;margin:0 25px 25px 0;padding:0;line-height:16px;font-size:13px;color:#424242;background-color:#fff;border-radius:2px;box-shadow:0 1px 1px 0 rgba(0,0,0,.22);vertical-align:top;height:186px}.qq-gallery .qq-upload-continue,.qq-gallery .qq-upload-delete,.qq-gallery .qq-upload-failed-text,.qq-gallery .qq-upload-pause,.qq-gallery .qq-upload-retry,.qq-gallery .qq-upload-size,.qq-gallery .qq-upload-spinner{display:inline}.qq-gallery .qq-upload-continue:hover,.qq-gallery .qq-upload-delete:hover,.qq-gallery .qq-upload-pause:hover,.qq-gallery .qq-upload-retry:hover{background-color:transparent}.qq-gallery .qq-upload-cancel,.qq-gallery .qq-upload-continue,.qq-gallery .qq-upload-delete,.qq-gallery .qq-upload-pause{cursor:pointer}.qq-gallery .qq-upload-continue,.qq-gallery .qq-upload-delete,.qq-gallery .qq-upload-pause{border:none;background:0 0;color:#00a0ba;font-size:12px;padding:0}.qq-gallery .qq-upload-status-text{color:#333;font-size:12px;padding-left:3px;padding-top:2px;width:inherit;display:none;width:108px}.qq-gallery .qq-upload-fail .qq-upload-status-text{text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;display:block}.qq-gallery .qq-upload-retrying .qq-upload-status-text{display:inline-block}.qq-gallery .qq-upload-retrying .qq-progress-bar-container{display:none}.qq-gallery .qq-upload-cancel{background-color:#525252;color:#f7f7f7;font-weight:700;font-family:Arial,Helvetica,sans-serif;border-radius:12px;border:none;height:22px;width:22px;padding:4px;position:absolute;right:-5px;top:-6px;margin:0;line-height:17px}.qq-gallery .qq-upload-cancel:hover{background-color:#525252}.qq-gallery .qq-upload-retry{cursor:pointer;position:absolute;top:30px;left:50%;margin-left:-31px;box-shadow:0 1px 1px rgba(255,255,255,.37) inset,1px 0 1px rgba(255,255,255,.07) inset,0 4px 4px rgba(0,0,0,.5),0 -2px 12px rgba(0,0,0,.08) inset;padding:3px 4px;border:1px solid #d2ddc7;border-radius:2px;color:inherit;background-color:#ebf6e0;z-index:1}.qq-gallery .qq-upload-retry:hover{background-color:#f7ffec}.qq-gallery .qq-file-info{padding:10px 6px 4px;margin-top:-3px;border-radius:0 0 2px 2px;text-align:left;overflow:hidden}.qq-gallery .qq-file-info .qq-file-name{position:relative}.qq-gallery .qq-upload-file{display:block;margin-right:0;margin-bottom:3px;width:auto;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden}.qq-gallery .qq-upload-spinner{display:inline-block;background:url(loading.gif);position:absolute;left:50%;margin-left:-7px;top:53px;width:15px;height:15px;vertical-align:text-bottom}.qq-gallery .qq-drop-processing{display:block}.qq-gallery .qq-drop-processing-spinner{display:inline-block;background:url(processing.gif);width:24px;height:24px;vertical-align:text-bottom}.qq-gallery .qq-upload-failed-text{display:none;font-style:italic;font-weight:700}.qq-gallery .qq-upload-failed-icon{display:none;width:15px;height:15px;vertical-align:text-bottom}.qq-gallery .qq-upload-fail .qq-upload-failed-text{display:inline}.qq-gallery .qq-upload-retrying .qq-upload-failed-text{display:inline}.qq-gallery .qq-upload-list li.qq-upload-success{background-color:#f2f7ed}.qq-gallery .qq-upload-list li.qq-upload-fail{background-color:#f5eded;box-shadow:0 0 1px 0 red;border:0}.qq-gallery .qq-progress-bar{display:block;background:#00abc7;width:0%;height:15px;border-radius:6px;margin-bottom:3px}.qq-gallery .qq-total-progress-bar{height:25px;border-radius:9px}.qq-gallery .qq-total-progress-bar-container{margin-left:9px;display:inline;float:right;width:500px}.qq-gallery .qq-upload-size{float:left;font-size:11px;color:#929292;margin-bottom:3px;margin-right:0;display:inline-block}.qq-gallery INPUT.qq-edit-filename{position:absolute;opacity:0;z-index:-1}.qq-gallery .qq-upload-file.qq-editable{cursor:pointer;margin-right:20px}.qq-gallery .qq-edit-filename-icon.qq-editable{display:inline-block;cursor:pointer;position:absolute;right:0;top:0}.qq-gallery INPUT.qq-edit-filename.qq-editing{position:static;height:28px;width:90px;width:-moz-available;padding:0 8px;margin-bottom:3px;border:1px solid #ccc;border-radius:2px;font-size:13px;opacity:1}.qq-gallery .qq-edit-filename-icon{display:none;background:url(edit.gif);width:15px;height:15px;vertical-align:text-bottom}.qq-gallery .qq-delete-icon{background:url(trash.gif);width:15px;height:15px;vertical-align:sub;display:inline-block}.qq-gallery .qq-retry-icon{background:url(retry.gif);width:15px;height:15px;vertical-align:sub;display:inline-block;float:none}.qq-gallery .qq-continue-icon{background:url(continue.gif);width:15px;height:15px;vertical-align:sub;display:inline-block}.qq-gallery .qq-pause-icon{background:url(pause.gif);width:15px;height:15px;vertical-align:sub;display:inline-block}.qq-gallery .qq-hide{display:none}.qq-gallery .qq-in-progress .qq-thumbnail-wrapper{opacity:.5}.qq-gallery .qq-thumbnail-wrapper{overflow:hidden;position:relative;height:120px;width:120px}.qq-gallery .qq-thumbnail-selector{border-radius:2px 2px 0 0;bottom:0;top:0;margin:auto;display:block}:root *>.qq-gallery .qq-thumbnail-selector{position:relative;top:50%;transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-webkit-transform:translateY(-50%)}.qq-gallery.qq-uploader DIALOG{display:none}.qq-gallery.qq-uploader DIALOG[open]{display:block}.qq-gallery.qq-uploader DIALOG{display:none}.qq-gallery.qq-uploader DIALOG[open]{display:block}.qq-gallery.qq-uploader DIALOG .qq-dialog-buttons{text-align:center;padding-top:10px}.qq-gallery.qq-uploader DIALOG .qq-dialog-buttons BUTTON{margin-left:5px;margin-right:5px}.qq-gallery.qq-uploader DIALOG .qq-dialog-message-selector{padding-bottom:10px}.qq-gallery .qq-uploader DIALOG::backdrop{background-color:rgba(0,0,0,.7)}/*# sourceMappingURL=fine-uploader-gallery.min.css.map */
--------------------------------------------------------------------------------
/Uploader.Web/wwwroot/scripts/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dtube/ipfs-uploader/7766a5fffb9cf8cdc021ebfbcd27982d35680f97/Uploader.Web/wwwroot/scripts/loading.gif
--------------------------------------------------------------------------------
/Uploader.Web/wwwroot/scripts/retry.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dtube/ipfs-uploader/7766a5fffb9cf8cdc021ebfbcd27982d35680f97/Uploader.Web/wwwroot/scripts/retry.gif
--------------------------------------------------------------------------------
/Uploader.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26124.0
5 | MinimumVisualStudioVersion = 15.0.26124.0
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Uploader.Core", "Uploader.Core\Uploader.Core.csproj", "{0F299D35-AF53-45CB-95FC-3F624A6EF7B0}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Uploader.Web", "Uploader.Web\Uploader.Web.csproj", "{4DD8B942-EE1F-40D1-93F6-C7B9D809851C}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Debug|x64 = Debug|x64
14 | Debug|x86 = Debug|x86
15 | Release|Any CPU = Release|Any CPU
16 | Release|x64 = Release|x64
17 | Release|x86 = Release|x86
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
23 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
25 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Debug|x64.ActiveCfg = Debug|x64
26 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Debug|x64.Build.0 = Debug|x64
27 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Debug|x86.ActiveCfg = Debug|x86
28 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Debug|x86.Build.0 = Debug|x86
29 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
30 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Release|Any CPU.Build.0 = Release|Any CPU
31 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Release|x64.ActiveCfg = Release|x64
32 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Release|x64.Build.0 = Release|x64
33 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Release|x86.ActiveCfg = Release|x86
34 | {0F299D35-AF53-45CB-95FC-3F624A6EF7B0}.Release|x86.Build.0 = Release|x86
35 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Debug|Any CPU.Build.0 = Debug|Any CPU
37 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Debug|x64.ActiveCfg = Debug|x64
38 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Debug|x64.Build.0 = Debug|x64
39 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Debug|x86.ActiveCfg = Debug|x86
40 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Debug|x86.Build.0 = Debug|x86
41 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Release|Any CPU.ActiveCfg = Release|Any CPU
42 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Release|Any CPU.Build.0 = Release|Any CPU
43 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Release|x64.ActiveCfg = Release|x64
44 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Release|x64.Build.0 = Release|x64
45 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Release|x86.ActiveCfg = Release|x86
46 | {4DD8B942-EE1F-40D1-93F6-C7B9D809851C}.Release|x86.Build.0 = Release|x86
47 | EndGlobalSection
48 | EndGlobal
49 |
--------------------------------------------------------------------------------