depix 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/README.rdoc +39 -5
- data/Rakefile +1 -1
- data/bin/depix-describe +6 -0
- data/bin/depix_describe +3 -1
- data/depix.gemspec +8 -4
- data/lib/depix.rb +1 -1
- data/lib/depix/compact_structs.rb +8 -2
- data/test/test_depix.rb +23 -1
- data/test/test_describe.rb +7 -0
- metadata +73 -18
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
|
1
|
+
Film scans and images are usualy shoved about in http://en.wikipedia.org/wiki/Digital_Picture_Exchange files.
|
2
|
+
These files embed a massive amount of metadata which can be used to automatically catalog and search in big
|
3
|
+
file collections (and searching is essential since a complete feature film will run well into tens of thousands
|
4
|
+
of files). Reading this metadata can easily help with cumbersome tasks like sorting DPX files per reel/timecode,
|
5
|
+
resolution, selective copying/processing and such daily tasks.
|
2
6
|
|
3
|
-
|
7
|
+
Additionally, **depix** supports editing of DPX metadata without the need to copy the file over (since files can
|
8
|
+
be big). The metadata gets modified in-place without any copy operations, which is especially helpful when operating across a network.
|
4
9
|
|
5
|
-
== DESCRIPTION:
|
6
|
-
|
7
|
-
Read and write DPX file metadata
|
8
10
|
|
9
11
|
== SYNOPSIS:
|
10
12
|
|
@@ -35,6 +37,34 @@ for a long description or
|
|
35
37
|
|
36
38
|
for a short description.
|
37
39
|
|
40
|
+
$depix_describe ~/Desktop/Storm/E036/E036_L005.0007.dpx
|
41
|
+
Describing DPX /Users/julik/Desktop/Storm/E036/E036_L005.0007.dpx. Empty elements are omitted.
|
42
|
+
===================================================
|
43
|
+
File information Endianness (SDPX is big endian) SDPX
|
44
|
+
Offset to image data in bytes 8192
|
45
|
+
Version of header format V1.0
|
46
|
+
Total image size in bytes 9641984
|
47
|
+
Whether the basic headers stay the same through the sequence (1 means they do) 1
|
48
|
+
Generic header length 1664
|
49
|
+
Industry header length 384
|
50
|
+
User header length 6144
|
51
|
+
Original filename E036_L005.0007.dpx
|
52
|
+
Creation 15 2009:02:13:11:19:37+10
|
53
|
+
Creator application ARRISCAN077
|
54
|
+
Project name De_Storm_VFX
|
55
|
+
..... lots of info...
|
56
|
+
|
57
|
+
|
58
|
+
Synthetic properties
|
59
|
+
============
|
60
|
+
keycode : 02 05 32 173388 6668
|
61
|
+
component_type : RGB
|
62
|
+
colorimetric : UserDefined
|
63
|
+
aspect : 1.00
|
64
|
+
le? : false
|
65
|
+
time_code : 03:38:02:01
|
66
|
+
flame_reel : 000005
|
67
|
+
|
38
68
|
If you have a file that does not import into some application you could run "fix headers" on it to comb
|
39
69
|
out invalid data (or data some systems do not approve of). To do so, run depix_fix_headers. Note that the files
|
40
70
|
will be modified in-place
|
@@ -51,6 +81,10 @@ or for a whole sequence - just supply the -s flag and pass one file
|
|
51
81
|
Autodesk IFFS systems write the reel name for the file to the orientation.device field, some scanners write it into user data.
|
52
82
|
Currently unpacking slots which contain invalid reals and ints will yield the maximum possible value for the type
|
53
83
|
|
84
|
+
Scanning tens of thousands of files is slow, not because Ruby is slow per se but because the disk is constantly
|
85
|
+
on seek. It is recommended to **cache** the whole bulk of your metadata objects for later reuse, which is perfectly
|
86
|
+
easy since Depix objects are serializable.
|
87
|
+
|
54
88
|
== REQUIREMENTS:
|
55
89
|
|
56
90
|
* timecode gem (sudo gem install timecode)
|
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ Jeweler::Tasks.new do |gem|
|
|
6
6
|
gem.version = Depix::VERSION
|
7
7
|
gem.name = "depix"
|
8
8
|
gem.summary = "Read and write DPX file headers"
|
9
|
-
gem.description = "
|
9
|
+
gem.description = "Allows you to read and edit DPX file headers parsed into Ruby objects"
|
10
10
|
gem.email = "me@julik.nl"
|
11
11
|
gem.homepage = "http://guerilla-di.org/depix"
|
12
12
|
gem.authors = ["Julik Tarkhanov"]
|
data/bin/depix-describe
ADDED
data/bin/depix_describe
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require File.dirname(__FILE__) + '/../lib/depix'
|
4
4
|
require 'optparse'
|
5
|
+
require "update_hints"
|
5
6
|
|
6
7
|
options = {}
|
7
8
|
OptionParser.new do |opts|
|
@@ -32,4 +33,5 @@ ARGV.each do | file |
|
|
32
33
|
rescue Depix::InvalidHeader
|
33
34
|
puts " - Invalid header data"
|
34
35
|
end
|
35
|
-
end
|
36
|
+
end
|
37
|
+
UpdateHints.version_check("depix", Depix::VERSION)
|
data/depix.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "depix"
|
8
|
-
s.version = "3.0.
|
8
|
+
s.version = "3.0.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Julik Tarkhanov"]
|
12
|
-
s.date = "
|
13
|
-
s.description = "
|
12
|
+
s.date = "2012-07-16"
|
13
|
+
s.description = "Allows you to read and edit DPX file headers parsed into Ruby objects"
|
14
14
|
s.email = "me@julik.nl"
|
15
15
|
s.executables = ["depix_describe", "depix_fix_headers"]
|
16
16
|
s.extra_rdoc_files = [
|
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
"History.txt",
|
26
26
|
"README.rdoc",
|
27
27
|
"Rakefile",
|
28
|
+
"bin/depix-describe",
|
28
29
|
"bin/depix_describe",
|
29
30
|
"bin/depix_fix_headers",
|
30
31
|
"depix.gemspec",
|
@@ -57,7 +58,7 @@ Gem::Specification.new do |s|
|
|
57
58
|
s.homepage = "http://guerilla-di.org/depix"
|
58
59
|
s.licenses = ["MIT"]
|
59
60
|
s.require_paths = ["lib"]
|
60
|
-
s.rubygems_version = "1.8.
|
61
|
+
s.rubygems_version = "1.8.24"
|
61
62
|
s.summary = "Read and write DPX file headers"
|
62
63
|
|
63
64
|
if s.respond_to? :specification_version then
|
@@ -68,6 +69,7 @@ Gem::Specification.new do |s|
|
|
68
69
|
s.add_runtime_dependency(%q<progressbar>, ["~> 0.9"])
|
69
70
|
s.add_runtime_dependency(%q<sequencer>, ["~> 1.0"])
|
70
71
|
s.add_runtime_dependency(%q<term-ansicolor>, [">= 0"])
|
72
|
+
s.add_runtime_dependency(%q<update_hints>, [">= 0"])
|
71
73
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
72
74
|
s.add_development_dependency(%q<rake>, [">= 0"])
|
73
75
|
s.add_development_dependency(%q<cli_test>, ["~> 1.0"])
|
@@ -76,6 +78,7 @@ Gem::Specification.new do |s|
|
|
76
78
|
s.add_dependency(%q<progressbar>, ["~> 0.9"])
|
77
79
|
s.add_dependency(%q<sequencer>, ["~> 1.0"])
|
78
80
|
s.add_dependency(%q<term-ansicolor>, [">= 0"])
|
81
|
+
s.add_dependency(%q<update_hints>, [">= 0"])
|
79
82
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
80
83
|
s.add_dependency(%q<rake>, [">= 0"])
|
81
84
|
s.add_dependency(%q<cli_test>, ["~> 1.0"])
|
@@ -85,6 +88,7 @@ Gem::Specification.new do |s|
|
|
85
88
|
s.add_dependency(%q<progressbar>, ["~> 0.9"])
|
86
89
|
s.add_dependency(%q<sequencer>, ["~> 1.0"])
|
87
90
|
s.add_dependency(%q<term-ansicolor>, [">= 0"])
|
91
|
+
s.add_dependency(%q<update_hints>, [">= 0"])
|
88
92
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
89
93
|
s.add_dependency(%q<rake>, [">= 0"])
|
90
94
|
s.add_dependency(%q<cli_test>, ["~> 1.0"])
|
data/lib/depix.rb
CHANGED
@@ -5,7 +5,8 @@ module Depix
|
|
5
5
|
:magic,
|
6
6
|
:ditto_key,
|
7
7
|
:filename,
|
8
|
-
:timestamp
|
8
|
+
:timestamp,
|
9
|
+
:image_offset
|
9
10
|
)
|
10
11
|
|
11
12
|
|
@@ -14,7 +15,12 @@ module Depix
|
|
14
15
|
:count,
|
15
16
|
:frame_position,
|
16
17
|
:frame_id,
|
17
|
-
:slate
|
18
|
+
:slate,
|
19
|
+
:id,
|
20
|
+
:type,
|
21
|
+
:prefix,
|
22
|
+
:sequence_extent,
|
23
|
+
:frame_rate
|
18
24
|
)
|
19
25
|
|
20
26
|
CompactOrientation = OrientationInfo.only(
|
data/test/test_depix.rb
CHANGED
@@ -88,7 +88,29 @@ class ReaderTest < Test::Unit::TestCase
|
|
88
88
|
|
89
89
|
def test_parsed_properly_using_compact_structs
|
90
90
|
file = SAMPLE_DPX
|
91
|
-
|
91
|
+
|
92
|
+
parsed = Depix.from_file(file, compact = true)
|
93
|
+
assert_equal "SDPX", parsed.file.magic
|
94
|
+
assert_equal 8192, parsed.file.image_offset
|
95
|
+
assert_equal 1, parsed.file.ditto_key
|
96
|
+
assert_equal "E012_P001_L000002_lin.0001.dpx", parsed.file.filename
|
97
|
+
assert_equal "2008:12:19:01:18:37:CEST", parsed.file.timestamp
|
98
|
+
|
99
|
+
assert_equal "E012", parsed.orientation.device #- this is where Flame writes the reel
|
100
|
+
|
101
|
+
assert_equal 853, parsed.orientation.aspect_ratio[0]
|
102
|
+
assert_equal 640, parsed.orientation.aspect_ratio[1]
|
103
|
+
|
104
|
+
assert_equal '75', parsed.film.id
|
105
|
+
assert_equal '00', parsed.film.type
|
106
|
+
assert_equal '19', parsed.film.offset
|
107
|
+
assert_equal '740612', parsed.film.prefix
|
108
|
+
assert_equal '9841', parsed.film.count
|
109
|
+
assert_equal 1, parsed.film.frame_position
|
110
|
+
assert_equal 2, parsed.film.sequence_extent
|
111
|
+
assert_equal 25.0, parsed.film.frame_rate
|
112
|
+
assert_equal 18157848, parsed.television.time_code
|
113
|
+
assert_equal 0, parsed.television.user_bits
|
92
114
|
end
|
93
115
|
|
94
116
|
def test_packing
|
data/test/test_describe.rb
CHANGED
@@ -4,6 +4,7 @@ require "cli_test"
|
|
4
4
|
|
5
5
|
class TestDescribe < Test::Unit::TestCase
|
6
6
|
BIN_P = File.dirname(__FILE__) + "/../bin/depix_describe"
|
7
|
+
OBSOLETE_BINARY = File.dirname(__FILE__) + "/../bin/depix-describe"
|
7
8
|
SAMPLE_DPX = File.dirname(__FILE__) + '/samples/E012_P001_L000002_lin.0001.dpx'
|
8
9
|
|
9
10
|
def test_app
|
@@ -12,6 +13,12 @@ class TestDescribe < Test::Unit::TestCase
|
|
12
13
|
assert o.include?("03:09:00:17"), "Should include the timecode"
|
13
14
|
end
|
14
15
|
|
16
|
+
def test_obsolete_binary
|
17
|
+
s, o, e = CLITest.new(OBSOLETE_BINARY).run(File.dirname(__FILE__) + "/samples/gluetools_file_header.dpx")
|
18
|
+
assert !s.zero?
|
19
|
+
assert_match /is now called/, e
|
20
|
+
end
|
21
|
+
|
15
22
|
def test_describe_class_simple
|
16
23
|
desc = Depix::Describe.new.describe(SAMPLE_DPX)
|
17
24
|
assert_match(/320/, desc)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: depix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-07-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: timecode
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '1.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: progressbar
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '0.9'
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0.9'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: sequencer
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ~>
|
@@ -43,10 +53,31 @@ dependencies:
|
|
43
53
|
version: '1.0'
|
44
54
|
type: :runtime
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: term-ansicolor
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: update_hints
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
50
81
|
none: false
|
51
82
|
requirements:
|
52
83
|
- - ! '>='
|
@@ -54,10 +85,15 @@ dependencies:
|
|
54
85
|
version: '0'
|
55
86
|
type: :runtime
|
56
87
|
prerelease: false
|
57
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
58
94
|
- !ruby/object:Gem::Dependency
|
59
95
|
name: jeweler
|
60
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
61
97
|
none: false
|
62
98
|
requirements:
|
63
99
|
- - ! '>='
|
@@ -65,10 +101,15 @@ dependencies:
|
|
65
101
|
version: '0'
|
66
102
|
type: :development
|
67
103
|
prerelease: false
|
68
|
-
version_requirements:
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
69
110
|
- !ruby/object:Gem::Dependency
|
70
111
|
name: rake
|
71
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
72
113
|
none: false
|
73
114
|
requirements:
|
74
115
|
- - ! '>='
|
@@ -76,10 +117,15 @@ dependencies:
|
|
76
117
|
version: '0'
|
77
118
|
type: :development
|
78
119
|
prerelease: false
|
79
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
80
126
|
- !ruby/object:Gem::Dependency
|
81
127
|
name: cli_test
|
82
|
-
requirement:
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
83
129
|
none: false
|
84
130
|
requirements:
|
85
131
|
- - ~>
|
@@ -87,8 +133,13 @@ dependencies:
|
|
87
133
|
version: '1.0'
|
88
134
|
type: :development
|
89
135
|
prerelease: false
|
90
|
-
version_requirements:
|
91
|
-
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ~>
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '1.0'
|
142
|
+
description: Allows you to read and edit DPX file headers parsed into Ruby objects
|
92
143
|
email: me@julik.nl
|
93
144
|
executables:
|
94
145
|
- depix_describe
|
@@ -105,6 +156,7 @@ files:
|
|
105
156
|
- History.txt
|
106
157
|
- README.rdoc
|
107
158
|
- Rakefile
|
159
|
+
- bin/depix-describe
|
108
160
|
- bin/depix_describe
|
109
161
|
- bin/depix_fix_headers
|
110
162
|
- depix.gemspec
|
@@ -146,6 +198,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
146
198
|
- - ! '>='
|
147
199
|
- !ruby/object:Gem::Version
|
148
200
|
version: '0'
|
201
|
+
segments:
|
202
|
+
- 0
|
203
|
+
hash: 1469233932135135424
|
149
204
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
205
|
none: false
|
151
206
|
requirements:
|
@@ -154,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
209
|
version: '0'
|
155
210
|
requirements: []
|
156
211
|
rubyforge_project:
|
157
|
-
rubygems_version: 1.8.
|
212
|
+
rubygems_version: 1.8.24
|
158
213
|
signing_key:
|
159
214
|
specification_version: 3
|
160
215
|
summary: Read and write DPX file headers
|