Detect the TV Show, Season and Episode from a mp4 file in applescript
Exiftool is a great tool to extract metadata.
http://www.sno.phy.queensu.ca/~phil/exiftool/
This script should point you in the right direction.

set thePath to POSIX path of (path to documents folder) &amp; "exifdata"
do shell script "mkdir -p " &amp; quoted form of POSIX path of thePath

tell application "Finder" to set theSelection to selection
repeat with anItem in theSelection
    set theLocation to POSIX path of (anItem as text)
    set {name:fileName, name extension:nameExtension} to anItem
    set baseName to text 1 thru ((get offset of "." &amp; nameExtension in fileName) - 1) of fileName
    set destLocation to quoted form of (thePath &amp; "/" &amp; baseName &amp; ".txt")
    do shell script "exiftool -a " &amp; quoted form of theLocation &amp; " &gt;" &amp; destLocation
    do shell script "open " &amp; destLocation
end repeat


Or another approach is :

set myFile to quoted form of (POSIX path of (path to desktop as text) &amp; "movie.mp4")

set xxx to every paragraph of (do shell script "mdls " &amp; myFile)