h264 for web command added

This commit is contained in:
ablwr 2014-08-21 10:46:09 -04:00
parent 9c10a0bb52
commit 6d34f65061
3 changed files with 46 additions and 0 deletions

View File

@ -29,6 +29,10 @@ $(document).ready(function() {
$( ".webm_for_web" ).toggle();
});
$( "#show_h264_for_web" ).click(function() {
$( ".h264_for_web" ).toggle();
});
$('#generate').click(function(){
$('#command_line').val("ffmpeg" +
@ -68,6 +72,14 @@ $(document).ready(function() {
$('#webm_output_name').val())
});
$('#h264_for_web_generate').click(function(){
$('#h264_for_web_command_line').val("ffmpeg" +
" -i " + $('#h264_input_name').val() +
" -codec:v libx264 -profile:v high -preset slow -b:v 500k -maxrate 500k -bufsize 1000k -vf scale=-1:480 -threads 0 -codec:a libfdk_aac -b:a 128k " +
$('#h264_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="h264_input_name">Input</label>
<div class="controls">
<input type="text" name="h264_input_name" id="h264_input_name" placeholder="input" />
</div>
</div>
<div class="form-group">
<label class="control-label" for="h264_output_name">Output</label>
<div class="controls">
<input type="text" name="h264_output_name" id="h264_output_name" placeholder="output" />
</div>
</div>
<br/>
<input type="button" class="btn btn-large btn-primary" name="generate" id="h264_for_web_generate" value="Generate" />
</fieldset>
</div>
</div>
<div class="well">
<fieldset>
<legend>Your command line:</legend>
<textarea name="h264_for_web_command_line" id="h264_for_web_command_line" rows="3" cols="100"></textarea>
</fieldset>
</div>

View File

@ -27,6 +27,9 @@
<li>
<div id="show_webm_for_web"><button type="button" class="btn btn-default">Export to webm for web</button></div><br/>
</li>
<li>
<div id="show_h264_for_web"><button type="button" class="btn btn-default">Export to h264 for web</button></div><br/>
</li>
</ul>
</fieldset>
</div>
@ -47,6 +50,9 @@
<div class="webm_for_web" style="display:none;">
<%= render "webm_for_web" %>
</div>
<div class="h264_for_web" style="display:none;">
<%= render "h264_for_web" %>
</div>
<div class="add_audio_track" style="display:none;">
<%= render "add_audio_track" %>
</div>