Problems extracting cover-images

Started by jaybrahms, August 19, 2017, 08:54:35 PM

Previous topic - Next topic

jaybrahms

Hey.

Using Version 10.60 (Windows 10, 64bit)

I seem to have a problem extracting images from MP3 files in general.
The example I'll be showing contains two album art-images, single- and album-cover, both added using iTunes.

I've been doing the following (in PowerShell):

PS C:\Other Programs\exiftool> .\exiftool.exe -a -G4 "-picture*" "C:\Temp\song.mp3"

Result:
[Copy1]         Picture MIME Type               : image/png
[Copy1]         Picture Type                    : Other
[Copy1]         Picture Description             :
[Copy1]         Picture                         : (Binary data 131657 bytes, use -b option to extract)
[]              Picture MIME Type               : image/jpeg
[]              Picture Type                    : Other
[]              Picture Description             :
[]              Picture                         : (Binary data 40664 bytes, use -b option to extract)


The image I am interested in is the "[]".
Trying to extract doing the following:

PS C:\Other Programs\exiftool> .\exiftool.exe -picture -b "C:\Temp\song.mp3" > "C:\Temp\song.jpg"

The image that is saved has the wrong size, and is unreadable...
Using exiftool to check this is what comes out of it:

PS C:\Other Programs\exiftool> .\exiftool.exe "C:\Temp\song.jpg"

ExifTool Version Number         : 10.60
File Name                       : song.jpg
Directory                       : C:/Temp
File Size                       : 80 kB
File Modification Date/Time     : 2017:08:19 17:52:26-07:00
File Access Date/Time           : 2017:08:19 17:52:25-07:00
File Creation Date/Time         : 2017:08:19 17:52:25-07:00
File Permissions                : rw-rw-rw-
Error                           : File format error


Trying the same with [Copy1], with the same result, image as the wrong size and cannot be viewed.
Trying to extract the images with ffmpeg works perfectly fine, the images have the correct size and are viewable...

What am I doing wrong?
If you need the file, I can send it to you.

Thank you very much.
Jay

StarGeek

#1
Use CMD not Powershell.

Edit: Now that I'm no longer on mobile...

See this previous thread

The problem with Powershell is that if PS thinks the output isn't unicode, it will assume it is ASCII and then convert it to unicode.  In cases like this when the output is binary, PS is corrupting the output.  I recall seeing somewhere that there's a commandlet that you can use first to prevent this but that just makes the whole command much more complex and, IMO, it's just easier to use CMD.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

jaybrahms

I should have thought about that...
Thank you very much, that really helped...

:)