Opened 12 months ago

Closed 8 months ago

#5904 closed defect (fixed)

mov regression

Reported by: cehoyos Owned by: isasi
Priority: important Component: avformat
Version: git-master Keywords: mov edts regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2605/
The samples from ticket #2605 are not transcoded in-sync since ca6cae73

$ ffmpeg -i audio_silence_after_ffmpeg_upgrade.mov -qscale 2 out.avi
ffmpeg version N-82095-g5867234 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 33.100 / 55. 33.100
  libavcodec     57. 63.103 / 57. 63.103
  libavformat    57. 53.100 / 57. 53.100
  libavdevice    57.  0.103 / 57.  0.103
  libavfilter     6. 64.100 /  6. 64.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x3a583c0] STSZ sample size 1 invalid (too small), ignoring
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'audio_silence_after_ffmpeg_upgrade.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf55.7.100
  Duration: 00:00:15.60, start: 0.000000, bitrate: 1768 kb/s
    Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 361 kb/s, 25 fps, 25 tbr, 25k tbn, 50k tbc (default)
    Metadata:
      handler_name    : DataHandler
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 44100 Hz, stereo, s16, 1411 kb/s (default)
    Metadata:
      handler_name    : DataHandler
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to 'out.avi':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    ISFT            : Lavf57.53.100
    Stream #0:0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 480x270 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Lavc57.63.103 mpeg4
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 44100 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Lavc57.63.103 ac3
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> ac3 (native))
Press [q] to stop, [?] for help
[avi @ 0x3c336e0] Non-monotonous DTS in output stream 0:1; previous: 2, current: 0; changing to 3. This may result in incorrect timestamps in the output file.
[avi @ 0x3c336e0] Non-monotonous DTS in output stream 0:1; previous: 3, current: 0; changing to 4. This may result in incorrect timestamps in the output file.
[avi @ 0x3c336e0] Non-monotonous DTS in output stream 0:1; previous: 4, current: 0; changing to 5. This may result in incorrect timestamps in the output file.

...

...

[avi @ 0x3c336e0] Non-monotonous DTS in output stream 0:1; previous: 221, current: 0; changing to 222. This may result in incorrect timestamps in the output file.
[avi @ 0x3c336e0] Non-monotonous DTS in output stream 0:1; previous: 222, current: 0; changing to 223. This may result in incorrect timestamps in the output file.
[avi @ 0x3c336e0] Non-monotonous DTS in output stream 0:1; previous: 223, current: 0; changing to 224. This may result in incorrect timestamps in the output file.
frame=  381 fps=150 q=2.0 Lsize=     933kB time=00:00:15.36 bitrate= 497.6kbits/s speed=6.04x 
video:725kB audio:184kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.664956%

Change History (6)

comment:1 Changed 8 months ago by cehoyos

  • Keywords edts added

comment:2 follow-up: Changed 8 months ago by isasi

stts:
sample count , sample duration
688128 , 0
0, 0

The sample duration of in stts atom is zero . I don't know if we need to support such file?
The problem is that there are 688128 audio samples with zero timestamp in the audio stream index. With edit list patch we are seeking to timestamp zero for the editlist entry, using av_index_search_timestamp which does a binary search and lands somewhere in the middle. So half the audio samples are removed from the index. Its easy to fix the search function, but don't know if we need to support such file which seems to be corrupt ?

comment:3 in reply to: ↑ 2 Changed 8 months ago by cehoyos

Replying to isasi:

stts:
sample count , sample duration
688128 , 0
0, 0

The sample duration of in stts atom is zero . I don't know if we need to support such file?

It played fine by default in the past.

The problem is that there are 688128 audio samples with zero timestamp in the audio stream index. With edit list patch we are seeking to timestamp zero for the editlist entry, using av_index_search_timestamp which does a binary search and lands somewhere in the middle. So half the audio samples are removed from the index.

This sounds as if it would be possible to fix this specific sample.

comment:4 Changed 8 months ago by isasi

  • Owner set to isasi
  • Status changed from new to open

comment:5 Changed 8 months ago by isasi

patch sent.

comment:6 Changed 8 months ago by cehoyos

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