Opened 6 years ago

Closed 5 years ago

#606 closed defect (fixed)

A/V desync for 60fps H264 in avi on playback

Reported by: kyh96403 Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: aac avi pts
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Hi...
I found some bug...

libavcodec

cook.c
at line 1078 it maybe changed by
"if (avctx->extradata_size >= 8)" -> "if (extradata_size >= 8)"
sample: RV3.COOK [Test].rm

vc1 decoder
Image is incorrect
(before version(interlace supported) is ok...)
sample: vc1_error_spilt.avi

ac3/dca decoder
at x86_64 version ff_int32_to_float_fmul_scalar_sse and ff_int32_to_float_fmul_scalar_sse2 is crash or noise
sample: vc1_error_spilt.avi(dca) is crash.
sample: ac3_error_spilt.ts(ac3) has noise.

libavformat

avidec
sample: 60fps.avi audio's pts is double speed.

Change History (8)

comment:1 follow-up: Changed 6 years ago by cehoyos

Please upload samples to http://www.datafilehost.com/ and post the download link here.

For future bug reports: (that are very welcome!)
Please open one ticket per issue, i.e. one ticket for the problem with cook, one for the vc1 artefacts, one for "crash or noise" and one for the avi sample.
Please add a command line to reproduce the issue you see (ffmpeg, not ffplay if possible) and post the command line together with the complete, uncut console output in the ticket.
(And add a link to a sample that allows to reproduce the problem.)

comment:2 in reply to: ↑ 1 Changed 6 years ago by michael

Replying to cehoyos:

Please upload samples to http://www.datafilehost.com/ and post the download link here.

The samples are available at http://streams.videolan.org/incoming/

comment:3 in reply to: ↑ description Changed 6 years ago by michael

Replying to kyh96403:

cook.c
at line 1078 it maybe changed by
"if (avctx->extradata_size >= 8)" -> "if (extradata_size >= 8)"
sample: RV3.COOK [Test].rm

suggested change locally applied, will push after tests, but the change looks correct

comment:4 in reply to: ↑ description Changed 6 years ago by michael

Replying to kyh96403:

vc1 decoder
Image is incorrect
(before version(interlace supported) is ok...)
sample: vc1_error_spilt.avi

I see one artifact in the last B frame that is caused by the frame being truncated and that very long ago was not shown because the last frame was lost earlier.

ac3/dca decoder
at x86_64 version ff_int32_to_float_fmul_scalar_sse and ff_int32_to_float_fmul_scalar_sse2 is crash or noise
sample: vc1_error_spilt.avi(dca) is crash.

Do you use WIN64 ? which exact version of ffmpeg do you use ?
no, i cannot reproduce a crash

comment:5 Changed 6 years ago by cehoyos

  • Component changed from avcodec to undetermined
  • Keywords h264 avi added
  • Reproduced by developer set
  • Status changed from new to open
  • Summary changed from cook vc1 ac3/dca avidec's problem. to A/V desync for 60fps H264 in avi on playback

The cook patch was applied, Michael and Mashiat fixed the vc1 regression, I was unable to reproduce a problem with the ac3 / dca samples.

60fps.avi can be converted with ffmpeg, plays badly (increasing A/V desync, desync is correctly indicated on status line) with ffplay and mplayer -demuxer lavf - video plays too slow (works fine with mplayer -demuxer avi).

$ ffmpeg -i 60fps.avi
ffmpeg version N-35239-ge99c4bb, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov 27 2011 19:28:12 with gcc 4.5.3
  configuration: --cc='/usr/local/gcc-4.5.3/bin/gcc -m32'
  libavutil    51. 29. 1 / 51. 29. 1
  libavcodec   53. 38. 1 / 53. 38. 1
  libavformat  53. 22. 0 / 53. 22. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 50. 0 /  2. 50. 0
  libswscale    2.  1. 0 /  2.  1. 0
[h264 @ 0x8d9fd40] Current profile doesn't provide more RBSP data in PPS, skipping
[avi @ 0x8d99aa0] Switching to NI mode, due to poor interleaving
[avi @ 0x8d99aa0] max_analyze_duration 5000000 reached at 5016000

Seems stream 0 codec frame rate differs from container frame rate: 119.88 (59939/500) -> 59.94 (60000/1001)
Input #0, avi, from '60fps.avi':
  Metadata:
    title           : Boa_Test.mpg
    encoder         : Lavf53.4.0
  Duration: 00:00:40.72, start: 0.000000, bitrate: 2219 kb/s
    Stream #0:0: Video: h264 (Main) (H264 / 0x34363248), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 59.94 fps, 59.94 tbr, 59.94 tbn, 119.88 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16, 128 kb/s
At least one output file must be specified

comment:6 Changed 6 years ago by kyh96403

cook and vc1 is work fine!!
Thanks

dca/ac3 is already fixed.
But I cannot find FFmpeg's log.
Here is Libav's log(http://git.libav.org/?p=libav.git;a=commitdiff;h=5463e83dbc9825f3962118f0d3328be82aea3308)

comment:7 Changed 5 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords aac added; h264 removed

comment:8 Changed 5 years ago by cehoyos

  • Keywords pts added
  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.