Opened 7 years ago

Closed 6 years ago

#493 closed enhancement (fixed)

flash h.264 recorded files on FMS - bad duration and timing after ffmpeg conversion

Reported by: kruzel Owned by: michael
Priority: minor Component: undetermined
Version: git-master Keywords: mov edts
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Hi,
I'm using ffmpeg to convert flash player 11 created h.264 file to ffmpeg format.
Its part of a larger functionality.

problem


I'm running the following command:
ffmpeg -i 'host.mp4' -y -an -vcodec libx264 -b 1200k -r 25 -threads 0 -y 'singlevideoconvert.ts'

the original file is ~6 sec long.

after conversion, when playing, for example with ffplay, video playback is freezes for about 6 sec, then start playing, and after another 6 sec video freezes again, but ffplay seems to keep going endlessly.

another thing I see is that ffmpeg wrongly reports duration of 20 sec.
Mp4Box says it ~6 sec, which is correct.

I can provide files and logs.

ffmpeg dump info


ofer@ofer-VirtualBox:~/Development/ffmpegtest/bug-example/test$ ffmpeg -v 9 -loglevel 99 -i host.mp4
ffmpeg version N-32097-gee0ff05, Copyright (c) 2000-2011 the FFmpeg developers

built on Sep 17 2011 21:16:19 with gcc 4.5.2
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-avfilter --enable-filter=movie --enable-librtmp --enable-libspeex
libavutil 51. 13. 0 / 51. 13. 0
libavcodec 53. 12. 0 / 53. 12. 0
libavformat 53. 9. 0 / 53. 9. 0
libavdevice 53. 3. 0 / 53. 3. 0
libavfilter 2. 34. 2 / 2. 34. 2
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x234e460] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x234e460] ISO: File Type Major Brand: f4v
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x234e460] multiple edit list entries, a/v desync might occur, patch welcome

Last message repeated 2 times

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x234e460] avformat_open_input() succeeded
[h264 @ 0x2351020] Unsupported bit depth: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x234e460] flash hack - setting audion codec to speex
[libspeex @ 0x2353780] Missing Speex header, assuming defaults.
[h264 @ 0x2351020] Frame num gap 3 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x234e460] max_analyze_duration 5000000 reached at 5000000

Seems stream 0 codec frame rate differs from container frame rate: 48.00 (48/1) -> 24.00 (48/2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'host.mp4':

Metadata:

major_brand : f4v
minor_version : 0
compatible_brands: isommp42m4v
creation_time : 2017-01-08 23:56:30

Duration: 00:00:20.40, start: 0.000000, bitrate: 172 kb/s

Stream #0.0(eng), 97, 1/1000: Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 1/48, 24 tbr, 1k tbn, 48 tbc
Metadata:

creation_time : 2017-01-08 23:56:30

Stream #0.1(eng), 252, 1/1000: Audio: speex (spex / 0x78657073), 16000 Hz, 1 channels, s16
Metadata:

creation_time : 2017-01-08 23:56:30

Stream #0.2(eng), 1, 1/1000: Data: none (amf0 / 0x30666D61)
Metadata:

creation_time : 2017-01-08 23:56:30

At least one output file must be specified

Ofer

Attachments (4)

host.mp4 (429.3 KB) - added by kruzel 7 years ago.
source mp4 file
ffmpeg bug report.log (2.3 KB) - added by kruzel 7 years ago.
ffmpeg info dump log
host_info.xml (43.8 KB) - added by kruzel 7 years ago.
MP4Box info dump
singlevideoconvert.log (38.1 KB) - added by kruzel 7 years ago.
full log

Download all attachments as: .zip

Change History (9)

Changed 7 years ago by kruzel

source mp4 file

Changed 7 years ago by kruzel

ffmpeg info dump log

Changed 7 years ago by kruzel

MP4Box info dump

Changed 7 years ago by kruzel

full log

comment:1 Changed 7 years ago by cehoyos

  • Component changed from FFmpeg to undetermined
  • Keywords mp4 edit lists added; h.264 conversion duration time removed
  • Priority changed from important to minor
  • Reproduced by developer set
  • Status changed from new to open
  • Type changed from defect to enhancement

Do you think this is a regression?

Afaict, FFmpeg correctly warns that there will be problems (A/V desync) decoding this sample.

Sample is ~6.8 seconds, has 124 frames, only two are encoded (three for out.mov), audio is complete:

$ ffmpeg -i host.mp4 -qscale 2 out.avi
ffmpeg version N-32748-g358d837, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 21 2011 11:43:56 with gcc 4.5.3
  configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc --enable-libspeex
  libavutil    51. 16. 1 / 51. 16. 1
  libavcodec   53. 16. 0 / 53. 16. 0
  libavformat  53. 12. 0 / 53. 12. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 43. 2 /  2. 43. 2
  libswscale    2.  1. 0 /  2.  1. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x12b6780] multiple edit list entries, a/v desync might occur, patch welcome
    Last message repeated 2 times
