[FFmpeg-devel] reported length of a clip
Marcus Engene
ffmpeg2
Tue May 13 13:27:00 CEST 2008
Hi,
Looking in libavformat/utils.c:av_update_stream_timings() i notice that
the length of the clip is the longest of the streams.
If I have a clip whose audio stream is longer than the video stream, the
length of the audio stream is reported as a consequence of this.
To me, in this context, the length of the video stream in the important
length, but in an example clip this is not to be read anywhere:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '000117245.mov':
Duration: 00:00:09.9, start: 0.000000, bitrate: 168686 kb/s
Stream #0.0(eng): Video: mjpegb, yuvj422p, 1920x1080 [PAR 0:1 DAR
0:1], 29.97 tb(r)
Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Stream #0.2(eng): Data: tmcd / 0x64636D74
I guess the max length value makes sense on Input #0, but would it be
possible to present the individual lengths of the streams somehow?
mencoder with verbose output reports the following for the clip
mentioned above:
MEncoder 1.0rc1-3.4.2 (C) 2000-2006 MPlayer Team
CPU: Genuine Intel(R) CPU T2300 @ 1.66GHz (Family: 6, Model:
14, Stepping: 8)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection.
init_freetype
get_path('font/font.desc') ->
'C:\cygwin\home\ehsmeng/mplayer/font/font.desc'
font: can't open file: C:\cygwin\home\ehsmeng/mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
WINSOCK2 init: 0
[file] File size is 210418198 bytes
STREAM: [file] 000117245.mov
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
success: format: 0 data: 0x0 - 0xc8aba16
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for NuppelVideo
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename 000117245.mov ext: .mov
Trying demuxer 7 based on filename extension
Checking for MOV
ISO: File Type Major Brand: Original QuickTime
ISO: File Type Minor Version: 537199360
ISO: File Type Compatible Brand #0: qt
ISO: File Type Compatible Brand #1:
ISO: File Type Compatible Brand #2:
ISO: File Type Compatible Brand #3:
MOV: 'WIDE' chunk found!
MOV: Movie DATA found!
MOV: Movie DATA found!
MOV: 'WIDE' chunk found!
MOV: Movie DATA found!
MOV: Movie header found!
Quicktime/MOV file format detected.
MOV: Movie header (100 bytes): tscale=30000 dur=233233
--------------
MOV: Track #0:
MOV: Track header!
tkhd len=84 ver=0 flags=0x0 id=1 dur=233233 lay=0 vol=0
MOV: unknown chunk: load 16
MOV: Edit atom!
MOV: Edit list table (1 entries) (ver:0,flags:0)
MOV: entry#0: duration: 233233 start time: 0 speed: 1.0x
MOV: unknown chunk: tref 12
MOV: Media stream!
MOV: Media header!
MOV: Handler header: mhlr/vide (appl) Apple Video Media Handler
MOV: Media info!
MOV: Video header!
MOV: Handler header: dhlr/alis (appl) Apple Alias Data Handler
MOV: unknown chunk: dinf 28
MOV: Sample info!
MOV: Description list! (cnt:1)
MOV: desc #0: mjpb (96 bytes)
MOV: Sample duration table! (1 blocks)
MOV: Sample->Chunk mapping table! (1 blocks) (ver:0,flags:0)
MOV: Sample size table! (entries=233 ss=0) (ver:0,flags:0)
MOV: Chunk offset table! (233 chunks)
MOV track #0: 233 chunks, 233 samples
pts=233233 scale=30000 time=7.774
EL#0: pts=0 1st_sample=0 frames=233 (7.774s) pts_offs=0
==> Found video stream: 0
MOV: Found unsupported Field-Handling movie atom (10)!
MOV: Found unsupported Gamma-Correction movie atom (12)!
Image size: 1920 x 1080 (24 bpp)
Display size: 1920 x 1080
Fourcc: mjpb Codec: 'Motion JPEG B'
--------------
MOV: Track #1:
MOV: Track header!
tkhd len=84 ver=0 flags=0x0 id=2 dur=233233 lay=0 vol=256
MOV: Edit atom!
MOV: Edit list table (1 entries) (ver:0,flags:0)
MOV: entry#0: duration: 233233 start time: 0 speed: 1.0x
MOV: unknown chunk: tref 12
MOV: Media stream!
MOV: Media header!
MOV: Handler header: mhlr/soun (appl) Apple Sound Media Handler
MOV: Media info!
MOV: Sound header!
MOV: Handler header: dhlr/alis (appl) Apple Alias Data Handler
MOV: unknown chunk: dinf 28
MOV: Sample info!
MOV: Description list! (cnt:1)
MOV: desc #0: sowt (100 bytes)
MOV: Sample duration table! (1 blocks)
MOV: Sample->Chunk mapping table! (2 blocks) (ver:0,flags:0)
MOV: Sample size table! (entries=478998 ss=1) (ver:0,flags:0)
MOV: Chunk offset table! (11 chunks)
MOV track #1: 11 chunks, 0 samples
pts=478998 scale=48000 time=9.979
==> Found audio stream: 1
Audio bits: 16 chans: 2 rate: 48000
Audio header: samp/pack=1 bytes/pack=2 bytes/frame=4 bytes/samp=2
Audio extra header: len=64 fcc=0x6368616E
MOV: Found unknown audio atom Fourcc: sowt
--------------
MOV: Track #2:
MOV: Track header!
tkhd len=84 ver=0 flags=0x0 id=3 dur=233233 lay=0 vol=0
MOV: Edit atom!
MOV: Edit list table (1 entries) (ver:0,flags:0)
MOV: entry#0: duration: 233233 start time: 0 speed: 1.0x
MOV: Media stream!
MOV: Media header!
MOV: Handler header: mhlr/tmcd (appl) Time Code Media Handler
MOV: Media info!
MOV: Generic header!
MOV: Handler header: dhlr/alis (appl) Apple Alias Data Handler
MOV: unknown chunk: dinf 28
MOV: Sample info!
MOV: Description list! (cnt:1)
MOV: desc #0: tmcd (18 bytes)
MOV: Sample duration table! (1 blocks)
MOV: Sample->Chunk mapping table! (1 blocks) (ver:0,flags:0)
MOV: Sample size table! (entries=1 ss=4) (ver:0,flags:0)
MOV: Chunk offset table! (1 chunks)
MOV track #2: 1 chunks, 0 samples
pts=233233 scale=30000 time=7.774
EL#0: pts=0 1st_sample=0 frames=1 (7.774s) pts_offs=0
Generic track - not completely understood! (id: 2)
--------------
Quicktime Clip Info:
MOV: longest streams: A: #1 (11 samples) V: #0 (233 samples)
VIDEO: [mjpb] 1920x1080 24bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:7 fourcc:0x62706A6D size:1920x1080 fps:29.97 ftime:=0.0334
Exiting...
More information about the ffmpeg-devel
mailing list