Find the answer to your Linux question:
Results 1 to 5 of 5
Hello, I've been getting information from .avi files with avinfo. I would like to know if there is a way to do a "ls" command and get file/duration/size Joao...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    0

    How to get info (size, duration) from media files (.wav .avi)

    Hello,

    I've been getting information from .avi files with avinfo.
    I would like to know if there is a way to do a "ls" command and get file/duration/size

    Joao

  2. #2
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    616
    as far as file size, sure ls can give you that:

    Code:
    ls -lah filename.avi
    leaving the -h will give you byte count. as far as duration, ls will not give you this info
    linux user # 503963

  3. #3
    Just Joined!
    Join Date
    Mar 2010
    Posts
    0
    Quote Originally Posted by scathefire View Post
    as far as file size, sure ls can give you that:

    Code:
    ls -lah filename.avi
    leaving the -h will give you byte count. as far as duration, ls will not give you this info
    Thanks for the anwser, but my main dought is about the length or duration of the file.
    I can have more information with nautilus (like in windows explorer) with a python script but it os not very reliable. I need something in the terminal.

    Joao

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    A good tool for getting all manner of information regarding video files is mediainfo.

  5. #5
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    616
    if you have vlc installed, you might be able to get the info you want from it, but you will have to play around with it.

    Chapter*4.* The command line interface
    linux user # 503963

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •