westrock2000 has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to search iTunes M4V movie files for a switch that determines if the "1080P" metatag has been set. The string is
68 64 76 64 00 00 00 11 64 61 74 61 00 00 00 15 00 00 00 00 02 00 00 00
So I have two questions
The first problem is that my video files are on the order of 4-20GB and I'm not sure if the standard
open FILE "video"
do something
close FILE
since this would be a very large file that is bigger then my memory.
How can I read the file from disk?
And then 2nd how would I do a regular expression for binary instead of searching for text?
EDIT:
I have used MP4::Info for other parts of my task.
Would it be possible to add the metatag info to the module code?
I have never altered a module before
The info I found about the iTunes data is
HD Video = hdvd 8-bit integer (boolean)
https://code.google.com/p/mp4v2/wiki/iTunesMetadata
MP4::Info source
http://cpansearch.perl.org/src/JHAR/MP4-Info-1.12/Info.pm
68 64 76 64 00 00 00 11 64 61 74 61 00 00 00 15 00 00 00 00 02 00 00 00
So I have two questions
The first problem is that my video files are on the order of 4-20GB and I'm not sure if the standard
open FILE "video"
do something
close FILE
since this would be a very large file that is bigger then my memory.
How can I read the file from disk?
And then 2nd how would I do a regular expression for binary instead of searching for text?
EDIT:
I have used MP4::Info for other parts of my task.
Would it be possible to add the metatag info to the module code?
I have never altered a module before
The info I found about the iTunes data is
HD Video = hdvd 8-bit integer (boolean)
https://code.google.com/p/mp4v2/wiki/iTunesMetadata
MP4::Info source
http://cpansearch.perl.org/src/JHAR/MP4-Info-1.12/Info.pm
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Search hex string in vary large binary file
by davido (Cardinal) on Feb 07, 2015 at 00:04 UTC | |
Re: Search hex string in vary large binary file
by LanX (Saint) on Feb 06, 2015 at 23:46 UTC | |
Re: Search hex string in vary large binary file
by BrowserUk (Patriarch) on Feb 07, 2015 at 05:03 UTC | |
Re: Search hex string in vary large binary file
by GrandFather (Saint) on Feb 07, 2015 at 07:23 UTC | |
Re: Search hex string in vary large binary file
by Anonymous Monk on Feb 07, 2015 at 14:42 UTC | |
by BrowserUk (Patriarch) on Feb 07, 2015 at 15:03 UTC | |
by Anonymous Monk on Feb 07, 2015 at 15:57 UTC | |
by BrowserUk (Patriarch) on Feb 07, 2015 at 16:18 UTC | |
by Anonymous Monk on Feb 07, 2015 at 19:56 UTC | |
|
Back to
Seekers of Perl Wisdom