[MPlayer-users] How to get the duration(ID_LENGTH) of a Sony MTS video file use "mplayer"?
littlebat
dashing.meng at gmail.com
Wed Sep 12 11:11:32 CEST 2012
On Thu, 06 Sep 2012 15:28:11 +0200
Nico Sabbi <nicola.sabbi at poste.it> wrote:
> littlebat ha scritto:
> > I don't know the technique detail of how to get the duration of a
> > video file. But, if I need a universal method using mplayer to get
> > the duration of a video, I need extra parameter "-demuxer lavf" to
> > get it for a mpegts file. I found "mediainfo" and "ffmpeg" can get
> > the duration of a mpegts file in a universal way. Why can't adopt
> > these estimated ways in mplayer?
>
> I'd be afraid to read how ffmpeg and mediainfo try to guess the
> duration. Short answer: guessing is always the highway to hell.
I have checked some files' duration got by "ffmpeg -i filename" V.S.
playing with mplayer(about 13 files), I found the difference between
them is about 1 second commonly. All of their ID_LENGTH is zero
reported by command "mplayer -identify -vo null -ao null -frames 0
filename". The duration is from 6 seconds to 888 seconds. The format is
MPEG-TS or MPEG-PS. MPEG-TS file is created by Sony DV. MPEG-PS file
come from: [MPlayer-users] mplayer -identify reports incorrect
information for some files:
http://lists.mplayerhq.hu/pipermail/mplayer-users/2012-September/085313.html
Maybe, this guessing duration way is worth considering to used in
mplayer if this guessing way is stable? Better than giving a zero
length?
For example:
1,
Ffmpeg:
Input #0, mpegts, from '00046.MTS':
Duration: 00:14:46.63, start: 1.000033, bitrate: 17355 kb/s
Mplayer play:
A: 887.6 V: 887.6 A-V: 0.061 ct: 0.119 13641/13641 79% 17% 9.5% 2948
0
2,
Ffmpeg:
Input #0, mpegts, from '00047.MTS':
Duration: 00:07:24.67, start: 1.000033, bitrate: 17332 kb/s
Mplayer play:
A: 445.0 V: 445.7 A-V: -0.640 ct: 0.010 1723/1723 77% 4% 1.6% 0 0
3,
Ffmpeg:
Input #0, mpeg, from '5000068_1_Securitas_LED_Ostrava.mpg':
Duration: 00:00:19.80, start: 1.000000, bitrate: 1414 kb/s
Mplayer play:
MPEG-PS file format detected.
V: 20.9 499/499 4% 0% 0.0% 0 0
4,
Ffmpeg:
Input #0, mpeg, from '5000019_1_Calcichew_LED_Praha.mpeg':
Duration: 00:00:09.96, start: 1.000000, bitrate: 1482 kb/s
Mplayer play:
MPEG-PS file format detected.
V: 10.9 249/249 4% 0% 0.0% 0 0
More information about the MPlayer-users
mailing list