Opened 14 years ago

Closed 13 years ago

#1730 closed defect (fixed)

MOV demuxer uses wrong method to get frame rate

Reported by: dominic@… Owned by: r_togni@…
Priority: very important Component: demuxer
Version: 1.0rc4 Severity: critical
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

When demuxing MOV files using demuxer -mov the wrong frame rate is read from files with VFR which leads to wrongly encoded video in mencoder.

The MOV demuxer should use the same method as lavf to work out the frame rate of these files.

Change History (4)

comment:1 by dominic@…, 14 years ago

Version: 1.0rc21.0rc4

Any news on this at all?

comment:2 by dominic@…, 14 years ago

Frame rate read as 15.984 which is incorrect. Encoded file is fine as forced to 23.976 fps but cannot always do this as batching files and using mplayer within an application.

C:\mplayer>mencoder -demuxer mov
xxxx\mencodertests\testmovhd239
8.mov -fps 23.976 -o
xxxx\mencodertests\testmovhd2398.flv -vf ya
dif=2,scale=512:-3 -af channels=2,resample=44100 -mc 0 -ovc x264 -x264encopts gl
obal_header:level_idc=30:bframes=0:bitrate=448:preset=veryfast:tune=fastdecode -
oac faac -faacopts mpeg=4:object=2:br=64:raw -of lavf
MEncoder SVN-r31743-4.2.5 (C) 2000-2010 MPlayer Team
158 audio & 346 video codecs
success: format: 0 data: 0x0 - 0xc5c8f63
Quicktime/MOV file format detected.
[mov] Video stream found, -vid 0
[mov] Audio stream found, -aid 1
[mov] Audio stream found, -aid 2
VIDEO: [apch] 1920x1080 24bpp 15.984 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:7 fourcc:0x68637061 size:1920x1080 fps:15.984 ftime:=0.0626
Input fps will be interpreted as 23.976 instead.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s24le, 2304.0 kbit/100.00% (ratio: 288000->288000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
MUXER_LAVF *
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*
OK, exit.
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=512 h=-3]
Opening video filter: [yadif=2]
==========================================================================
Opening video decoder: [qtvideo] Quicktime Video decoder

AE 00 00 00 61 70 63 68 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00
80 07 38 04 00 00 48 00 00 00 48 00 00 00 00 00
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 18 00 FF FF 00 00 00 12 63 6F 6C 72 6E 63
6C 63 00 01 00 01 00 01 00 00 00 0A 66 69 65 6C
01 00 00 00 00 10 70 61 73 70 00 00 00 01 00 00
00 01 00 00 00 28 63 6C 61 70 00 00 07 60 00 00
00 01 00 00 04 26 00 00 00 01 00 00 00 00 00 00
00 01 00 00 00 00 00 00 00 01 00 00 00 00

=============== ImageDescription at 0364fbb8 ==================
idSize=0xAE fourcc=0x68637061
ver=0 rev=0 vendor=0x00000000
tempQ=0 spatQ=768 dim: 1920 x 1080 dpi: 72.00 x 72.00 depth: 24
dataSize=0 frameCount=1 clutID=-1
name=
00 00 00 12 | 63 6F 6C 72 | 6E 63 6C 63 | 00 01 00 01
=========================================================
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 002ba000]using unscaled yuyv422 -> yuv420p special converter
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High, level 3.0
Selected video codec: [qtprores] vfm: qtvideo (Apple ProRes 422 (HQ) decoder)
==========================================================================
Pos: 0.0s 1f ( 0%) 0.00fps Trem: 1min 0mb A-V:0.000 [0:0]

1 duplicate frame(s)!
Muxer frame buffer cannot allocate memory!
Pos: 0.0s 23f (10%) 6.36fps Trem: 0min 0mb A-V:0.000 [0:0]
VIDEO CODEC ID: 28
AUDIO CODEC ID: 15002, TAG: 0
Writing header...
[flv @ 0027e9b0]Codec for stream 0 does not use global headers but container for
mat requires global headers
[flv @ 0027e9b0]Codec for stream 1 does not use global headers but container for
mat requires global headers
Pos: 8.3s 222f (98%) 7.35fps Trem: 0min 0mb A-V:0.000 [440:105]

Flushing video frames.
Writing index...

Video stream: 413.378 kbit/s (51672 B/s) size: 476292 bytes 9.218 secs 222
frames

Audio stream: 105.483 kbit/s (13185 B/s) size: 116036 bytes 8.800 secs
x264 [info]: frame I:6 Avg QP:17.46 size: 16113
x264 [info]: frame P:215 Avg QP:19.80 size: 1766
x264 [info]: mb I I16..4: 28.6% 26.1% 45.4%
x264 [info]: mb P I16..4: 1.4% 0.2% 0.1% P16..4: 30.9% 7.7% 2.7% 0.0% 0
.0% skip:56.9%
x264 [info]: final ratefactor: 17.73
x264 [info]: 8x8 transform intra:21.3% inter:39.6%
x264 [info]: coded y,uvDC,uvAC intra: 51.4% 56.9% 37.3% inter: 14.5% 8.3% 0.5%
x264 [info]: i16 v,h,dc,p: 79% 8% 11% 2%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 11% 26% 3% 16% 9% 6% 6% 6%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 12% 19% 3% 13% 10% 8% 7% 8%
x264 [info]: i8c dc,h,v,p: 45% 33% 18% 4%
x264 [info]: kb/s:413.38

comment:3 by dominic@…, 14 years ago

Same command but using mplayer demuxer detects frame rate correctly but cannot decode as requires binary codecs.

C:\mplayer>mencoder
xxxx\mencodertests\testmovhd2398.mov -fps 23
.976 -o
xxxx\mencodertests\testmovhd2398.flv -vf yadif=2,scale=5
12:-3 -af channels=2,resample=44100 -mc 0 -ovc x264 -x264encopts global_header:l
evel_idc=30:bframes=0:bitrate=448:preset=veryfast:tune=fastdecode -oac faac -faa
copts mpeg=4:object=2:br=64:raw -of lavf
MEncoder SVN-r31743-4.2.5 (C) 2000-2010 MPlayer Team
158 audio & 346 video codecs
success: format: 0 data: 0x0 - 0xc5c8f63
libavformat file format detected.
[lavf] stream 0: video (unknown), -vid 0
[lavf] stream 1: audio (pcm_s24le), -aid 0, -alang eng
[lavf] stream 2: audio (pcm_s24le), -aid 1, -alang eng
VIDEO: [apch] 1920x1080 24bpp 23.976 fps 171642.8 kbps (20952.5 kbyte/s)
[V] filefmt:44 fourcc:0x68637061 size:1920x1080 fps:23.976 ftime:=0.0417
Input fps will be interpreted as 23.976 instead.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s24le, 0.0 kbit/0.00% (ratio: 0->288000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
MUXER_LAVF *
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*
OK, exit.
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=512 h=-3]
Opening video filter: [yadif=2]
==========================================================================
Opening video decoder: [qtvideo] Quicktime Video decoder
sh->ImageDesc not set, cannot use binary QuickTime codecs (try -demuxer mov?)
VDecoder init failed :(
Cannot find codec matching selected -vo and video format 0x68637061.
==========================================================================

Exiting...

comment:4 by dominic@…, 13 years ago

Resolution: fixed
Status: newclosed

Duplicate. Same as 1739 now fixed.

Note: See TracTickets for help on using tickets.