[FFmpeg-trac] #3019(avfilter:open): fieldmatch + decimate causes out-of-sync audio

FFmpeg trac at avcodec.org
Thu Oct 3 00:48:05 CEST 2013


#3019: fieldmatch + decimate causes out-of-sync audio
-------------------------------------+-------------------------------------
             Reporter:               |                    Owner:
  spookybathtub                      |                   Status:  open
                 Type:  defect       |                Component:  avfilter
             Priority:  normal       |               Resolution:
              Version:  git-master   |               Blocked By:
             Keywords:  pullup       |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Changes (by cehoyos):

 * status:  new => open
 * reproduced:  0 => 1


Comment:

 (transport streams do not have a header.)

 The problem is reproducible:
 {{{
 $ ffmpeg -i NCIS-trim.ts -vf fieldmatch,decimate -qscale 2 out.avi
 ffmpeg version N-56827-g64327aa Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Oct  3 2013 00:11:23 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl
   libavutil      52. 46.100 / 52. 46.100
   libavcodec     55. 33.101 / 55. 33.101
   libavformat    55. 19.100 / 55. 19.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 88.100 /  3. 88.100
   libswscale      2.  5.100 /  2.  5.100
   libswresample   0. 17.103 /  0. 17.103
   libpostproc    52.  3.100 / 52.  3.100
 [mpeg2video @ 0x32058c0] Invalid frame dimensions 0x0.
     Last message repeated 2 times
 Input #0, mpegts, from 'NCIS-trim.ts':
   Duration: 00:00:54.76, start: 11120.950633, bitrate: 15319 kb/s
   Program 258
     Stream #0:0[0xe0]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
 yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], max. 79975 kb/s, 29.97
 fps, 29.97 tbr, 90k tbn, 59.94 tbc
     Stream #0:1[0x80](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
 5.1(side), fltp, 384 kb/s
     Stream #0:2[0x81](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
 mono, fltp, 96 kb/s (visual impaired)
 Please use -q:a or -q:v, -qscale is ambiguous
 Output #0, avi, to 'out.avi':
   Metadata:
     ISFT            : Lavf55.19.100
     Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080 [SAR
 1:1 DAR 16:9], q=2-31, 200 kb/s, 23.98 tbn, 23.98 tbc
     Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz,
 5.1(side), fltp, 448 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (mpeg2video -> mpeg4)
   Stream #0:1 -> #0:1 (ac3 -> ac3)
 Press [q] to stop, [?] for help
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #1 at 0.837678 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #2 at 0.871044 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #4 at 0.937778 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #5 at 0.971144 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #9 at 1.10461 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #11 at 1.17134 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #12 at 1.20471 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #14 at 1.27144 is still
 interlacedkbits/s
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #15 at 1.30481 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #16 at 1.33818 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #17 at 1.37154 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #26 at 1.67184 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #28 at 1.73858 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #29 at 1.77194 is still
 interlacedkbits/s
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #34 at 1.93878 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #36 at 2.00551 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #37 at 2.03888 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #56 at 2.67284 is still
 interlacedkbits/s
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #57 at 2.70621 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #61 at 2.83968 is still
 interlacedkbits/s
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #62 at 2.87304 is still interlaced
 [Parsed_fieldmatch_0 @ 0x31eb2e0] Frame #497 at 17.3875 is still
 interlacedbits/s
 [mpeg2video @ 0x32058c0] ac-tex damaged at 19 150:00:54.01
 bitrate=13201.0kbits/s
 [mpeg2video @ 0x32058c0] Warning MVs not available
 [mpeg2video @ 0x32058c0] concealing 6360 DC, 6360 AC, 6360 MV errors in B
 frame
 frame= 1294 fps= 41 q=2.0 Lsize=   87558kB time=00:00:54.01
 bitrate=13278.9kbits/s
 video:84523kB audio:2954kB subtitle:0 global headers:0kB muxing overhead
 0.091787%
 }}}
 out.avi plays horribly out-of-sync, this does not change with -ss 4 (to
 skip the problematic frames in the beginning).
 (It should be noted imo that both filmdint and pullup have no problem with
 the frame at 17.3875.)

 The following is just for the record:
 The following two command lines seem to work fine, ie no combing artefacts
 in the output file which (at least mostly) in-sync:
 $ mencoder NCIS-trim.ts -ovc lavc -lavcopts vqscale=2 -oac faac -vf
 filmdint -ofps 24000/1001 -o out.avi -demuxer lavf
 $ mencoder NCIS-trim.ts -ovc lavc -lavcopts vqscale=2 -oac faac -vf pullup
 -ofps 24000/1001 -o out.avi -demuxer lavf

 The following produces a file that plays in sync but the inverse telecine
 process mostly / completely fails: two out of four frames are still
 interlaced:
 {{{
 $ ffmpeg -i NCIS-trim.ts -vf pullup,fps=24000/1001 -qscale 2 out.avi
 ffmpeg version N-56827-g64327aa Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Oct  3 2013 00:11:23 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl
   libavutil      52. 46.100 / 52. 46.100
   libavcodec     55. 33.101 / 55. 33.101
   libavformat    55. 19.100 / 55. 19.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 88.100 /  3. 88.100
   libswscale      2.  5.100 /  2.  5.100
   libswresample   0. 17.103 /  0. 17.103
   libpostproc    52.  3.100 / 52.  3.100
 [mpeg2video @ 0x1b248c0] Invalid frame dimensions 0x0.
     Last message repeated 2 times
 Input #0, mpegts, from 'NCIS-trim.ts':
   Duration: 00:00:54.76, start: 11120.950633, bitrate: 15319 kb/s
   Program 258
     Stream #0:0[0xe0]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
 yuv420p(tv,                  bt709), 1920x1080 [SAR 1:1 DAR 16:9], max.
 79975 kb/s, 29.97 fps, 29.97 tbr, 90k tbn,                  59.94 tbc
     Stream #0:1[0x80](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
 5.1(side), fltp                 , 384 kb/s
     Stream #0:2[0x81](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
 mono, fltp, 96                  kb/s (visual impaired)
 Please use -q:a or -q:v, -qscale is ambiguous
 Output #0, avi, to 'out.avi':
   Metadata:
     ISFT            : Lavf55.19.100
     Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080 [SAR
 1:1 DAR 16                 :9], q=2-31, 200 kb/s, 23.98 tbn, 23.98 tbc
     Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz,
 5.1(side), fltp, 44                 8 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (mpeg2video -> mpeg4)
   Stream #0:1 -> #0:1 (ac3 -> ac3)
 Press [q] to stop, [?] for help
 [mpeg2video @ 0x1b248c0] ac-tex damaged at 19 150:00:54.34
 bitrate=19299.5kbits/s
 [mpeg2video @ 0x1b248c0] Warning MVs not available
 [mpeg2video @ 0x1b248c0] concealing 6360 DC, 6360 AC, 6360 MV errors in B
 frame
 frame= 1291 fps= 84 q=2.0 Lsize=  129571kB time=00:00:54.72
 bitrate=19397.3kbits/s
 video:126536kB audio:2954kB subtitle:0 global headers:0kB muxing overhead
 0.062330%
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/3019#comment:9>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list