diff --git a/app/assets/javascripts/forms.js b/app/assets/javascripts/forms.js index a242521..f4547fe 100644 --- a/app/assets/javascripts/forms.js +++ b/app/assets/javascripts/forms.js @@ -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()) }); -}); \ No newline at end of file + $('#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()) + }); + +}); + + diff --git a/app/views/forms/_webm_for_web.html.erb b/app/views/forms/_webm_for_web.html.erb new file mode 100644 index 0000000..b465828 --- /dev/null +++ b/app/views/forms/_webm_for_web.html.erb @@ -0,0 +1,28 @@ +