Opened 13 years ago

Closed 12 years ago

#475 closed defect (fixed)

Audio desync from video with MXF file

Reported by: Jamie Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mxf
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I've been using KDENLIVE which uses ffmpeg. I've tried playing the file in the preview window and the audio/video desynchronises. Someone on the forums told me to try playing it with ffplay to see if it still desyncs (and it does).
This file is produced strait from the canon XF105. The video is 10 seconds long but is roughly 60mb. The video contains me counting to ten with my fingers and voice.

I have a direct link for download of the video (no bloat/wait/spam):
https://www.dropbox.com/s/fmcnlx5lybuv2aq/AV_Desync.tar.bz2

Attachments (1)

ffplaylog.txt (25.7 KB ) - added by Jamie 13 years ago.
ffplay log

Download all attachments as: .zip

Change History (6)

by Jamie, 13 years ago

Attachment: ffplaylog.txt added

ffplay log

comment:1 by Carl Eugen Hoyos, 13 years ago

Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Works fine with ffmpeg (and MPlayer), but another (related?) problem with the sample can be shown:

$ ffmpeg -i AV_Desync.MXF -acodec copy -vn out.avi
ffmpeg version N-32617-ge78d1a5, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 15 2011 23:18:20 with gcc 4.5.3
  configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc --enable-gpl --enable-version2
  libavutil    51. 16. 0 / 51. 16. 0
  libavcodec   53. 15. 0 / 53. 15. 0
  libavformat  53. 12. 0 / 53. 12. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 40. 0 /  2. 40. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mxf, from 'AV_Desync.MXF':
  Duration: 00:00:10.01, start: 0.000000, bitrate: 52173 kb/s
    Stream #0.0: Video: mpeg2video (4:2:2), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
    Stream #0.1: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.2: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf53.12.0
    Stream #0.0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 1 channels, 768 kb/s
Stream mapping:
  Stream #0.1 -> #0.0 (copy)
Press [q] to stop, [?] for help
[avi @ 0x13042a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 801 >= 801
av_interleaved_write_frame(): Invalid argument

comment:2 by Carl Eugen Hoyos, 13 years ago

Keywords: mxf added

comment:3 by Carl Eugen Hoyos, 12 years ago

Component: undeterminedFFplay

(Sample uploaded to samples/ffmpeg-bugs/trac/ticket475)
Remuxing works fine now, the problem with ffplay is still reproducible.

comment:4 by Marton Balint, 12 years ago

Component: FFplayavformat

Audio packet timestamps are broken.

For each audio frame which only contain 1601 samples, 0 duration is calculated because packet duration is rounded down in compute_pkt_fields of libavformat/utils.c.

comment:5 by Carl Eugen Hoyos, 12 years ago

Resolution: fixed
Status: openclosed

Fixed by Matthieu Bouron.

Note: See TracTickets for help on using tickets.