1 | #------------------------------------------------------------------------------
|
---|
2 | # File: Opus.pm
|
---|
3 | #
|
---|
4 | # Description: Read Ogg Opus audio meta information
|
---|
5 | #
|
---|
6 | # Revisions: 2016/07/14 - P. Harvey Created
|
---|
7 | #
|
---|
8 | # References: 1) https://www.opus-codec.org/docs/
|
---|
9 | # 2) https://wiki.xiph.org/OggOpus
|
---|
10 | # 3) https://tools.ietf.org/pdf/rfc7845.pdf
|
---|
11 | #------------------------------------------------------------------------------
|
---|
12 |
|
---|
13 | package Image::ExifTool::Opus;
|
---|
14 |
|
---|
15 | use strict;
|
---|
16 | use vars qw($VERSION);
|
---|
17 |
|
---|
18 | $VERSION = '1.00';
|
---|
19 |
|
---|
20 | # Opus metadata types
|
---|
21 | %Image::ExifTool::Opus::Main = (
|
---|
22 | NOTES => q{
|
---|
23 | Information extracted from Ogg Opus files. See
|
---|
24 | L<https://www.opus-codec.org/docs/> for the specification.
|
---|
25 | },
|
---|
26 | 'OpusHead' => {
|
---|
27 | Name => 'Header',
|
---|
28 | SubDirectory => { TagTable => 'Image::ExifTool::Opus::Header' },
|
---|
29 | },
|
---|
30 | 'OpusTags' => {
|
---|
31 | Name => 'Comments',
|
---|
32 | SubDirectory => { TagTable => 'Image::ExifTool::Vorbis::Comments' },
|
---|
33 | },
|
---|
34 | );
|
---|
35 |
|
---|
36 | %Image::ExifTool::Opus::Header = (
|
---|
37 | PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
|
---|
38 | GROUPS => { 2 => 'Audio' },
|
---|
39 | 0 => 'OpusVersion',
|
---|
40 | 1 => 'AudioChannels',
|
---|
41 | # 2 => 'PreSkip' (int16u)
|
---|
42 | 4 => {
|
---|
43 | Name => 'SampleRate',
|
---|
44 | Format => 'int32u',
|
---|
45 | },
|
---|
46 | 8 => {
|
---|
47 | Name => 'OutputGain',
|
---|
48 | Format => 'int16u',
|
---|
49 | ValueConv => '10 ** ($val/5120)',
|
---|
50 | },
|
---|
51 | );
|
---|
52 |
|
---|
53 | 1; # end
|
---|
54 |
|
---|
55 | __END__
|
---|
56 |
|
---|
57 | =head1 NAME
|
---|
58 |
|
---|
59 | Image::ExifTool::Opus - Read Ogg Opus audio meta information
|
---|
60 |
|
---|
61 | =head1 SYNOPSIS
|
---|
62 |
|
---|
63 | This module is used by Image::ExifTool
|
---|
64 |
|
---|
65 | =head1 DESCRIPTION
|
---|
66 |
|
---|
67 | This module contains definitions required by Image::ExifTool to extract meta
|
---|
68 | information from Ogg Opus audio files.
|
---|
69 |
|
---|
70 | =head1 AUTHOR
|
---|
71 |
|
---|
72 | Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
|
---|
73 |
|
---|
74 | This library is free software; you can redistribute it and/or modify it
|
---|
75 | under the same terms as Perl itself.
|
---|
76 |
|
---|
77 | =head1 REFERENCES
|
---|
78 |
|
---|
79 | =over 4
|
---|
80 |
|
---|
81 | =item L<https://www.opus-codec.org/docs/>
|
---|
82 |
|
---|
83 | =item L<https://wiki.xiph.org/OggOpus>
|
---|
84 |
|
---|
85 | =item L<https://tools.ietf.org/pdf/rfc7845.pdf>
|
---|
86 |
|
---|
87 | =back
|
---|
88 |
|
---|
89 | =head1 SEE ALSO
|
---|
90 |
|
---|
91 | L<Image::ExifTool::TagNames/Opus Tags>,
|
---|
92 | L<Image::ExifTool::TagNames/Ogg Tags>,
|
---|
93 | L<Image::ExifTool::TagNames/Vorbis Tags>,
|
---|
94 | L<Image::ExifTool::TagNames/FLAC Tags>,
|
---|
95 | L<Image::ExifTool(3pm)|Image::ExifTool>
|
---|
96 |
|
---|
97 | =cut
|
---|
98 |
|
---|