[libspeex @ 0x12be7a0] Missing Speex header, assuming defaults.

Seems stream 0 codec frame rate differs from container frame rate: 48.00 (48/1) -> 0.08 (1/12)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'host.mp4':
  Metadata:
    major_brand     : f4v
    minor_version   : 0
    compatible_brands: isommp42m4v
    creation_time   : 2017-01-08 23:56:30
  Duration: 00:00:20.40, start: 0.000000, bitrate: 172 kb/s
    Stream #0.0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 0.08 tbr, 1k tbn, 48 tbc
    Metadata:
      creation_time   : 2017-01-08 23:56:30
    Stream #0.1(eng): Audio: speex (spex / 0x78657073), 16000 Hz, 1 channels, s16
    Metadata:
      creation_time   : 2017-01-08 23:56:30
    Stream #0.2(eng): Data: none (amf0 / 0x30666D61)
    Metadata:
      creation_time   : 2017-01-08 23:56:30
[buffer @ 0x12d5c00] w:320 h:240 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
[ac3 @ 0x12d89e0] channel_layout not specified
[ac3 @ 0x12d89e0] No channel layout specified. The encoder will guess the layout, but it might be incorrect.
[libspeex @ 0x12be7a0] Missing Speex header, assuming defaults.
Output #0, avi, to 'out.avi':
  Metadata:
    major_brand     : f4v
    minor_version   : 0
    compatible_brands: isommp42m4v
    creation_time   : 2017-01-08 23:56:30
    ISFT            : Lavf53.12.0
    Stream #0.0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 0.08 tbn, 0.08 tbc
    Metadata:
      creation_time   : 2017-01-08 23:56:30
    Stream #0.1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 16000 Hz, mono, flt, 128 kb/s
    Metadata:
      creation_time   : 2017-01-08 23:56:30
Stream mapping:
  Stream #0.0 -> #0.0 (h264 -> mpeg4)
  Stream #0.1 -> #0.1 (libspeex -> ac3)
Press [q] to stop, [?] for help
frame=    2 fps=  0 q=2.0 Lsize=     134kB time=00:00:06.91 bitrate= 158.5kbits/s dup=0 drop=122
video:14kB audio:108kB global headers:0kB muxing overhead 9.390350%

comment:2 Changed 7 years ago by kruzel

The new flash h.264 is part of adobe release candidate player 11 which is not yet release, so I guess its a new problem we're seeing.

Ofer

comment:3 Changed 7 years ago by kruzel

One more comment,
in my command I strip the audio and keep only the video, so not sure its related to A/V desync.

Ofer

comment:4 Changed 6 years ago by cehoyos

  • Keywords mov edts added; mp4 edit lists removed

comment:5 Changed 6 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

This problem is not reproducible anymore with current git head.

Note: See TracTickets for help on using tickets.