How to determine which codec a video is encoded in

Dotan Cohen dotancohen at gmail.com
Mon Jul 5 19:26:09 UTC 2010


On 5 July 2010 22:18, Florian Diesch <diesch at spamfence.net> wrote:
> Dotan Cohen <dotancohen at gmail.com> writes:
>
>> I have some video files that I need to know what codec is used to
>> decode them. I know that the Windows software G-spot will help, is
>> there anything for Linux / Ubuntu? I have googled and found nothing,
>> and the ffmpeg manpage does not give any information on the topic. I
>> even tried "strings" on the files but that yielded nothing useful!
>
> I'm using this shell function:
>
> --8<---------------cut here---------------start------------->8---
> vinfo(){
>  mplayer -vo null -ao null -frames 0 -identify "$@" 2>/dev/null | grep "^ID"
> }
> --8<---------------cut here---------------end--------------->8---
>

Thanks, Florian, but file still has it beat!

✈dcl:toDesktop$ mplayer -vo null -ao null -frames 0 -identify
d02-001.3gp 2>/dev/null | grep "^ID"
ID_VIDEO_ID=0
ID_AUDIO_ID=1
ID_FILENAME=d02-001.3gp
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=mp4v
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=640
ID_VIDEO_HEIGHT=480
ID_VIDEO_FPS=1000.000
ID_VIDEO_ASPECT=1.3333
ID_AUDIO_FORMAT=samr
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=8000
ID_AUDIO_NCH=1
ID_LENGTH=202.24
ID_SEEKABLE=1
ID_CHAPTERS=0
ID_VIDEO_CODEC=ffodivx
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=8000
ID_AUDIO_NCH=1
ID_AUDIO_CODEC=ffamrnb
ID_EXIT=EOF
✈dcl:toDesktop$ file d02-001.3gp
d02-001.3gp: ISO Media, MPEG v4 system, 3GPP
✈dcl:toDesktop$


-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com




More information about the ubuntu-users mailing list