Ruben Laguna’s blog

Support for Sony PSP Format in MP4::Info

Today I opened a new feature request (http://rt.cpan.org/Ticket/Display.html?id=25178) on MP4::Info perl module to include my patch to read the title in a Sony PSP files. Read this post to know more about the way title is encoded in PSP Mp4 files. With the following patch mp4infopatch.txt (applied to Info.pm) you can read the title of an PSP MP4 file using the following code snippet:

1
2
3
4
5
6
7
8
9
10
11

1
2
3
4
5
6
7
8
9
10
11
<span class='line'>use MP4::Info;
</span><span class='line'>my $file = 'MAQ12033.MP4';
</span><span class='line'>
</span><span class='line'>my $tag = get_mp4tag($file) or die "No TAG info";
</span><span class='line'>printf "$file title is %s\n", $tag->{NAM};
</span><span class='line'>
</span><span class='line'>my $info = get_mp4info($file);
</span><span class='line'>printf "$file title is %s\n", $info->{NAM};
</span><span class='line'>
</span><span class='line'>my $mp4 = new MP4::Info $file;
</span><span class='line'>printf "$file title is %s\n", $mp4->title;</span>

UPDATE: Jonathan Harris has released a new version of MP4::Info with support for Sony’s PSP files. more info

Comments

Copyright © 2015 - Ruben Laguna - Powered by Octopress