Results 1 to 7 of 7

Thread: how do i get file info with mplayer?

  1. #1
    Join Date
    Jan 2007
    Location
    Santiago, Chile
    Beans
    158
    Distro
    Ubuntu 9.10 Karmic Koala

    how do i get file info with mplayer?

    hi
    what do i need to write to get the mediafile info from mplayer?
    i mean...from console with mplayer...
    thanks

  2. #2
    Join Date
    Dec 2006
    Beans
    7,312

    Re: how do i get file info with mplayer?

    Hi jfca,

    Best way is to use the midentify.sh script that comes with the MPlayer source:

    Code:
    #!/bin/sh
    #
    # This is a wrapper around the -identify functionality.
    # It is supposed to escape the output properly, so it can be easily
    # used in shellscripts by 'eval'ing the output of this script.
    #
    # Written by Tobias Diedrich <ranma+mplayer@tdiedrich.de>
    # Licensed under GNU GPL.
    
    if [ -z "$1" ]; then
    	echo "Usage: midentify.sh <file> [<file> ...]"
    	exit 1
    fi
    
    mplayer -vo null -ao null -frames 0 -identify "$@" 2>/dev/null |
    	sed -ne '/^ID_/ {
    	                  s/[]()|&;<>`'"'"'\\!$" []/\\&/g;p
    	                }'
    All the best,

    Andrew
    You think that's air you're breathing now?

  3. #3
    Join Date
    Jan 2010
    Beans
    188
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: how do i get file info with mplayer?

    Quote Originally Posted by jfca283 View Post
    hi
    what do i need to write to get the mediafile info from mplayer?
    i mean...from console with mplayer...
    thanks

    A little more specifics would be a good thing. Are you talking like codec information, meta information, what?

  4. #4
    Join Date
    Jan 2007
    Location
    Santiago, Chile
    Beans
    158
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: how do i get file info with mplayer?

    i mean...audio/video codecs, FPS, channels and subtitles

  5. #5
    Join Date
    Dec 2006
    Beans
    7,312

    Re: how do i get file info with mplayer?

    Hi jfca,

    Perhaps you might be happiest with mediainfo? There is an 'official' PPA that can be added as follows if you are using Karmic (this is a single command):

    Code:
    sudo add-apt-repository ppa:shiki/mediainfo && \
    sudo apt-get update && \
    sudo apt-get install mediainfo mediainfo-gui
    and then open your media file with the command:

    Code:
    mediainfo -f myfile.mp4
    while substituting 'myfile.mp4' for the name of your own file. Full usage can be seen by running mediainfo --help from the commandline. There is a gui also which should appear under 'Sound and Video', I personally find the commandline interface a little cleaner...

    All the best,

    Andrew
    Last edited by andrew.46; February 4th, 2010 at 09:37 AM.
    You think that's air you're breathing now?

  6. #6
    Join Date
    Jan 2007
    Location
    Santiago, Chile
    Beans
    158
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: how do i get file info with mplayer?

    thanks andrew...it worked
    SOLVED

  7. #7
    Join Date
    Dec 2006
    Beans
    7,312

    Re: how do i get file info with mplayer?

    Hi jfca,

    Quote Originally Posted by jfca283 View Post
    thanks andrew...it worked
    Excellent news . I suspect you will find that mediainfo provides much for comprehensive information than FFmpeg or MPlayer.

    All the best,

    Andrew
    You think that's air you're breathing now?

Bookmarks

Posting Permissions

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