Page 2 of 2

Re: Add frame width & height to filename

Posted: 23 Feb 2017 00:59
by Dustydog
highend wrote:These are language neutral:

Code: Select all

property("System.Video.FrameWidth")
property("System.Video.FrameHeight")
The problem is just: Not all file types are supported. So if support for a specific
codec requires e.g. the k-lite codec pack and somebody doesn't want to
install it, he needs mediainfo.exe anyway.

And regarding "translation by the user": That requires the user that he knows how
this property would be named in his language ;)
True! Hadn't thought of someone using the script that didn't know anything about property scripting. But...just sticking within my personal sphere of computers, from what you were saying, it does sound like perhaps the property name is sufficient and more stable than the number?

Re: Add frame width & height to filename

Posted: 23 Feb 2017 01:02
by highend
Exactly

Re: Add frame width & height to filename

Posted: 23 Feb 2017 02:00
by Dustydog
This is a bit off-topic for this thread, but since you're here, and it's related....

Highend, or anyone, you wouldn't happen to know of something that would be semi-compatible with XY that allows writing tags back into a good variety of video formats, i.e. MKV along with the usual MP4s, etc., etc. would you?

If anyone knows, I'd think it'd be you. I have, of course, Googled, and beyond specialty tools for the various formats, I haven't even found a very sufficient language-specific library out there yet. But it couldn't hurt to ask. Maybe integrate ffmpeg into some scripts? *shrug* It may be a bad idea simply from a time-to-write standpoint - I honestly don't know. Stick to filenames and some info files and forget the tags?

(I realize writing to tags is much harder than reading them technically, so of course format versatility is generally quite limited. Have been using MKV for family video compression-archiving lately, and it does have potentially very flexible tags, plus I have many other video formats lying about like most people. My image and audio files are tagged well, wish I could with video as well.)

Re: Add frame width & height to filename

Posted: 23 Feb 2017 02:32
by highend
No library is "semi-compatible" with XY. You can't use any library through scripting directly, you'll need a wrapper anyway.
And while ffmpeg knows a lot about file structure and tags for various formats it can be a very dangerous tool.
E.g. on a .mp3 file that (with a copy) was no problem to process with MP3Tag, ffmpeg left a zero-byte file when
writing a combination of id3v2 + id3v1 tags. E.g. because of that I'll write my own wrapper for a command line mp3
tagger (id3v2 + id3v1, unicode aware). Tags are just to format specific so the best way should always be:
Use a tool that is specialized on that file formats you're working with (or that uses a library for the same purpose).
At least that's my recommendation...

Re: Add frame width & height to filename

Posted: 25 Feb 2017 13:45
by Dustydog
Tags are just too format specific so the best way should always be:
Use a tool that is specialized on that file formats you're working with (or that uses a library for the same purpose).
Very wise, and really, I knew that, but didn't want to. Thanks for taking the time.

Re: Add frame width & height to filename

Posted: 01 Mar 2017 04:41
by Dustydog
I should leave this thread alone, but I remember reading a good rant on this subject and couldn't remember from where. I remembered. It's a bit old (2005, edit 2010) and doesn't mention many formats, but it covers some of the universal problems, and for those interested....

It's from the programmer of the excellent "ExifTool" and is entitled: Commentary on Meta Information Formats (or "Why this or that Format Sucks")

http://owl.phy.queensu.ca/~phil/exiftoo ... ntary.html

At the very least, re-reading that will keep me from asking Don to add more write-to-metadata features for a few weeks ;)

Re: Add frame width & height to filename

Posted: 13 Oct 2017 00:45
by Dustydog
I mentioned this somewhere else, but one advantage of using Canonical or XY native over MediaInfo is that MediaInfo won't handle long paths - and some of my media certainly has them. I like MediaInfo anyway, however. I find it easy to use and clear. (Do remember, as above, to regexreplace for \r?\n).