webm for web added

This commit is contained in:
ablwr 2014-08-20 20:56:51 -04:00
parent c887b8fccd
commit 380fabf494
3 changed files with 58 additions and 9 deletions

View File

@ -1,8 +1,8 @@
$(document).ready(function() {
$( ".reload" ).click(function() {
location.reload();
});
$( ".reload" ).click(function() {
location.reload();
});
$( "#show_display_info" ).click(function() {
@ -25,6 +25,10 @@ $(document).ready(function() {
$( ".remove_audio_track" ).toggle();
});
$( "#show_webm_for_web" ).click(function() {
$( ".webm_for_web" ).toggle();
});
$('#generate').click(function(){
$('#command_line').val("ffmpeg" +
@ -57,4 +61,13 @@ $(document).ready(function() {
" -i " + $('#r_audio_input_name').val() + " " + $('#r_audio_track_name').val() + " -vcodec copy -an " + $('#r_audio_output_name').val())
});
});
$('#webm_for_web_generate').click(function(){
$('#webm_for_web_command_line').val("ffmpeg" +
" -i " + $('#webm_input_name').val() +
" -codec:v libvpx -quality good -cpu-used 0 -b:v 500k -qmin 10 -qmax 42 -maxrate 500k -bufsize 1000k -threads 4 -vf scale=-1:480 -codec:a libvorbis -b:a 128k " +
$('#webm_output_name').val())
});
});

View File

@ -0,0 +1,28 @@
<div id="file_names">
<div class="well">
<fieldset>
<legend>Input and Output</legend>
<div class="form-group">
<label class="control-label" for="webm_input_name">Input</label>
<div class="controls">
<input type="text" name="webm_input_name" id="webm_input_name" placeholder="input" />
</div>
</div>
<div class="form-group">
<label class="control-label" for="webm_output_name">Output</label>
<div class="controls">
<input type="text" name="webm_output_name" id="webm_output_name" placeholder="output" />
</div>
</div>
<br/>
<input type="button" class="btn btn-large btn-primary" name="generate" id="webm_for_web_generate" value="Generate" />
</fieldset>
</div>
</div>
<div class="well">
<fieldset>
<legend>Your command line:</legend>
<textarea name="webm_for_web_command_line" id="webm_for_web_command_line" rows="3" cols="100"></textarea>
</fieldset>
</div>

View File

@ -1,7 +1,8 @@
<div class="container">
<div class="text-center">
<h1>➺ ffmproviser ❥</h1>
</div>
<div class="container">
<div class="text-center">
<h1>➺ ffmproviser ❥</h1>
</div>
<!-- form begins -->
@ -23,8 +24,11 @@
<li>
<div id="show_add_audio_track"><button type="button" class="btn btn-default">Add audio track (replace)</button></div><br/>
</li>
<li>
<!-- <li>
<div id="show_web"><button type="button" class="btn btn-default">Export for web</button></div><br/>
</li> -->
<li>
<div id="show_webm_for_web"><button type="button" class="btn btn-default">Export to webm for web</button></div><br/>
</li>
</ul>
</fieldset>
@ -46,6 +50,10 @@
<div class="add_audio_track" style="display:none;">
<%= render "add_audio_track" %>
</div>
<div class="webm_for_web" style="display:none;">
<%= render "webm_for_web" %>
</div>
</div>
<div class="text-center">