2012-06-10 21:16:22 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
package require cgi
|
|
|
|
source /mod/webif/lib/setup
|
|
|
|
require ts.class pretty_size
|
|
|
|
|
2013-02-09 22:46:15 +00:00
|
|
|
header
|
2012-06-10 21:16:22 +00:00
|
|
|
|
|
|
|
set rfile [cgi_get file]
|
|
|
|
set ts [ts fetch $rfile]
|
|
|
|
set dir [file dirname $rfile]
|
|
|
|
|
|
|
|
set len [$ts duration 1]
|
|
|
|
|
|
|
|
set esttime $([$ts size] / 5700000)
|
|
|
|
|
|
|
|
puts "
|
|
|
|
<link href=/css/jquery.progressbar.css rel=stylesheet type=text/css />
|
|
|
|
<script type=text/javascript src=/js/jquery.progressbar.js></script>
|
|
|
|
<script type=text/javascript src=strip.js></script>
|
|
|
|
|
|
|
|
<fieldset class=cleft>
|
2012-06-13 21:09:44 +00:00
|
|
|
<legend>Make recordings smaller by removing unecessary frames</legend>
|
2012-06-10 21:16:22 +00:00
|
|
|
|
2012-06-13 21:09:44 +00:00
|
|
|
<p><i>This process will remove freeview EPG data from the recording.<br>
|
|
|
|
These data are not required and can increase the size of the
|
2012-06-10 21:16:22 +00:00
|
|
|
recording file by as much as 20%.<br>
|
|
|
|
Your original recording files will be retained in a folder called _original.
|
|
|
|
</i>
|
|
|
|
|
|
|
|
<table class=keyval cellpadding=5>
|
|
|
|
<tr><th>File:</th><td>$rfile</td></tr>
|
|
|
|
<tr><th>Length:</th><td>[clock format $len -format %T]</td></tr>
|
|
|
|
<tr><th>Size:</th><td>[pretty_size [$ts size]] ([$ts get definition])</td></tr>
|
|
|
|
<tr><th>Time:</th>
|
2012-06-24 20:45:07 +00:00
|
|
|
<td>Shrinking will take around [clock format $esttime -format "%T"]</td></tr>
|
2012-06-11 18:49:56 +00:00
|
|
|
<tr><th>Estimated Saving:</th>
|
|
|
|
<td class=va><span id=analysis class=va>
|
|
|
|
<img class=va src=/img/loading.gif> Analysing file, please wait...
|
|
|
|
</span></td></tr>
|
2012-06-10 21:16:22 +00:00
|
|
|
</table>
|
|
|
|
|
|
|
|
<span class=hidden id=params
|
|
|
|
file=\"[cgi_quote_url $rfile]\"
|
|
|
|
dir=\"[cgi_quote_url $dir]\"
|
|
|
|
></span>
|
|
|
|
|
2012-06-11 18:49:56 +00:00
|
|
|
<div id=stripdiv class=hidden style=\"padding: 1em\">
|
2012-06-24 20:45:07 +00:00
|
|
|
<button id=stripit>Shrink recording</button>
|
2012-06-10 21:16:22 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id=progressdiv class=hidden>
|
2012-06-24 20:45:07 +00:00
|
|
|
Shrinking: <div id=progressbar></div>
|
2012-06-10 21:16:22 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<button id=back class=hidden>Back to media list</button>
|
|
|
|
|
|
|
|
<div id=output class=pre style=\"margin-top: 10px\"></div>
|
|
|
|
</fieldset>
|
|
|
|
"
|
|
|
|
|