Python Forum
Getting EXIF data from image AND video files
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting EXIF data from image AND video files
#1
Hi,
I want to sort lots of image and video files according to recorded date. I want to read EXIF data from these files.
I have found a script named EXIF.py but it can read only EXIF data in image files, not video files i.e. mp4 and mov.
How can I read EXIF information from image files AND mp4, mov files?

Thanks.
Reply
#2
Look at Hachoir.
Perhaps you could use it for images too.

On https://pypi.python.org look for some wrapper for FFmpeg. You could get video metadata easy.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
try PIL ffor images
import PIL.Image
img = PIL.Image.open('img.jpg')
exif_data = img._getexif()
or
import PIL.ExifTags
exif = {
    PIL.ExifTags.TAGS[k]: v
    for k, v in img._getexif().items()
    if k in PIL.ExifTags.TAGS
}
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to extract 1 or 2 bits of data from MS project files? cubangt 8 940 Feb-16-2024, 12:02 AM
Last Post: deanhystad
  Mirror Video Image in realtime makingwithheld 1 395 Oct-30-2023, 02:45 PM
Last Post: Larz60+
  script to calculate data in csv-files ledgreve 0 1,055 May-19-2023, 07:24 AM
Last Post: ledgreve
  SQL Alchemy help to extract sql data into csv files mg24 1 1,678 Sep-30-2022, 04:43 PM
Last Post: Larz60+
  Unable to request image from FORM Data usman 0 968 Aug-18-2022, 06:23 PM
Last Post: usman
  Apply textual data cleaning to several CSV files ErcoleL99 0 808 Jul-09-2022, 03:01 PM
Last Post: ErcoleL99
  Including data files in a package ChrisOfBristol 4 2,463 Oct-27-2021, 04:14 PM
Last Post: ChrisOfBristol
  |SOLVED] Glob JPGs, read EXIF, update file timestamp? Winfried 5 2,411 Oct-21-2021, 03:29 AM
Last Post: buran
  How to open/load image .tiff files > 2 GB ? hobbyist 1 2,383 Aug-19-2021, 12:50 AM
Last Post: Larz60+
  Plotting sum of data files using simple code Laplace12 3 2,992 Jun-16-2021, 02:06 PM
Last Post: BashBedlam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020