Loading ...
Sorry, an error occurred while loading the content.

Re: Wish list

Expand Messages
  • joy8388608
    Thanks for the suggestions, Eb. I always appreciate ideas since one never knows what ideas they may trigger. The first idea does not work for me since I don t
    Message 1 of 7 , Aug 24 11:59 AM
    • 0 Attachment
      Thanks for the suggestions, Eb. I always appreciate ideas since one never knows what ideas they may trigger.

      The first idea does not work for me since I don't want to modify file names for many reasons. The second idea sounds good, but there is little correlation between file size and playing length. It is a surprisingly complicated area where different .avi files (for example) can be encoded by different algorithms and .mp3 files are encoded with different bit rates which is a trade off between size and quality. I even hear multiple bit rates can be used in the same file although this is probably rare.

      All I know is, length can obviously be found (many programs including Windows Explorer) can do it, but it is not trivial to just grab the value for a given file by most languages. I suppose this is vastly beyond the scope of NT, but I don't know for sure which is why I'm wishing!

      Please understand I'm not an expert in this area so nobody needs to point out any slight errors I made in my explanations.

      Thanks!
      Joy

      --- In ntb-clips@yahoogroups.com, "Eb" <ebbtidalflats@...> wrote:
      >
      > Hi Joy,
      >
      > Depending on accuracy needed, I would suggest two approaches.
      >
      > You mention, that you already use an external utility. Why not use it to determine the playing time for each file and append this time to the filename?
      >
      > Or you could roll your own:
      >
      > I'm not into multimedia, but if I were, and lacking other tools, I'd determine a factor of playing time to file size once, for each filetype, store these, and other info, in a custom ini, under each each media type. Perhaps under groups named by the file extension.
      >
      > Conversion factor (bytes per second/minute) and overhead for media management in filesize, may be all you'd need.
      >
      > You could then approximate playing time, by accessing this data for each file. Something like:
      >
      > ^!Set %playtime%=0
      > ^!SetArray %medialist%=^$GetFiles...
      > :LOOP
      > ^!Set %file%=^%medialist^%medialist0%%
      > ^!Set %type%=^$GetExt(^%file%)$
      > ^!Set %xref%=^$GetValue(^%type%:xref)$
      > ^!Set %overhead%=^$GetValue(^%type%:overhead)$
      > ^!Set %time%=^$GetFileSize(FileName)$
      > ^!Set %time%=^$Calc((^%time%-^%overhead%)*^%xref%;0)$
      > ^!Inc %playtime% ^%time%
      > ^!Dec %medialist0%
      > ^!If ^%medialist0%>0 LOOP
      >
      > Cheers,
      > Eb
      >
      >
      > --- In ntb-clips@yahoogroups.com, "joy8388608" <mycroftj@> wrote:
      > >
      > > A function to do it directly with NT
      >
      > > > > ... a function to provide the playing time of audio and video files (.mov, .avi, .mp3, etc.) ... find (playing time)
      > > > > to fit on a 60 minute CD, etc.
      >
      > > > > find the playing time values outside of NT
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.