strip_audio 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # StripAudio
1
+ # strip_audio
2
2
 
3
- TODO: Write a gem description
3
+ Strips audio from video files.
4
4
 
5
5
  ## Installation
6
6
 
@@ -8,9 +8,27 @@ Install it yourself as:
8
8
 
9
9
  $ gem install strip_audio
10
10
 
11
+ ## Dependency
12
+
13
+ * [ffmpeg](http://www.ffmpeg.org/)
14
+
15
+ ### Mac OSX
16
+
17
+ Install using [homebrew](http://brew.sh/):
18
+
19
+ brew install ffmpeg
20
+
21
+ ### Linux
22
+
23
+ Install using [aptitude](https://wiki.debian.org/Aptitude):
24
+
25
+ sudo apt-get install ffmpeg
26
+
11
27
  ## Usage
12
28
 
13
- strip_audio file.mp4 # will produce file.mp3
29
+ To strip audio from file.mp4 to file.mp3:
30
+
31
+ strip_audio file.mp4
14
32
 
15
33
  ## Todo
16
34
 
@@ -1,15 +1,15 @@
1
1
  module StripAudio
2
2
 
3
- class FfmpegMissing < StandardError
4
- end
3
+ class FfmpegMissing < StandardError
4
+ end
5
5
 
6
- class FfmpegEncodingError < StandardError
7
- end
6
+ class FfmpegEncodingError < StandardError
7
+ end
8
8
 
9
- class InvalidSourceFile < StandardError
10
- end
9
+ class InvalidSourceFile < StandardError
10
+ end
11
11
 
12
- class AudioFileAlreadyExists < StandardError
13
- end
12
+ class AudioFileAlreadyExists < StandardError
13
+ end
14
14
 
15
15
  end
@@ -16,15 +16,15 @@ module StripAudio
16
16
 
17
17
  begin
18
18
  audio_file_exists?( video_file )
19
- rescue Exception => e
19
+ rescue AudioFileAlreadyExists => e
20
20
  puts e.message
21
21
  exit
22
22
  end
23
23
 
24
- o = `ffmpeg -i #{video_file} -ab #{@@options[:bitrate]} -ac 2 -ar 44100 -vn #{audio_file(video_file)} 2>&1`
24
+ o = `ffmpeg -i '#{video_file}' -ab #{@@options[:bitrate]} -ac 2 -ar 44100 -vn '#{audio_file(video_file)}' 2>&1`
25
25
  begin
26
26
  command_output o
27
- rescue Exception => e
27
+ rescue InvalidSourceFile => e
28
28
  puts e.message
29
29
  end
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module StripAudio
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/strip_audio.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["jikkujose@gmail.com"]
11
11
  spec.summary = %q{Strips audio from video files.}
12
12
  spec.description = %q{A simple wrapper for ffmpeg to strip audio from video files.}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/jikkujose/strip_audio/"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strip_audio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -82,7 +82,7 @@ files:
82
82
  - spec/spec_helper.rb
83
83
  - spec/stripper_spec.rb
84
84
  - strip_audio.gemspec
85
- homepage: ''
85
+ homepage: https://github.com/jikkujose/strip_audio/
86
86
  licenses:
87
87
  - MIT
88
88
  post_install_message: