From 6d34f6506142d985f30381a0430b63eb2afedb13 Mon Sep 17 00:00:00 2001 From: ablwr Date: Thu, 21 Aug 2014 10:46:09 -0400 Subject: [PATCH] h264 for web command added --- app/assets/javascripts/forms.js | 12 +++++++++++ app/views/forms/_h264_for_web.html.erb | 28 ++++++++++++++++++++++++++ app/views/forms/index.html.erb | 6 ++++++ 3 files changed, 46 insertions(+) create mode 100644 app/views/forms/_h264_for_web.html.erb diff --git a/app/assets/javascripts/forms.js b/app/assets/javascripts/forms.js index f4547fe..17713cc 100644 --- a/app/assets/javascripts/forms.js +++ b/app/assets/javascripts/forms.js @@ -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()) + }); + + }); diff --git a/app/views/forms/_h264_for_web.html.erb b/app/views/forms/_h264_for_web.html.erb new file mode 100644 index 0000000..7c0e213 --- /dev/null +++ b/app/views/forms/_h264_for_web.html.erb @@ -0,0 +1,28 @@ +
+
+
+ Input and Output +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+ +
+
+ Your command line: + +
+
diff --git a/app/views/forms/index.html.erb b/app/views/forms/index.html.erb index 08c1385..2e84e41 100644 --- a/app/views/forms/index.html.erb +++ b/app/views/forms/index.html.erb @@ -27,6 +27,9 @@

  • +
  • +

    +
  • @@ -47,6 +50,9 @@ +