diff --git a/Gemfile.lock b/Gemfile.lock index 1ab1916..75ebb82 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -95,6 +95,7 @@ GEM actionpack (>= 3.0) activesupport (>= 3.0) sprockets (~> 2.8) + sqlite3 (1.3.9) thor (0.19.1) thread_safe (0.3.4) tilt (1.4.1) @@ -121,5 +122,6 @@ DEPENDENCIES sass-rails (~> 4.0.3) sdoc (~> 0.4.0) spring + sqlite3 turbolinks uglifier (>= 1.3.0) diff --git a/app/assets/javascripts/forms.js b/app/assets/javascripts/forms.js index ccfa4be..49c000c 100644 --- a/app/assets/javascripts/forms.js +++ b/app/assets/javascripts/forms.js @@ -12,6 +12,14 @@ $(document).ready(function() { $( ".add_subtitles" ).toggle(); }); + $( "#show_add_audio_track" ).click(function() { + $( ".add_audio_track" ).toggle(); + }); + + $( "#show_remove_audio_track" ).click(function() { + $( ".remove_audio_track" ).toggle(); + }); + $('#generate').click(function(){ $('#command_line').val("ffmpeg" + " -i " + $('#input_name').val() + @@ -29,10 +37,18 @@ $(document).ready(function() { }); $('#add_subtitles_generate').click(function(){ - $('#command_line').val("ffmpeg" + - " -i " + $('#input_name').val() + - " " + $('#output_name').val()) + $('#subtitles_command_line').val("ffmpeg" + + " -i " + $('#subtitles_input_name').val() + " -vf subtitles=" + $('#subtitles_name').val() + " " + $('#subtitles_output_name').val()) }); + $('#add_audio_track_generate').click(function(){ + $('#add_audio_track_command_line').val("ffmpeg" + + " -i " + $('#audio_input_name').val() + " -i " + $('#audio_track_name').val() + " " + $('#audio_output_name').val()) + }); + + $('#remove_audio_track_generate').click(function(){ + $('#remove_audio_track_command_line').val("ffmpeg" + + " -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 diff --git a/app/views/forms/_add_audio_track.html.erb b/app/views/forms/_add_audio_track.html.erb new file mode 100644 index 0000000..3989810 --- /dev/null +++ b/app/views/forms/_add_audio_track.html.erb @@ -0,0 +1,51 @@ +
+
+
+ Input +
+ +
+ +
+
+
+
+
+
+ +
+
+ Audio track +
+ +
+ +
+
+
+
+ +
+
+ Output +
+ +
+ +
+
+
+
+
+ +
+
+ +
+
+ Your command line: + +
+
+ + \ No newline at end of file diff --git a/app/views/forms/_add_subtitles.html.erb b/app/views/forms/_add_subtitles.html.erb index 4d23e1c..106debf 100644 --- a/app/views/forms/_add_subtitles.html.erb +++ b/app/views/forms/_add_subtitles.html.erb @@ -1,38 +1,50 @@ -
-
-
- Input -
- -
- -
-
-
-
-
-
- +
- Output + Input
- +
- +

-
+
-
-
- Your command line: - -
-
+
+
+ Subtitles file (.srt) +
+ +
+ +
+
+
+
+
+
+ Output +
+ +
+ +
+
+
+
+
+ +
+
+ +
+
+ Your command line: + +
+
- \ No newline at end of file diff --git a/app/views/forms/_display_info.html.erb b/app/views/forms/_display_info.html.erb index f95eef8..d4783f4 100644 --- a/app/views/forms/_display_info.html.erb +++ b/app/views/forms/_display_info.html.erb @@ -1,24 +1,24 @@ -
-
-
- Input -
- -
- -
-
-
- -
+
+
+
+ Input +
+ +
+ +
-
+
+ + +
+
-
-
- Your command line: - -
-
+
+
+ Your command line: + +
+
-
\ No newline at end of file + \ No newline at end of file diff --git a/app/views/forms/_remove_audio_track.html.erb b/app/views/forms/_remove_audio_track.html.erb new file mode 100644 index 0000000..90d7ac8 --- /dev/null +++ b/app/views/forms/_remove_audio_track.html.erb @@ -0,0 +1,51 @@ +
+
+
+ Input +
+ +
+ +
+
+
+
+
+
+ +
+
+ Subtitles file (.srt) +
+ +
+ +
+
+
+
+ +
+
+ Output +
+ +
+ +
+
+
+
+
+ +
+
+ +
+
+ Your command line: + +
+
+ + \ No newline at end of file diff --git a/app/views/forms/_web.html.erb b/app/views/forms/_web.html.erb index 9d44936..74649e3 100644 --- a/app/views/forms/_web.html.erb +++ b/app/views/forms/_web.html.erb @@ -1,31 +1,31 @@ -
- -
-
- Input and Output -
- -
- -
-
-
- -
- -
-
-
- -
+
+ +
+
+ Input and Output +
+ +
+
- -
-
- Your command line: - -
+
+ +
+ +
+
+ +
+
+
-
\ No newline at end of file +
+
+ Your command line: + +
+
+ +
\ No newline at end of file diff --git a/app/views/forms/index.html.erb b/app/views/forms/index.html.erb index 6436624..ad68873 100644 --- a/app/views/forms/index.html.erb +++ b/app/views/forms/index.html.erb @@ -1,24 +1,31 @@
-

➺ ffmproviser ❥

+
+

➺ ffmproviser ❥

+
What do you want to do? -

Select from the following.

+

Select from the following.

+
  • Display info
  • -
  • -
    Export for web
    -
  • Add subtitles track
  • -
  • Remove audio track
  • -
  • Add audio track
  • +
  • +
    Remove audio track
    +
  • +
  • +
    Add audio track (replace)
    +
  • +
  • +
    Export for web
    +
@@ -33,4 +40,10 @@ + +
diff --git a/app/views/forms/remove_audio_track.html.erb b/app/views/forms/remove_audio_track.html.erb new file mode 100644 index 0000000..8d37c3d --- /dev/null +++ b/app/views/forms/remove_audio_track.html.erb @@ -0,0 +1,51 @@ +
+
+
+ Input +
+ +
+ +
+
+
+
+
+
+ +
+
+ Audio track +
+ +
+ +
+
+
+
+ +
+
+ Output +
+ +
+ +
+
+
+
+
+ +
+
+ +
+
+ Your command line: + +
+
+ + \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 78f206b..39f703d 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -18,7 +18,8 @@ <%= yield %> -