[1.9.0] Pictures in ASF

Locked
Pernod
getID3() contributor
Posts:103
Joined:Sat Mar 21, 2009 5:30 pm
Are you a spambot?:no
Location:London, UK
Contact:
[1.9.0] Pictures in ASF

Post by Pernod » Sat Jul 09, 2011 11:45 am

Since the changes made to picture handling in 1.9.0 I am no longer seeing embedded pictures being found in WMA files. The picture is in the WM/Picture section but getID3 is no longer detecting this section. I haven't yet spent too much time investigating but suspect it could be related to the fix for bug #1136. PM me if you need a test file.

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: [1.9.0] Pictures in ASF

Post by James Heinrich » Sun Jul 10, 2011 8:24 pm

I'm not sure if this is what caused your problem, but I did notice on line 892 of module.audio-video.asf.php the second array key should be 'image_mime' (not 'mime_type'). This has been fixed for v1.9.1

If you make that change, and the problem persists, please do send me a test file.

Pernod
getID3() contributor
Posts:103
Joined:Sat Mar 21, 2009 5:30 pm
Are you a spambot?:no
Location:London, UK
Contact:

Re: [1.9.0] Pictures in ASF

Post by Pernod » Sun Jul 10, 2011 10:03 pm

Not fixed, test file sent via email.

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: [1.9.0] Pictures in ASF

Post by James Heinrich » Sun Jul 10, 2011 10:52 pm

I see in your sample file there does appear to be a picture inside the header_extension_object. But I'm not sure that this was ever parsed (it doesn't get parsed in v1.8.5 either, for example). Was this working for you in a previous version, or just something you noticed?

Pernod
getID3() contributor
Posts:103
Joined:Sat Mar 21, 2009 5:30 pm
Are you a spambot?:no
Location:London, UK
Contact:

Re: [1.9.0] Pictures in ASF

Post by Pernod » Sun Jul 10, 2011 10:57 pm

It was definitely working in a previous version, couldn't tell you which though as I only noticed it was broken when I did my own tests before updating to 1.9.0.

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: [1.9.0] Pictures in ASF

Post by James Heinrich » Sun Jul 10, 2011 11:44 pm

I'll check through some previous versions then. And I'll get it working (again?) for v1.9.1 :)

edit: I checked back to v1.8.0, and it still wasn't working then; earlier versions throw too many deprecated warnings for me to quickly check.

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: [1.9.0] Pictures in ASF

Post by James Heinrich » Mon Jul 11, 2011 12:25 am

After looking a little closer, I'd be surprised if a previous version of getID3 did work with this particular sample file -- the image is stored inside the ASF HeaderExtensionObject, which getID3() has never parsed. ASF standard does have multiple places where pictures can be stored, so any other cover art you saw would've been parsed, but just not from this particular location (as far as I can tell).

I'm working on parsing this data now, I'll post back with a modified module when it's working.

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: [1.9.0] Pictures in ASF

Post by James Heinrich » Mon Jul 11, 2011 2:32 am

I have now added code to parse (most of) the HeaderExtensionObject data. Please try it out and let me know how it works for you.

If anyone comes across warnings for "unhandled Header Extension Object GUID" (or "unknown Header Extension Object GUID"), except for GETID3_ASF_Compatibility_Object and GETID3_ASF_Index_Placeholder_Object, please send me a sample file.
Attachments
module.audio-video.asf.php
(126.01KiB)Downloaded 833 times

Pernod
getID3() contributor
Posts:103
Joined:Sat Mar 21, 2009 5:30 pm
Are you a spambot?:no
Location:London, UK
Contact:

Re: [1.9.0] Pictures in ASF

Post by Pernod » Mon Jul 11, 2011 9:30 am

Thanks, works fine.

Locked