Opened 7 years ago

Closed 7 years ago

#6676 closed defect (duplicate)

mpeg2 decoder always output some redundant dummy frames for interlace videos

Reported by: Zhong,Li Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: mpeg2 decoder
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
If a mpeg2 video is a field video, ffmpeg will always insert a dummy frame when decoding the first key filed picture. And the dummy frame will be output later.
Take the attachment file (tcela-8-fp-dp.bits.mpeg2) as example, this clip has 4 frames (8 fields), but 5 frames will be output after decoding, the first output frame is a redundant dummy frame.

How to reproduce:
ffmpeg -i /root/Videos/yami_mpeg2/tcela-8-fp-dp.bits.mpeg2 -pix_fmt yuv420p /root/Videos/tcela-8-fp-dp.bits.mpeg_sw_720x480.yuv
ffmpeg version N-87349-g0426e77108 Copyright (c) 2000-2017 the FFmpeg developers

built with gcc 6.3.0 (Ubuntu 6.3.0-12ubuntu2) 20170406
configuration: --prefix=/opt/X11R7/ --enable-vaapi --enable-libx264 --enable-libx265 --enable-gpl --disable-optimizations --enable-debug=3
libavutil 55. 75.100 / 55. 75.100
libavcodec 57.106.101 / 57.106.101
libavformat 57. 82.101 / 57. 82.101
libavdevice 57. 8.101 / 57. 8.101
libavfilter 6.105.100 / 6.105.100
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100

[mpegvideo @ 0x557bd94c37e0] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegvideo, from '/root/Videos/yami_mpeg2/tcela-8-fp-dp.bits.mpeg2':

Duration: 00:00:00.15, bitrate: 15000 kb/s

Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, bottom first), 720x480 [SAR 8:9 DAR 4:3], 15000 kb/s, 30 fps, 30 tbr, 1200k tbn, 60 tbc

Stream mapping:

Stream #0:0 -> #0:0 (mpeg2video (native) -> rawvideo (native))

Press [q] to stop, ? for help
Output #0, rawvideo, to '/root/Videos/tcela-8-fp-dp.bits.mpeg_sw_720x480.yuv':

Metadata:

encoder : Lavf57.82.101
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=2-31, 124416 kb/s, 30 fps, 30 tbn, 30 tbc
Metadata:

encoder : Lavc57.106.101 rawvideo

frame= 5 fps=0.0 q=-0.0 Lsize= 2531kB time=00:00:00.16 bitrate=124415.8kbits/s speed=18.1x
video:2531kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

Change History (1)

comment:1 by Zhong,Li, 7 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.