1

I'm trying to get image metadata from the internet using exiftool and tried to follow along with the piping example provided in exiftools docs, which I've linked below. This does not work as expected and instead returns an error of no file specified. I've tried putting the URL into quotes, changing around the command to use curl as an input into exiftool instead of piping, nothing seems to work. Any help would be appreciated.

https://exiftool.org/exiftool_pod.html#PIPING-EXAMPLES

archer46
  • 13
  • 2
  • Just to verify, you are using bash as the question is tagged? And not Windows, specifically Windows PowerShell? – StarGeek Apr 06 '22 at 15:52

1 Answers1

0

Works just fine for me. Make sure to add the - to indicate reading from stdin. Here is an example:

> curl -s "https://www.gravatar.com/avatar/1f20f72dba83a169c623fbe652657a32?s=48&d=identicon&r=PG" | exiftool -
ExifTool Version Number         : 11.88
File Type                       : PNG
File Type Extension             : png
MIME Type                       : image/png
Image Width                     : 48
Image Height                    : 48
Bit Depth                       : 8
Color Type                      : RGB with Alpha
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
Pixels Per Unit X               : 3780
Pixels Per Unit Y               : 3780
Pixel Units                     : meters
Image Size                      : 48x48
Megapixels                      : 0.002
Christian Fritz
  • 20,641
  • 3
  • 42
  • 71
  • Same here. I use a similar curl piping command nearly every day with no problems. @archer46, can you show us the **exact** command and the **exact** output? – StarGeek Apr 06 '22 at 15:54
  • This now works fine. Thank you for the assistance. Using curl -s http://a.domain.com/bigfile.jpg | exiftool -fast - as provided by the documentation doesn't work, but the following does: curl -s http://a.domain.com/bigfile.jpg | exiftool - – archer46 Apr 06 '22 at 19:50
  • 1
    The [`-fast` option](https://exiftool.org/exiftool_pod.html#fast-NUM) in the example is included so that it possibly won't download the entire file. For most image files, you don't need to download the entire file. But some files, especially videos, will have the necessary data at or near the end of the file. In those cases, you would not want to use the `-fast` option. – StarGeek Apr 06 '22 at 23:54