UPDATE - Disregard this post please....file itself had issues. Other TS files work (although MP4 does give more info and several fields are null in TS files, for reference)

I'm currently looking for a way to determine length of a media file clip from a TS file. I am using the Media Info package and this works fine for an MP4 clip but for a TS clip I can only get the filesize. Is this a common problem for this filetype and if so, is there a way around this to somehow get the length of a clip? Using the Windows version of Media Info I seem to have no problem in determining the file length, but the linux/unix and perl package they don't seem to work. Here is my code for reference, although it doesn't differ much from the instructions:

use Mediainfo; my $foo_info = new Mediainfo("filename" => "/my/path/test.ts"); print $foo_info->{filename}, "\n"; #Works print $foo_info->{filesize}, "\n"; #Works print $foo_info->{container}, "\n"; #Doesn't Work print $foo_info->{length}, "\n"; #Doesn't Work #Etc...nothing else works


In reply to Media Info by omegaweaponZ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.