File AtomicParsley.spec of Package AtomicParsley
#
# spec file for package HandBrake
#
Name: AtomicParsley
BuildRequires: gcc-c++
BuildRequires: binutils
BuildRequires: unzip
Summary: AtomicParsley is a lightweight command line program for reading, parsing and setting metadata into MPEG-4 files.
Version: 0.9.0
Release: 1
License: GPL
Group: Productivity/Multimedia
URL: http://atomicparsley.sourceforge.net/
Packager: jp@stanwood.org.uk
Source: AtomicParsley-source-0.9.0.zip
Patch0: AtomicParsley-0.9.0-fixcompile.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: %{name} = %{version}
Obsoletes: %{name} <= %{version}
%description
AtomicParsley is a lightweight command line program for reading, parsing and setting metadata into MPEG-4 files supporting these styles of metadata:
* iTunes-style metadata into .mp4, .m4a, .m4p, .m4v, .m4b files
* 3gp-style assets (3GPP TS 26.444 version 6.4.0 Release 6 specification conforming) in 3GPP, 3GPP2, MobileMP4 & derivatives
* ISO copyright notices at movie & track level for MPEG-4 & derivative files
* uuid private user extension text & file embedding for MPEG-4 & derivative files
The MPEG-4 container is based on Apple's Quicktime .mov container (just more sane) & there are a number of similarites - as well as differences. Each MPEG-4 file lists a "major file brand" that broadly says which specification the file adheres to. For example, an iTunes audio file typically lists 'M4A ' as its major file brand, while a 3GPP2 .3g2 file has something like '3g2a'. It is based on this major file brand that AtomicParsley allows a style of metadata to be set. Since there is nothing in the 3GPP2 specification regarding iTunes-style metadata, its use is prevented on such files. Similarly, a 3gp 'location' asset is not available for an iTMS video file. The first paragraph here sums the situation up well.
With the exception of artwork, all iTunes-style tags support only 1 piece of metadata - you can't have for example 3 title tags. 3gp assets and copyright notices support multiple tags, but they must differ in the language setting for that tag. You can have for example 3 title tags, but 1 in english, 1 in spanish, 1 in undefined. All iTunes-style text metadata is always in UTF-8; 3gp assets & copyright notices can be in set in UTF-8 or UTF-16. All strings are converted internally to UTF-8, converting as necessary. On *nix platforms, input is in UTF-8; the native Windows port supports full UTF-16 input.
%prep
%setup -q -c %{name}-%{version}
%patch0 -p0
%build
cd %{name}-source-%{version}
./build
%install
%__install -dm 755 %{buildroot}%{_bindir}
%__install -m 755 %{name}-source-%{version}/AtomicParsley %{buildroot}%{_bindir}
%__install -dm 755 %{buildroot}%{_datadir}/doc/packages/%{name}
%__install -m 644 %{name}-source-%{version}/COPYING %{buildroot}%{_datadir}/doc/packages/%{name}
%__install -m 644 "%{name}-source-%{version}/Using AtomicParsley.rtf" %{buildroot}%{_datadir}/doc/packages/%{name}
%clean
[ -d "%{buildroot}" -a "%{buildroot}" != "" ] && %__rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%dir %{_datadir}/doc/packages/%{name}
%doc %{_datadir}/doc/packages/%{name}/*
%{_bindir}/AtomicParsley
%changelog
* Fri Sep 15 2006 - v0.9.0
- new file scanning method based on an array of known atoms/KnownAtoms struct added to list the gamut of known atoms & their basic properties
- better atom versioning & flags support.
- allow negatives in 3gp asset coordinates (switch to high-bit ascii for getopt_long for assets)
- fixed minor bug that crept in on non-Win systems in removing files.
- switch from moving mdat(s) to moving moov to reorder atoms
- mellow_flow's genre fix.
- SLarew's utf16 fix for printing 3gp assets on Win32.
- reorder moov's child atoms so that udta is last (as per ISO spec recommendations) in moov.
- enable use of 'free' atom padding for rapid updating, pad with a (user-defined) default amount of padding with a complete file rewrite.
- switch remaining AtomicInfo variables over to pointers.
- add support for multiple same atoms with differing languages (like 3gp assets).
- more flexible 'stik' setting/retrieving & added Audiobook.
- genre bugfix (again!!).
- added ability to list std genres & stik strings.
- switch output for rtng's "Lyrics" to "Content".
- list file brands.
- bugfix for removing some cli metadata.
- prevent optimizing on PSP mpeg-4 files (but allow dynamic updating, and don't add padding to psp files).
- new APar_FindAtom routine eliminating some loops.
- updated routine to find 'moov.udta.meta.hdlr' or iTunes-style tagging.
- simplified APar_RemoveAtom.
- 3gp assets differing in language are grouped now instead of being fifo.
- simplified printing of non-string iTunes-style tags.
- work around 3rd party bug affecting 'cprt' corruption.
- switch to fseeko to support files between 2.5GB & 4GB (and ancillary routines off of filesize like progress bar).
- fix co64 reduction offsets.
- prevent optimizing when just getting a tree or tags (screwed up track level details).
- bashfulbladder's booklet stik, only allow dynamic updating with --overWrite & new "AP -t +" routine to show padding & supplemental info.
- changing win32 filename to '-utf8.exe' forces raw utf8 input/output.
- win32 longhelp is converted to utf16 (for atom names).
- new shorthelp added as default help page.
- bugfix removing non-existing atoms.
- an actual change (removal/addition/change) of an atom is now required for any type of write action.
- fix channel listing for 'esds' without sec5 info.
- added ability to force image dimensions on MacOSX.
- revamped track level details.
- 255 byte limit for strings changed to 255 utf8 *character* limit.
- --stik Audiobook now changes file extension to '.m4b' (for Mac OS X, finder Type code is changed to 'M4B ' too).
- fix --3gp-year "" in APar_RemoveAtom.
- bugfix setting string lengths in 3gp keyword.
- added ability to add ISO 'cprt' copyright at movie or track level.
- implemented v5 sha1 namepsace/name uuids.
- fixed crash on finding any atom with full uuids (like psp files).
- more extensive type/profiles/levels in track level details.
- add support for embedding files on uuid atoms.
- switch to reading artwork directly into memory (as opposed to copying from a->b) when setting artwork.
- modified ExtractPixPrefs for leaks - defaults now to deleting temp pic files.
- skip sprintf for uuid binary strings ('qlts' is why) & switch to (less flexible) memcpy.
- accommodate iTunes 7.0 adding aprox. 2k of NULL bytes outside of any atom structure.
- add 'pgap' atom.
- defaults to duplicating the gapless padding at the end of file now (but can be optionally skipped).
- fixed clipping when setting unicode characters
* Sun May 21 2006 - v0.8.8
- prevent libmp4v2 artwork from a hexdump.
- changed how short strings were set.
- win32 change for uuid atoms to avoid sprintf.
- skip parsing 'free' atoms.
- work around foobar2000 0.9 non-compliant tagging scheme & added cli switch to give 'tags' the GoLytely - aka '--foobar2000Enema'.
- ability to read/set completely separate 3gp tags subset (3GPP TS 26.444 version 6.4.0 Release 6 compliant & more like QuickTime-style tags).
- added libxml's utf8 & utf16 conversion functions.
- new windows (windows2000 & later) unicode (utf16) console output (literal utf8 bytes in win98 & earlier.
- memset standard means of initializing.
- simplified setting of arbitrary info uniformly onto parsedAtoms.AtomicData.
- win32 switch to CP_UTF8 codepage on redirected console output for better unicode output support.
- eliminate need for libiconv - use xml's utf8<->latin1 functions to supplant libiconv.
- properly display atoms like '©nam' under Windows for trees & atom printouts.
- support setting unicode on Windows CP_UTF8.
- added 3GP keyword.
- fixed bug removing last 3GP asset to reset the length of 'udta'.
- added 'manualAtomRemove' for manually removing iTunes-style atoms.
- improved tracking of filesize/percentage when large free atoms impinge on % of new filesize.
- added 3GP location 'loci' (El Loco) atom - all known 3GP assets can now be set/viewed (except support for multiple same atoms of different languages).
- ->forced<- elimination of Nero tagging scheme (their foobar2000 inspired 'tags' atom) on 3GP files.
- prevent iTunes-style tags on 3GP files or 3GP assets on MPEG-4 files.
- fix offsets in fragmented files ("moof.traf.tfhd").
- up MAX_ATOMS to 1024.
- Windows support for full utf16 (unicode) for cli args & filenames
* Sat Feb 25 2006 - v0.8.4
- fixed an imaging bug from preferences.
- fixed metaEnema screwing up the meta atom (APar_RemoveAtom bugfix to remove a direct_find atom).
- added --output, --overWrite.
- added --metaDump to dump ONLY metadata tags to a file.
- versioning for cvs builds.
- limited support for 64-bit mdat atoms (limited to a little less than a 32-bit atom > 4GB).
- bugfixes to APar_RemoveAtom for removing uuid atoms or non-existing atoms & to delete all artwork, then add in 1 command ("--artwork REMOVE_ALL --artwork /path --artwork /path").
- support 64-bit co64 atom.
- support MacOSX-style type/creator codes for tempfiles that end in ".mp4" (no need to change extn to ".m4v"/".m4a" anymore).
- moved purl/egid onto AtomicDataClass_UInteger (0x00 instead of 0x15) to mirror Apple's change on these tags.
- start incorporating Brian's Win32 fixes (if you malloc, memset is sure to follow;fopen).
- give the 'name' atom for '---' iTunes-internal tags for metadata printouts.
- allow --freefree remove 'free's up to a certain level (preserves iTunes padding).
- squash some memory leaks.
- change how CreateSparseAtom was matching atoms to accommodate EliminateAtom-ed atoms (facilitates the previous artwork amendments).
- exit on unsupported 'ftyp' file brands.
- anonymous 3rd party native win32 contributions.
- reworked APar_DetermineAtomLengths to accommodate proper tag setting with --mdatLock.
- parsing atoms under 'stsd' is no longer internally used - only for tree printing.
- reworked Mac OS X TYPE determination based on new stsd_codec structure member.
- revisit co64 offset calculations.
- start extracting track-level details (dates, language, encoder, channels).
- changed stco/co64 calculations to support non-muxed files.
- anonymous "Everyday is NOT like Sunday" contribution.
- changed unknown 0x15 flagged metadata atoms to hex printouts.
- move mdat only when moov precedes mdat.
- new flexible esds parsing
* Sat Jan 14 2006 - v0.8
- switched over to uint8_t for former ADC_CPIL_TMPO & former ADC_Integer.
- added podcast stik setting & purl/egid.
- bugfixes to APar_RemoveAtom.
- bugfixes & optimizations to APar_FindAtom.
- changes to text output & set values for stik atom.
- increase in buffer size.
- limit non-uuid strings to 255bytes.
- fixed retreats in progress bar.
- added purd atom.
- support mdat.length=0 atom (length=1/64-bit isn't supported.
- I'll somehow cope with a < 4GB file).
- switch from long to uint32_t.
- better x86 bitshifting.
- added swtich to prevent moving mdat atoms (possible PSP requires mdat before moov).
- universal binary for Mac OS X release
* Sun Dec 31 2005 - v0.7.6
- ceased flawed null-termination (which was implemented more in my mind) of text 'data' atoms.
- UTF-8 output on Mac OS X & Linux - comment in DUSE_ICONV_CONVERSION in the build file to test it other platforms (maybe my win98Se isn't utf8 aware?).
- cygwin build accommodations.
- fix to the secondary "of" number for track/disk on non-PPC.
- implemented user-defined completely sanctioned 'uuid' atoms to hold.... anything (text only for now).
- "--tagtime", "--url" & "--information" now get set onto uuid atoms.
- allow creation of uuid atoms directly from the cli.
- cygwin-win98SE port added to binary releases.
- added '--freefree' to remove any&all 'free' atoms
* Sat Dec 16 2005 - v0.7.5e
- ammends how atoms are added at the end of the hierarchy (notably this affects ffmpeg video files).
- writes "keyw", "catg", "pcst", "aART" atoms.
- read-only "purl" & "egid" added
* Mon Dec 11 2005 - v0.7.5d
- endian issues for x86 mostly resolved.
- x86: setting genre's segfaults.
- x86: stik doesn't get set in a multi-option command, but does as a single atom setting.
- Debian port added to binaries (compiled under debian-31r0a-i386 with g++4.02-2, libc6_2.3.5-8 & libstdc++6_4.0.2-2) - under VirtualPC - with the nano editor!
* Sun Dec 10 2005 - v0.7.5c
- funnguy0's linux patches (thanks so much for that)
* Sat Dec 09 2005 - v0.7.5b
- forced 'mdat' into being childless (chapterized mpeg4 files have atoms scattered througout mdat, but they aren't children).
- fixed issues with ffmpeg created mpeg4 files (that have mdat as 2nd atom.
- moov & chilren as last atoms).
- moved ffmpeg mdat atoms around to end.
- better atom adding at the end.
- subbed getopt_long_only to getopt_long for pre-10.4 users.
- added progressbar
* Sun Dec 03 2005 - v0.7.4
- "desc", "tvnn", "tvsh", "tven" & "tves" setting
* Sat Dec 02 2005 - v0.7.3
- handles stsd (and child) atoms better.
- modifies all stco offsets when needed (not just the first).
- new oddball iTMS video "drmi" atom handling.
- new "stik" atom support (sets iTunes GetInfo->options:Movie,TV Show, Music Video).
- writes iTMS video drm TV shows well now.
- diffs in a hex editor are moov atom length, and then into stco, so all is well
* Tue Nov 29 2005 - v0.7.2
- creates iTunes-required meta.hdlr.
- all the tags now get spit back when reading them (--textdata).
- slight fix to how atoms are parsed.
- all known m4a files now tag properly: iTunes (m4a, m4b, chapterized, alac), Quicktime (ISMA & mpeg4 - change filename ext to .m4a to see art.
- all QT products require the meta.hdlr addition), faac, Helix Producer & Nero.
- slight change to how PrintDataAtoms called FindParentAtom.
- added tag time on "©ed1" (edit date-might only really belong directly under udta).
- added "©url" to hold url.
- fixes to APar_RemoveAtom.
- added cli ability to remove all artwork
* Sun Nov 27 2005 - v0.7.1
- modified parsing & writing to support Apple Lossless (alac) mp4 files. The lovely "alac.alac" non-standard atoms (parents & carry data) caused unplayable files to be written. Only QT ISMA files get screwed now (no idea about Nero)
* Sat Nov 26 2005 - v0.7
- added a writeBack flag to for a less beta-like future.
- integrated NSImage resizing of artwork.
- environmental preferences for artwork modifications.
- build system mods for Mac-specific compiling.
* Fri Nov 25 2005 - v0.65
- bugfixes to newly introduced bugs in APar_FindAtom.
- metaEnema to remove all metadata (safe even for m4p drm files).
- year implemented properly (tagtime moved onto non-standard 'tdtg' atom ala id3v2.4 - because I like that tag).
- added setting compilation "cpil" tag (an annoying 5byte tag).
- added advisory setting (maybe it'll give me a kick one cold winter day-do a "Get Info" in iTunes & in the main "Summary" tab view will be a new little icon next to artwork)
* Fri Nov 25 2005 - v0.6
- Added genre string/numerical support, support for genre's dual-atom ©gen/gnre nature, genre string->integer
- bug fixes to APar_LocateAtomInsertionPoint when an atom is missing
- APar_CreateSparseAtom for ordinary non-data atoms are now type -1 (which means they aren't of any interest to us besides length & name)
- implemnted the Integer data class
- char4short
- verified iTunes standard genres only go up to "Hard Rock"
- added jpg/png artwork embedding into "covr" atoms
- slight bugfix for APar_FindAtom (created spurious trailing "covr" atoms).
* Tue Nov 22 2005 - v0.5
- Writes artist properly of variable lengths properly into an iTMS m4p file properly (other files don't fare well due to the stsd atom non-standard nature)
- a number of code-uglifying workarounds were employed to get get that far
* Thu Nov 10 2005 - v0.2
- AtomicInfo.NextAtomNumber introduced to facilitate dynamic atom tree reorganization
- CreateSparseAtom added
* Sat Nov 05 2005 - v0.1
- Parsing of atoms.
- intial Tree printout.
- extraction of all "covr.data" atoms out to files