vollbremsung 0.0.16 → 0.0.17
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.
- checksums.yaml +8 -8
- data/README.md +43 -1
- data/bin/vollbremsung +35 -23
- data/lib/vollbremsung.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWQ2MWJhZGYyMTQyY2FkNDE3ODI3Y2U5ZGQzMzFkYTViNWI0ZDRhMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2IwMjQ1M2VjYjM5N2IwMWIyNWJiNmQxMDg5MTUzZWUwZGFmODM5Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWFmYWE2MDUyYjRlYzgxZDA5MWU5NmM3NGE0Njg5ZWIzN2EzZmY2YmU5MjQ4
|
10
|
+
NjQwZGNjZjkzYWE2NmM1Mzc0NzViNTlkMzgxMjgyYjRiZWU2ZjI5YjBjMTVl
|
11
|
+
N2YwZTBlMDFjMWM1ZWI4ZTU5Mzc5NjZhZmM0Y2Q4MmI0ZTRhZGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmQ1MzUxNzZiODc1YmE3ODQxZTZmN2ZjOGNhOWI2YzU3ODgyZmNlYzI2MjJl
|
14
|
+
NTExZTM1OWU3MDZiMTE4MGI1NWJmMjlkNWViYzkxNWJlZDYwODU5M2NjM2I0
|
15
|
+
Y2U2NWQ1YjZkYjI4YWVlMTk2MTg1MzUyNGVjNWU1MmEyNGU0NmE=
|
data/README.md
CHANGED
@@ -2,4 +2,46 @@
|
|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/vollbremsung)
|
4
4
|
|
5
|
-
Handbrake bulk encoding tool
|
5
|
+
`vollbremsung` is a [Handbrake](https://handbrake.fr) bulk encoding tool, desigend to reencode a file structure to a DLNA enabled TV compatible format comfortably.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Just run ```gem install vollbremsung```
|
10
|
+
|
11
|
+
### Dependencies
|
12
|
+
|
13
|
+
You need to have `ffmpeg`, `ffprobe` and `HandbrakeCLI` (on FreeBSD it's `HandBrakeCLI` if installed from the Portstree) somewhere in your `$PATH`.
|
14
|
+
|
15
|
+
## Usage
|
16
|
+
|
17
|
+
vollbremsung [options] target [target [...]]
|
18
|
+
|
19
|
+
It takes target paths and probes them for suited files. If a target path is a file, it is the only match, if it is a directory all containing files with a matching file type (basically all the non MP4 multimedia types like .avi, .flv, .mov, etc.) are taken. The `--recursive` option will extend the search scope to probe the subfiletree as well. It furthermore analyses each file for its structure utilising [ffmpegs](https://www.ffmpeg.org) `ffprobe` tool in order to extend Handbrakes default preset, processing *all* audio and subtitle tracks, not only the first ones.
|
20
|
+
|
21
|
+
The video streams will be converted to h.264 while audio streams will enjoy the AAC codec. Every DLNA enabled TV should be able to handle these two.
|
22
|
+
|
23
|
+
The `x264-preset ` used is `veryfast` which should be a good tradeoff most of the time. If you want to change this manually, use the `--x264-preset [PRESET]` option.
|
24
|
+
|
25
|
+
The `--delete` and `--move` option allow post processing actions. `delete` will of course remove the source file upon successfull processing, while `move ` will add a `.old` file extension for archive purposes. This is always a good option, just to be sure.
|
26
|
+
|
27
|
+
Additionally, `vollbremsung` can set the MP4 title tag to the filename via the `--title` option, in case the old file title metadata is somewhat misshampen.
|
28
|
+
|
29
|
+
Per default the `m4v` file extension is used to indicate that the files contain video content. It turned out that some TVs can't handle this extension and require plain `mp4`. The `--mp4-ext` option will make `vollbremsung` create `mp4` files. You can of course rename the output files manually as well.
|
30
|
+
|
31
|
+
If you only want to know which files would match for a given target, use the `--list-only` option. No processing will be done, just the matches printed.
|
32
|
+
|
33
|
+
### Complete list of options
|
34
|
+
|
35
|
+
-d, --delete Delete source files after successful encoding
|
36
|
+
--list-only List matching files only. Do not run processing
|
37
|
+
--mp4-ext Use 'mp4' as file extension instead of 'm4v'
|
38
|
+
-m, --move Move source files to <FILENAME>.old after encoding
|
39
|
+
-r, --recursive Process subdirectories recursively as well
|
40
|
+
-t, --title Set the MP4 metadata title tag to the filename
|
41
|
+
--x264-preset PRESET Set the x264-preset. Default is: veryfast
|
42
|
+
--version Show program version information
|
43
|
+
-h, --help Show this message
|
44
|
+
|
45
|
+
## Etymology
|
46
|
+
|
47
|
+
"*vollbremsung*" means "*full application of the brake*" in german.
|
data/bin/vollbremsung
CHANGED
@@ -29,7 +29,7 @@ def escape_glob(s)
|
|
29
29
|
s.gsub(/[\\\{\}\[\]\*\?]/) { |x| "\\"+x }
|
30
30
|
end
|
31
31
|
|
32
|
-
options = {}
|
32
|
+
options = { :extension => "m4v" }
|
33
33
|
|
34
34
|
OptionParser.new do |opts|
|
35
35
|
opts.banner = Vollbremsung::USAGE
|
@@ -52,7 +52,11 @@ OptionParser.new do |opts|
|
|
52
52
|
opts.on("--list-only", "List matching files only. Do not run processing") do |flag|
|
53
53
|
options[:list_only] = true
|
54
54
|
end
|
55
|
-
|
55
|
+
|
56
|
+
opts.on("--mp4-ext", "Use 'mp4' as file extension instead of 'm4v'") do |flag|
|
57
|
+
options[:extension] = "mp4"
|
58
|
+
end
|
59
|
+
|
56
60
|
opts.on("-m", "--move", "Move source files to <FILENAME>.old after encoding") do |flag|
|
57
61
|
options[:move] = true
|
58
62
|
end
|
@@ -64,8 +68,8 @@ OptionParser.new do |opts|
|
|
64
68
|
opts.on("-t", "--title", "Set the MP4 metadata title tag to the filename") do |flag|
|
65
69
|
options[:title] = true
|
66
70
|
end
|
67
|
-
|
68
|
-
opts.on("--x264-preset
|
71
|
+
|
72
|
+
opts.on("--x264-preset PRESET", "Set the x264-preset. Default is: #{Vollbremsung::X264_DEFAULT_PRESET}") do |preset|
|
69
73
|
options[:x264_preset] = preset
|
70
74
|
end
|
71
75
|
|
@@ -95,11 +99,13 @@ if ARGV[0].nil?
|
|
95
99
|
exit 1
|
96
100
|
end
|
97
101
|
|
98
|
-
TARGET_PATH = ARGV[0]
|
102
|
+
#TARGET_PATH = ARGV[0]
|
99
103
|
|
100
|
-
|
101
|
-
|
102
|
-
|
104
|
+
ARGV.each do |target|
|
105
|
+
unless File.exists?(target)
|
106
|
+
puts "The target #{target} does not exist."
|
107
|
+
exit 1
|
108
|
+
end
|
103
109
|
end
|
104
110
|
|
105
111
|
if options[:move] && options[:delete]
|
@@ -126,6 +132,8 @@ unless options[:list_only]
|
|
126
132
|
File.delete 'mkmf.log' if File.exists?('mkmf.log') # find_executable seems to create such file in case executable is not found
|
127
133
|
exit 1
|
128
134
|
end
|
135
|
+
|
136
|
+
File.delete 'mkmf.log' if File.exists?('mkmf.log') # find_executable seems to create such file in case executable is not found
|
129
137
|
end
|
130
138
|
|
131
139
|
|
@@ -136,25 +144,29 @@ end
|
|
136
144
|
|
137
145
|
target_files = []
|
138
146
|
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
147
|
+
scope = options[:recursive] ? "/**/*" : "/*"
|
148
|
+
|
149
|
+
ARGV.each do |target|
|
150
|
+
|
151
|
+
if File.directory?(target)
|
152
|
+
|
153
|
+
log "probing for target files in #{File.absolute_path(target) + scope}"
|
154
|
+
log "files found:"
|
145
155
|
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
156
|
+
Dir[escape_glob(File.absolute_path(target)) + scope].sort.each do |file|
|
157
|
+
unless File.directory?(file)
|
158
|
+
if Vollbremsung::CONVERT_TYPES.include?(File.extname(file).downcase[1..-1])
|
159
|
+
puts "* " + File.absolute_path(file)[File.absolute_path(target).length+1..-1]
|
160
|
+
target_files << file
|
161
|
+
end
|
151
162
|
end
|
152
163
|
end
|
164
|
+
|
165
|
+
else
|
166
|
+
puts "* " + target
|
167
|
+
target_files << File.absolute_path(target)
|
153
168
|
end
|
154
169
|
|
155
|
-
else
|
156
|
-
puts "* " + TARGET_PATH
|
157
|
-
target_files << File.absolute_path(TARGET_PATH)
|
158
170
|
end
|
159
171
|
|
160
172
|
exit if options[:list_only]
|
@@ -195,7 +207,7 @@ target_files.each do |infile|
|
|
195
207
|
File.basename(TARGET_PATH)
|
196
208
|
end
|
197
209
|
|
198
|
-
outfile = "#{infile_path_noext}
|
210
|
+
outfile = "#{infile_path_noext}.#{options[:extension]}"
|
199
211
|
|
200
212
|
log "processing: #{infile_relative_path}"
|
201
213
|
|
data/lib/vollbremsung.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Vollbremsung
|
2
2
|
|
3
|
-
USAGE = "Usage: vollbremsung [options]
|
4
|
-
VERSION = '0.0.
|
3
|
+
USAGE = "Usage: vollbremsung [options] target [target [...]]"
|
4
|
+
VERSION = '0.0.17'
|
5
5
|
CONVERT_TYPES = ['mkv','avi','mov','flv','mpg','wmv','ogm']
|
6
6
|
FFMPEG_OPTIONS = "-map 0 -acodec copy -vcodec copy -scodec copy"
|
7
7
|
X264_DEFAULT_PRESET = "veryfast"
|