Revert DRM Video Resolution
This commit is contained in:
parent
b12ef22406
commit
8578c40c20
@ -604,28 +604,31 @@ public class DownloadHelper : IDownloadHelper
|
|||||||
decKey = decryptionKey.Substring(pos1 + 1);
|
decKey = decryptionKey.Substring(pos1 + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int? streamIndex = await GetVideoStreamIndexFromMpd(url, policy, signature, kvp, downloadConfig.DownloadVideoResolution);
|
int streamIndex = 0;
|
||||||
|
string tempFilename = $"{folder}{path}/{filename}_source.mp4";
|
||||||
|
|
||||||
if (streamIndex == null)
|
//int? streamIndex = await GetVideoStreamIndexFromMpd(url, policy, signature, kvp, downloadConfig.DownloadVideoResolution);
|
||||||
throw new Exception($"Could not find video stream for resolution {downloadConfig.DownloadVideoResolution}");
|
|
||||||
|
|
||||||
string tempFilename;
|
//if (streamIndex == null)
|
||||||
|
// throw new Exception($"Could not find video stream for resolution {downloadConfig.DownloadVideoResolution}");
|
||||||
|
|
||||||
switch (downloadConfig.DownloadVideoResolution)
|
//string tempFilename;
|
||||||
{
|
|
||||||
case VideoResolution.source:
|
//switch (downloadConfig.DownloadVideoResolution)
|
||||||
tempFilename = $"{folder}{path}/{filename}_source.mp4";
|
//{
|
||||||
break;
|
// case VideoResolution.source:
|
||||||
case VideoResolution._240:
|
// tempFilename = $"{folder}{path}/{filename}_source.mp4";
|
||||||
tempFilename = $"{folder}{path}/{filename}_240.mp4";
|
// break;
|
||||||
break;
|
// case VideoResolution._240:
|
||||||
case VideoResolution._720:
|
// tempFilename = $"{folder}{path}/{filename}_240.mp4";
|
||||||
tempFilename = $"{folder}{path}/{filename}_720.mp4";
|
// break;
|
||||||
break;
|
// case VideoResolution._720:
|
||||||
default:
|
// tempFilename = $"{folder}{path}/{filename}_720.mp4";
|
||||||
tempFilename = $"{folder}{path}/{filename}_source.mp4";
|
// break;
|
||||||
break;
|
// default:
|
||||||
}
|
// tempFilename = $"{folder}{path}/{filename}_source.mp4";
|
||||||
|
// break;
|
||||||
|
//}
|
||||||
|
|
||||||
string parameters = $"-cenc_decryption_key {decKey} -headers \"Cookie:CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {sess} Origin: https://onlyfans.com Referer: https://onlyfans.com User-Agent: {user_agent}\" -y -i \"{url}\" -map 0:v:{streamIndex} -map 0:a? -codec copy \"{tempFilename}\"";
|
string parameters = $"-cenc_decryption_key {decKey} -headers \"Cookie:CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {sess} Origin: https://onlyfans.com Referer: https://onlyfans.com User-Agent: {user_agent}\" -y -i \"{url}\" -map 0:v:{streamIndex} -map 0:a? -codec copy \"{tempFilename}\"";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user