√(noham)² 11972256b8 eng
2024-07-01 23:58:43 +02:00

404 lines
21 KiB
HTML

<!DOCTYPE html>
<meta lang="en">
<head>
<meta charset="UTF-8">
<title>Command Generator</title>
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,700;1,400&amp;display=swap.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="button-style.css">
</head>
<script type="module" src="generator.js"></script>
<script type="module" src="darkmode.js"></script>
<script>
function insert(pos, id, placeholder) {
let input = document.createElement('input')
input.type = 'text'
input.id = id
input.placeholder = placeholder
input.oninput = () => { generate('generator_body') }
document.querySelector(pos).appendChild(input)
}
function removeLast(pos) {
console.log(document.querySelector(pos).lastChild.tagName);
if (document.querySelector(pos).lastChild.tagName != 'INPUT') {
return
}
document.querySelector(pos).removeChild(document.querySelector(pos).lastChild)
}
</script>
<body class="dark">
<div id="DarkMode">
<div class="container-switch">
<div class="switch">
<div class="toggle-button">
<div class="toggle"></div>
<div class="moon-mask"></div>
<div class="circles-wrapper">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
</div>
</div>
</div>
<div class="text">
</div>
</div>
</div>
<section class="container">
<!-- <a class="link" href="./cli2re.html">CLI命令转RE</a> -->
<header>Generator</header>
<div id="output"></div>
<form action="#" class="form" id="generator_body">
<div class="column">
<div class="input-box">
<label for="input">Url</label>
<input id="input" type="text" placeholder="Input Url or File" required>
</div>
<div class="input-box">
<label>save-name</label>
<input id="save-name" type="text" placeholder="Set output filename">
</div>
<div class="input-box">
<label>base-url</label>
<input id="base-url" type="text" placeholder="Set BaseURL">
</div>
</div>
<div class="column">
<div class="input-box">
<label>save-dir</label>
<input id="save-dir" type="text" placeholder="Set output directory">
</div>
<div class="input-box">
<label>tmp-dir</label>
<input id="tmp-dir" type="text" placeholder="Set temporary file directory">
</div>
<div class="input-box">
<label>mux-import</label>
<input id="mux-import" type="text" placeholder="When MuxAfterDone enabled, allow to import local media files">
</div>
</div>
<div class="column">
<div class="input-box">
<label>thread-count</label>
<input id="thread-count" type="text" placeholder="Set download thread count [default: 10]" defalut="10">
</div>
<div class="input-box">
<label>download-retry-count</label>
<input id="download-retry-count" type="text" placeholder="The number of retries when download segment error [default: 3]" defalut="3">
</div>
</div>
<div class="column">
<div class="input-box">
<label>max-speed</label>
<input id="max-speed" type="text" placeholder="Set speed limit, Mbps or Kbps, for example: 15M 100K." defalut="">
</div>
<div class="input-box">
<label>ffmpeg-binary-path</label>
<input id="ffmpeg-binary-path" type="text" placeholder="Full path to the ffmpeg binary, like C:\Tools\ffmpeg.exe">
</div>
</div>
<div class="column">
<div class="input-box">
<label>live-take-count</label>
<input id="live-take-count" type="text" placeholder="Manually set the number of segments downloaded for the first time when recording live [default: 16]">
</div>
<div class="input-box">
<label>urlprocessor-args</label>
<input id="urlprocessor-args" type="text" placeholder="Give these arguments to the URL Processors.">
</div>
</div>
<div class="column">
<div class="input-box">
<label>key-text-file</label>
<input id="key-text-file" type="text" placeholder="Set the kid-key file, the program will search the KEY with KID from the file.(Very large file are not recommended)">
</div>
<div class="input-box">
<label>decryption-binary-path</label>
<input id="decryption-binary-path" type="text" placeholder="Full path to the tool used for MP4 decryption, like C:\Tools\mp4decrypt.exe">
</div>
</div>
<div class="column">
<div class="input-box">
<label>mux-after-done</label>
<input id="mux-after-done" type="text" placeholder="When all works is done, try to mux the downloaded streams">
</div>
<div class="input-box">
<label>custom-hls-key</label>
<input id="custom-hls-key" type="text" placeholder="Set the HLS decryption key. Can be file, HEX or Base64">
</div>
</div>
<div class="column">
<div class="input-box">
<label>custom-hls-iv</label>
<input id="custom-hls-iv" type="text" placeholder="Set the HLS decryption iv. Can be file, HEX or Base64">
</div>
<div class="input-box">
<label>custom-proxy</label>
<input id="custom-proxy" type="text" placeholder="Set web request proxy, like http://127.0.0.1:8888">
</div>
</div>
<div class="column">
<div class="input-box">
<label>custom-range</label>
<input id="custom-range" type="text" placeholder="Download only part of the segments">
</div>
<div class="input-box">
<label>task-start-at</label>
<input id="task-start-at" type="text" placeholder="Task execution will not start before this time: yyyyMMddHHmmss">
</div>
</div>
<div class="column">
<div class="input-box">
<label>live-record-limit</label>
<input id="live-record-limit" type="text" placeholder="Recording time limit when recording live: HH:mm:ss">
</div>
<div class="input-box">
<label>live-wait-time</label>
<input id="live-wait-time" type="text" placeholder="Manually set the live playlist refresh interval">
</div>
</div>
<div class="column">
<div class="input-box">
<label>ad-keyword</label>
<input id="ad-keyword" type="text" placeholder="Set URL keywords (regular expressions) for AD segments">
</div>
</div>
<div class="column">
<div class="input-box">
<label>select-video</label>
<input id="select-video" type="text" placeholder="Select video streams by regular expressions">
</div>
<div class="input-box">
<label>select-audio</label>
<input id="select-audio" type="text" placeholder="Select audios streams by regular expressions">
</div>
<div class="input-box">
<label>select-subtitle</label>
<input id="select-subtitle" type="text" placeholder="Select subtitle streams by regular expressions">
</div>
</div>
<div class="column">
<div class="input-box">
<label>drop-video</label>
<input id="drop-video" type="text" placeholder="Drop video streams by regular expressions">
</div>
<div class="input-box">
<label>drop-audio</label>
<input id="drop-audio" type="text" placeholder="Drop aduio streams by regular expressions">
</div>
<div class="input-box">
<label>drop-subtitle</label>
<input id="drop-subtitle" type="text" placeholder="Drop subtitle streams by regular expressions">
</div>
</div>
<div class="column">
<div id="header" class="input-box ">
<div class="row">
<label>header</label><label class="button"
onclick="insert('#header','header','Pass custom header(s) to server: -H &#x0022;Cookie: mycookie&#x0022; -H &#x0022;User-Agent: iOS&#x0022;')">+</label><label
class="button" onclick="removeLast('#header')">-</label>
<input type="text" id="header"
placeholder="Pass custom header(s) to server: -H &#x0022;Cookie: mycookie&#x0022; -H &#x0022;User-Agent: iOS&#x0022;">
</div>
</div>
</div>
<div class="column">
<div id="key" class="input-box ">
<div class="row">
<label>key</label><label class="button"
onclick="insert('#key','key','Pass decryption key(s) to mp4decrypt/shaka-packager. format: --key KID1:KEY1 --key KID2:KEY2')">+</label><label
class="button" onclick="removeLast('#key')">-</label>
<input type="text" id="key"
placeholder="Pass decryption key(s) to mp4decrypt/shaka-packager. format: --key KID1:KEY1 --key KID2:KEY2">
</div>
</div>
</div>
<div class="column">
<div class="input-box">
<label for="log-level">log-level</label>
<div class="description">Set log level</div>
<div class="select-box">
<select id="log-level">
<option value="">INFO</option>
<option>DEBUG</option>
<option>WARN</option>
<option>ERROR</option>
<option>OFF</option>
</select>
</div>
</div>
<div class="input-box">
<label for="custom-hls-method">custom-hls-method</label>
<div class="description">Set HLS encryption method</div>
<div class="select-box">
<select id="custom-hls-method">
<option value="">AUTO</option>
<option>AES_128</option>
<option>AES_128_ECB</option>
<option>CENC</option>
<option>CHACHA20</option>
<option>NONE</option>
<option>SAMPLE_AES</option>
<option>SAMPLE_AES_CTR</option>
<option>UNKNOWN</option>
</select>
</div>
</div>
<div class="input-box">
<label for="sub-format">sub-format</label>
<div class="description">Subtitle output format</div>
<div class="select-box">
<select id="sub-format">
<option value="">SRT</option>
<option>VTT</option>
</select>
</div>
</div>
<div class="input-box">
<label for="ui-language">ui-language</label>
<div class="description">Set UI language</div>
<div class="select-box">
<select id="ui-language">
<option value="">auto</option>
<option>zh-CN</option>
<option>zh-TW</option>
<option>en-US</option>
</select>
</div>
</div>
</div>
<div class="check-box">
<div class="check-option ">
<div class="check ">
<div>
<input type="checkbox" id="no-log" />
<label for="no-log">no-log</label>
<div class="description">Disable log file output</div>
</div>
<div>
<input type="checkbox" id="auto-select" />
<label for="auto-select">auto-select</label>
<div class="description">Automatically selects the best tracks of all types</div>
</div>
<div>
<input type="checkbox" id="skip-merge" />
<label for="skip-merge">skip-merge</label>
<div class="description">Skip segments merge</div>
</div>
<div>
<input type="checkbox" id="skip-download" />
<label for="skip-download">skip-download</label>
<div class="description">Skip download</div>
</div>
<div>
<input type="checkbox" id="check-segments-count" checked default="true" />
<label for="check-segments-count">check-segments-count</label>
<div class="description"> Check if the actual number of segments downloaded matches the expected number </div>
</div>
<div>
<input type="checkbox" id="binary-merge" />
<label for="binary-merge">binary-merge</label>
<div class="description">Binary merge</div>
</div>
<div>
<input type="checkbox" id="use-ffmpeg-concat-demuxer" />
<label for="use-ffmpeg-concat-demuxer">use-ffmpeg-concat-demuxer</label>
<div class="description">When merging with ffmpeg, use the concat demuxer instead of the concat protocol</div>
</div>
<div>
<input type="checkbox" id="del-after-done" checked default="true" />
<label for="del-after-done">del-after-done</label>
<div class="description">Delete temporary files when done </div>
</div>
<div>
<input type="checkbox" id="no-date-info" />
<label for="no-date-info">no-date-info</label>
<div class="description">Date information is not written during muxing</div>
</div>
<div>
<input type="checkbox" id="write-meta-json" default="true" checked />
<label for="write-meta-json">write-meta-json</label>
<div class="description">Write meta json after parsed</div>
</div>
<div>
<input type="checkbox" id="append-url-params" />
<label for="append-url-params">append-url-params</label>
<div class="description">Add Params of input Url to segments, useful for some websites, such as kakao.com</div>
</div>
<div>
<input type="checkbox" id="concurrent-download" />
<label for="concurrent-download">concurrent-download</label>
<div class="description">Concurrently download the selected audio, video and subtitles</div>
</div>
<div>
<input type="checkbox" id="sub-only" />
<label for="sub-only">sub-only</label>
<div class="description">Select only subtitle tracks</div>
</div>
<div>
<input type="checkbox" id="auto-subtitle-fix" checked default="true" />
<label for="auto-subtitle-fix">auto-subtitle-fix</label>
<div class="description">Automatically fix subtitles </div>
</div>
<div>
<input type="checkbox" id="use-shaka-packager" />
<label for="use-shaka-packager">use-shaka-packager</label>
<div class="description">Use shaka-packager instead of mp4decrypt to decrypt</div>
</div>
<div>
<input type="checkbox" id="mp4-real-time-decryption" />
<label for="mp4-real-time-decryption">mp4-real-time-decryption</label>
<div class="description">Decrypt MP4 segments in real time</div>
</div>
<div>
<input type="checkbox" id="use-system-proxy" checked default="true" />
<label for="use-system-proxy">use-system-proxy</label>
<div class="description">Use system default proxy </div>
</div>
<div>
<input type="checkbox" id="live-perform-as-vod" />
<label for="live-perform-as-vod">live-perform-as-vod</label>
<div class="description">Download live streams as vod</div>
</div>
<div>
<input type="checkbox" id="live-real-time-merge" />
<label for="live-real-time-merge">live-real-time-merge</label>
<div class="description">Real-time merge into file when recording live</div>
</div>
<div>
<input type="checkbox" id="live-keep-segments" checked default="true" />
<label for="live-keep-segments">live-keep-segments</label>
<div class="description">Keep segments when recording a live (liveRealTimeMerge enabled) </div>
</div>
<div>
<input type="checkbox" id="live-pipe-mux" />
<label for="live-pipe-mux">live-pipe-mux</label>
<div class="description">Real-time muxing to TS file through pipeline + ffmpeg (liveRealTimeMerge enabled)</div>
</div>
<div>
<input type="checkbox" id="live-fix-vtt-by-audio" />
<label for="live-fix-vtt-by-audio">live-fix-vtt-by-audio</label>
<div class="description">Correct VTT sub by reading the start time of the audio file </div>
</div>
</div>
</div>
</div>
<input type="submit" class="button" value="Generate" onclick="generate('generator_body');return true" />
</form>
</section>
</body>