FedoraForum.org - Fedora Support Forums and Community
Results 1 to 11 of 11
  1. #1
    Join Date
    Feb 2008
    Location
    Toronto, Canada
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Video file properties on the command line?

    Hi

    Anyone know a way to get a summary of video file properties from the command line? mplayer will give you all the details but it always plays the video.

    I'd like it to look similar to the properties window you get when you right-click the file from the GUI, I just can't find any tool to do it.

    Thanks

  2. #2
    Join Date
    Sep 2005
    Location
    Redneck Riviera
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try with something like:

    mplayer -vo null -ao null -frames 0 -identify filename.avi | grep "^ID"

    Leave off the ' | grep "^ID" ' if you want to see all the info mplayer shows.

  3. #3
    Join Date
    Oct 2006
    Posts
    4,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure how much info you actually want, but have you tried file?

    @Fedora Movies]$ file The\ Fifth\ Element.avi
    The Fifth Element.avi: RIFF (little-endian) data, AVI, 560 x 240, 25.00 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)

  4. #4
    Join Date
    Feb 2008
    Location
    Toronto, Canada
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks alot for the answers. I had no idea about file. That's perfect for what I had in mind.

  5. #5
    Join Date
    Jun 2005
    Location
    Italy
    Posts
    1,108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are also a bunch of container-specific info utilities, such as avinfo, ogminfo, MP4info, mkvinfo (or mkvmerge with the "-i" switch)
    - Captain...
    - Yes, Spock?
    - I can't believe my ears...

  6. #6
    Join Date
    Oct 2007
    Posts
    884
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm neither file or the mplayer command seem to show the length of the video - any idea how to find that?

    Also even when mplayer is playing a video it shows the frame its on.. but it says 200/200, then 201/201 - it doesn't keep the "out of" number constant, it just moves both along together.

  7. #7
    Join Date
    Dec 2011
    Location
    Coimbatore
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Video file properties on the command line?

    To get the video and audio file properties, I usually use mediainfo. This is available for all major linux distributions.

  8. #8
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    15,370
    Mentioned
    186 Post(s)
    Tagged
    0 Thread(s)

    Re: Video file properties on the command line?

    That link says you can simply do a "yum install mediainfo" but that doesn't work, it's not in the repositories as far as I can see.

  9. #9
    Join Date
    Jan 2010
    Posts
    8,689
    Mentioned
    41 Post(s)
    Tagged
    0 Thread(s)

    Re: Video file properties on the command line?

    ffprobe will give duration.

    It's provided by the ffmpeg package.

    I'm not familar with mediainfo.
    Last edited by smr54; 21st September 2012 at 05:49 AM.

  10. #10
    Join Date
    Dec 2011
    Location
    Coimbatore
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Video file properties on the command line?

    @ Marko, you can also download mediainfo package from here and install it using rpm commands.

    Note : It requires libmediainfo0 and libzen0 packages. So install those package before and intsall mediainfo

    rpm -ivh mediainfo.x.x.rpm

    Please let me know if you find any issues

  11. #11
    Join Date
    Sep 2009
    Location
    Johannesburg, South Africa
    Posts
    253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Video file properties on the command line?

    Quote Originally Posted by sathishkumarkp
    To get the video and audio file properties, I usually use mediainfo. This is available for all major linux distributions.
    Download the rpm from http://mediainfo.sourceforge.net/en/Download/Fedora for your version of fedora.

    then as root
    Code:
    yum install --nogpgcheck mediainfo-gui-0.7.53.******.rpm
    Host Machine
    OS: Fedora 20, Desktop: Gnome, Kernel: 3.11.fc20.x86_64, Processor: Intel i3-2100 @ 3.10GHz, RAM: 8GB
    Motherboard: ASUS P8H61-M LE/USB3, Display: Mecer LCD 1280x1024, Benq LCD 1280x1024, Hisense LCD 1920x Graphics: ATI Radeon HD 5450

Similar Threads

  1. Identify video card from command line?
    By lhouk in forum Hardware
    Replies: 3
    Last Post: 11th February 2009, 07:34 PM
  2. reading name of data file from command line in c++
    By Goldy3311 in forum Programming & Packaging
    Replies: 1
    Last Post: 1st February 2006, 07:27 AM
  3. Command line to get output on a file
    By satimis in forum Programming & Packaging
    Replies: 4
    Last Post: 26th June 2005, 02:21 PM
  4. How do I edit a file in the command line?
    By BoomerFZ1 in forum Using Fedora
    Replies: 3
    Last Post: 5th April 2005, 08:28 PM

Tags for this Thread

Posting Permissions

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