[MPlayer-users] Get dimensions and duration of raw h.264 video

Marlon Smith marlon.smith10 at gmail.com
Tue Feb 7 22:43:25 CET 2012


On Tue, 2012-02-07 at 21:33 +0000, Carl Eugen Hoyos wrote:

> Marlon Smith <marlon.smith10 <at> gmail.com> writes:
> 
> > I'd like to use mplayer to find the dimensions (width + height) and
> > duration (either in # of frames or seconds) or a raw h.264 video.
> 
> Please use ffmpeg -i file (or ffprobe)
> 
> Carl Eugen
> 
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users


Hi Carl,

Thanks for the help.  ffmpeg does determine the correct dimensions, and
gives me this:

Seems stream 0 codec frame rate differs from container frame rate: 60.00
(60/1) -> 30.00 (60/2)
Input #0, h264, from './input.264':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: h264, yuv420p, 800x480 [PAR 533:400 DAR
533:240], 30 fps, 30 tbr, 1200k tbn, 60 tbc

I created this video with mencoder, and it looks like mencoder didn't
write the container info properly?  Ideally, I'd like to use mplayer to
parse the information, since I want to include it with an application
I'm writing.  Is there a way I can get mencoder to properly write this
data with the video so that mplayer can read it back?  The video is
800x480, but mplayer shows it as 533x400.  I see those numbers in the
output, but I don't understand what PAR and DAR are.

Thanks again!

Marlon


More information about the MPlayer-users mailing list