> On Jun 1, 2025, at 11:38 PM, Carl Zwanzig <c...@tuunq.com> wrote:
> 
> On 6/1/2025 8:27 PM, Huspnet wrote:
>> Mediainfo default response will show that with a command line such as:
>> mediainfo /path/to/mediafile
> 
> Does that refer to the AVFoundation output? That's what I was referring to.


Of course. Also, for the benefit of other Mac users, I'm including a relatively 
brief AppleScript that should allow creation of a droppable application using 
Script Editor.app that will make the process even simpler. To create that 
application, the user must have authority to do so on the Mac being used. It 
should also be noted that a properly installed instance of the mediainfo 
command line application is required. I host this script on my blog 
(https://prehensileblog.wordpress.com/2023/02/06/applescript-droplet-source-for-using-media-info/),
 the link for which I'm only including because of the unpredictable (at least 
by me) nature of any script's disposition when served on a mailing list. 
Hopefully, no one needs to visit my blog to use the AppleScript, as the blog is 
encumbered with advertisements that must be endured when visiting freely 
provided blog sites. As usual, I'll follow up with brief instructions if I 
discover that the list version is broken but can easily be repaired.

L. Lee

## begin AppleScript

property temppath : "/private/tmp/"
property startnum : 0
property newline : ASCII character 10
property tmpfile : "/tmp/execme.command"

on open the_items
        my mediaInfo(the_items)
end open

on mediaInfo(the_items)
        set theshellscript to ""
        repeat with the_item in the_items
                set the_item to the_item as alias
                tell application "Finder"
                        set sost to (container of the_item) as string
                end tell
                set pos_filepath to POSIX path of sost
                set this_filepath to (the_item as string)
                set thesourcename to (name of (info for the_item))
                set namepart to (name extension of (info for the_item))
                set the_source_file to POSIX path of this_filepath
                set theshellscript to the theshellscript & "mediainfo" & space 
& (quoted form of the_source_file) ¬
& space & "; echo '" & "

==========================

Media Information for" & space & "\"" & thesourcename & "\"" & "

==========================

';"
        end repeat
        set theshellscript to theshellscript & "sleep 3;mv" & space & (quoted 
form of tmpfile) & ¬
space & (quoted form of (POSIX path of (path to trash)))
        do shell script "echo " & quoted form of theshellscript & " > " & 
tmpfile
        repeat
                do shell script "chmod +x " & tmpfile
                do shell script "open -a Terminal.app" & space & tmpfile
                exit repeat
        end repeat
end mediaInfo

on run
        set the_items to ((choose file) as list)
        mediaInfo(the_items)
end run

## end AppleScript




_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to