how to extract video and audio meta data?

How can you determine video meta data eg container codex dimensions aspect ratio in an existing video file?

  • Answer:

    Okay, two possible ways: 1) The GSpot Codec Information Appliance from http://www.headbands.com/gspot/ This is a really fantastic utility - but it only runs in Windows... :( 2) Use mplayer in -identify mode. Here is a very quick and dirty script I wrote: #!/bin/bash # run mplayer in -identify mode and capture output # # uncomment and amend the next line if mplayer is not in your path # export mplayer_PATH= {your path to mplayer} # info="$mplayer_PATH/mplayer -identify -frames 0 -vo null -ao null $1 2>/dev/null | grep ID_ >> video_probe_results" eval "$info"; cat "video_probe_results" rm "video_probe_results" The sort of output it gives you is: ID_VIDEO_ID=0 ID_AUDIO_ID=1 ID_FILENAME=../Desktop/CG_SC_R01_copy.mp4 ID_DEMUXER=mov ID_VIDEO_FORMAT=avc1 ID_VIDEO_BITRATE=0 ID_VIDEO_WIDTH=346 ID_VIDEO_HEIGHT=288 ID_VIDEO_FPS=25.000 ID_VIDEO_ASPECT=0.0000 ID_AUDIO_FORMAT=mp4a ID_AUDIO_BITRATE=256000 ID_AUDIO_RATE=44100 ID_AUDIO_NCH=2 ID_LENGTH=1652.36 ID_VIDEO_CODEC=ffh264 ID_AUDIO_BITRATE=256000 ID_AUDIO_RATE=44100 ID_AUDIO_NCH=2 ID_AUDIO_CODEC=faad

wiki.answers.com Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.