Opened 9 years ago

Closed 9 years ago

#4511 closed enhancement (invalid)

flv file not completely supported

Reported by: Carl Eugen Hoyos Owned by:
Priority: wish Component: undetermined
Version: git-master Keywords: flv flashsv2
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

An uploaded flv file is 400 MB, h264 video and aac audio play for a few seconds and are <250KB. Older versions of FFmpeg reported a flashsv2 stream with an unsupported custom palette.

$ ffmpeg -i 2014-04-23-a2-domes-1.flv
ffmpeg version N-71705-gcea62a9 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --enable-libspeex
  libavutil      54. 23.101 / 54. 23.101
  libavcodec     56. 35.101 / 56. 35.101
  libavformat    56. 31.100 / 56. 31.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 14.100 /  5. 14.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[flv @ 0x1bb7460] Stream discovered after head already parsed
notification: Packet is larger than allocated buffer
notification: More than two wideband layers found. The stream is corrupted.
    Last message repeated 1 times
[libspeex @ 0x1ce8ce0] Error decoding Speex frame.
Input #0, flv, from '2014-04-23-a2-domes-1.flv':
  Metadata:
    protocolversion : 0
    frameWidth      : 1440
    frameHeight     : 1080
    displayWidth    : 1920
    displayHeight   : 1080
    type            : audio
    audiochannels   : 1
    config          : 1408
    timescale       : 16000
    sampletype      : mpeg4-generic
    profile-level-id: 420029
    sprop-parameter-sets: Z0IAKeKQC0BE/L/4ACAAG3AQEB4eJEVA,aM48gA==
    description     : {AACFrame: codec:AAC, channels:1, frequency:16000, samplesPerFrame:1024, objectType:LC}
    emailaddress    : NONE
    name            : Media Presentation
    origin          : - 1398240721847283 1398240721847283 IN IP4 88.197.40.22
    timing          : 0 0
    range           : npt=0.000000-
  Duration: 00:56:56.67, start: 0.000000, bitrate: 981 kb/s
    Stream #0:0: Video: h264 (Baseline), yuvj420p(pc, bt709), 1440x1080 [SAR 4:3 DAR 16:9], 51200 kb/s, 25 tbr, 1k tbn, 2k tbc
    Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp, 65 kb/s
    Stream #0:2: Subtitle: text
    Stream #0:3: Audio: speex, 16000 Hz, mono, s16
At least one output file must be specified
$ ffmpeg -i 2014-04-23-a2-domes-1.flv
ffmpeg version 2.3 Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug  9 2014 20:09:22 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      52. 92.100 / 52. 92.100
  libavcodec     55. 69.100 / 55. 69.100
  libavformat    55. 48.100 / 55. 48.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 11.100 /  4. 11.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
[flv @ 0x3168b20] Stream discovered after head already parsed
    Last message repeated 1 times
[flashsv2 @ 0x32c7780] Custom palette is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[flashsv2 @ 0x32c7780] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
[flv @ 0x3168b20] Stream discovered after head already parsed
[flv @ 0x3168b20] Stream #3: not enough frames to estimate rate; consider increasing probesize
[flv @ 0x3168b20] Stream #4: not enough frames to estimate rate; consider increasing probesize
[flv @ 0x3168b20] decoding for stream 3 failed
[flv @ 0x3168b20] decoding for stream 4 failed
[flv @ 0x3168b20] Could not find codec parameters for stream 3 (Video: flashsv2, bgr24): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[flv @ 0x3168b20] Could not find codec parameters for stream 4 (Video: vp6a, yuva420p): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, flv, from '2014-04-23-a2-domes-1.flv':
  Metadata:
    frameWidth      : 1440
    frameHeight     : 1080
    displayWidth    : 1920
    displayHeight   : 1080
    audiochannels   : 1
  Duration: 00:56:56.67, start: 0.000000, bitrate: 981 kb/s
    Stream #0:0: Video: h264 (Baseline), yuvj420p(pc, bt709), 1440x1080 [SAR 4:3 DAR 16:9], 51200 kb/s, 25 tbr, 1k tbn, 2k tbc
    Stream #0:1: Audio: aac, 16000 Hz, mono, fltp, 65 kb/s
    Stream #0:2: Data: none
    Stream #0:3: Video: flashsv2, bgr24, 1k tbr, 1k tbn
    Stream #0:4: Video: vp6a, yuva420p, 1k tbr, 1k tbn
At least one output file must be specified

Change History (6)

comment:1 by Carl Eugen Hoyos, 9 years ago

Description: modified (diff)

comment:3 by al3x, 9 years ago

Just for the record here is the complete debug log:

ffmpeg version N-71734-g0e7444f Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
  configuration: --disable-yasm
  libavutil      54. 23.101 / 54. 23.101
  libavcodec     56. 35.101 / 56. 35.101
  libavformat    56. 31.100 / 56. 31.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 14.100 /  5. 14.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument '../2014-04-23-a2-domes-1.flv'.
Reading option 'test.avi' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file ../2014-04-23-a2-domes-1.flv.
Successfully parsed a group of options.
Opening an input file: ../2014-04-23-a2-domes-1.flv.
[flv @ 0x7f9713812800] Format flv probed with size=2048 and score=100
[flv @ 0x7f9713812800] Before avformat_find_stream_info() pos: 13 bytes read:32768 seeks:0
[flv @ 0x7f9713812800] Stream discovered after head already parsed
[flv @ 0x7f9713812800] Skipping flv packet: type 28, size 1667692, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 21, size 6013056, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 31, size 10302640, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 24, size 11628814, flags 0.
[flv @ 0x7f9713812800] Stream discovered after head already parsed
[flv @ 0x7f9713812800] Skipping flv packet: type 7, size 16776924, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 24, size 16301726, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 31, size 14164463, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 5, size 12282591, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 11, size 3001192, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 1, size 15979747, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 31, size 16529488, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 15, size 12549953, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 7, size 5970120, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 29, size 5225303, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 26, size 8082763, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 1, size 538260, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 25, size 16490864, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 2, size 12710186, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 28, size 16525271, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 26, size 2085026, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 27, size 11271711, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 7, size 12409562, flags 0.
[flv @ 0x7f9713812800] Probe buffer size limit of 5000000 bytes reached
[flv @ 0x7f9713812800] After avformat_find_stream_info() pos: 239739164 bytes read:12000238 seeks:25 frames:95
Input #0, flv, from '../2014-04-23-a2-domes-1.flv':
  Metadata:
    protocolversion : 0
    frameWidth      : 1440
    frameHeight     : 1080
    displayWidth    : 1920
    displayHeight   : 1080
    type            : audio
    audiochannels   : 1
    config          : 1408
    timescale       : 16000
    sampletype      : mpeg4-generic
    profile-level-id: 420029
    sprop-parameter-sets: Z0IAKeKQC0BE/L/4ACAAG3AQEB4eJEVA,aM48gA==
    description     : {AACFrame: codec:AAC, channels:1, frequency:16000, samplesPerFrame:1024, objectType:LC}
    emailaddress    : NONE
    name            : Media Presentation
    origin          : - 1398240721847283 1398240721847283 IN IP4 88.197.40.22
    timing          : 0 0
    range           : npt=0.000000-
  Duration: 00:56:56.67, start: 0.000000, bitrate: 981 kb/s
    Stream #0:0, 40, 1/1000: Video: h264 (Baseline), 1 reference frame, yuvj420p(pc, bt709, left), 1440x1080 (1440x1088) [SAR 4:3 DAR 16:9], 1/2000, 51200 kb/s, 25 tbr, 1k tbn, 2k tbc
    Stream #0:1, 52, 1/1000: Audio: aac (LC), 16000 Hz, mono, fltp, 65 kb/s
    Stream #0:2, 2, 1/1000: Subtitle: text
    Stream #0:3, 1, 1/1000: Audio: speex, 16000 Hz, mono
Successfully opened the file.
Parsing a group of options: output file test.avi.
Successfully parsed a group of options.
Opening an output file: test.avi.
File 'test.avi' already exists. Overwrite ? [y/N] y
Successfully opened the file.
detected 4 logical cores
[graph 0 input from stream 0:0 @ 0x7f9712f00380] Setting 'video_size' to value '1440x1080'
[graph 0 input from stream 0:0 @ 0x7f9712f00380] Setting 'pix_fmt' to value '12'
[graph 0 input from stream 0:0 @ 0x7f9712f00380] Setting 'time_base' to value '1/1000'
[graph 0 input from stream 0:0 @ 0x7f9712f00380] Setting 'pixel_aspect' to value '4/3'
[graph 0 input from stream 0:0 @ 0x7f9712f00380] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x7f9712f00380] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x7f9712f00380] w:1440 h:1080 pixfmt:yuvj420p tb:1/1000 fr:25/1 sar:4/3 sws_param:flags=2
[format @ 0x7f9712f00a00] compat: called with args=[yuv420p]
[format @ 0x7f9712f00a00] Setting 'pix_fmts' to value 'yuv420p'
[auto-inserted scaler 0 @ 0x7f9712f00ea0] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 0x7f9712f00ea0] w:iw h:ih flags:'0x4' interl:0
[format @ 0x7f9712f00a00] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x7f9712e00c40] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
[swscaler @ 0x7f9713809400] deprecated pixel format used, make sure you did set range correctly
[auto-inserted scaler 0 @ 0x7f9712f00ea0] w:1440 h:1080 fmt:yuvj420p sar:4/3 -> w:1440 h:1080 fmt:yuv420p sar:4/3 flags:0x4
[graph 1 input from stream 0:1 @ 0x7f9712d03c00] Setting 'time_base' to value '1/16000'
[graph 1 input from stream 0:1 @ 0x7f9712d03c00] Setting 'sample_rate' to value '16000'
[graph 1 input from stream 0:1 @ 0x7f9712d03c00] Setting 'sample_fmt' to value 'fltp'
[graph 1 input from stream 0:1 @ 0x7f9712d03c00] Setting 'channel_layout' to value '0x4'
[graph 1 input from stream 0:1 @ 0x7f9712d03c00] tb:1/16000 samplefmt:fltp samplerate:16000 chlayout:0x4
[audio format for output stream 0:1 @ 0x7f9712d02680] Setting 'sample_fmts' to value 'fltp'
[audio format for output stream 0:1 @ 0x7f9712d02680] Setting 'channel_layouts' to value '0x4|0x3|0x103|0x7|0x603|0x33|0x107|0x607|0x37|0xc|0xb|0x10b|0xf|0x60b|0x3b|0x10f|0x60f|0x3f'
[AVFilterGraph @ 0x7f9712d03700] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
[mpeg4 @ 0x7f971303de00] intra_quant_bias = 0 inter_quant_bias = -64
Output #0, avi, to 'test.avi':
  Metadata:
    protocolversion : 0
    frameWidth      : 1440
    frameHeight     : 1080
    displayWidth    : 1920
    displayHeight   : 1080
    type            : audio
    audiochannels   : 1
    config          : 1408
    timescale       : 16000
    sampletype      : mpeg4-generic
    profile-level-id: 420029
    ILNG            : eng
    sprop-parameter-sets: Z0IAKeKQC0BE/L/4ACAAG3AQEB4eJEVA,aM48gA==
    description     : {AACFrame: codec:AAC, channels:1, frequency:16000, samplesPerFrame:1024, objectType:LC}
    emailaddress    : NONE
    name            : Media Presentation
    origin          : - 1398240721847283 1398240721847283 IN IP4 88.197.40.22
    timing          : 0 0
    range           : npt=0.000000-
    ISFT            : Lavf56.31.100
    Stream #0:0, 0, 1/25: Video: mpeg4, 1 reference frame (FMP4 / 0x34504D46), yuv420p(left), 1440x1080 [SAR 4:3 DAR 16:9], 1/25, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.35.101 mpeg4
    Stream #0:1, 0, 12/125: Audio: ac3 ([0] [0][0] / 0x2000), 16000 Hz, mono, fltp, 96 kb/s
    Metadata:
      encoder         : Lavc56.35.101 ac3
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
  Stream #0:1 -> #0:1 (aac (native) -> ac3 (native))
Press [q] to stop, [?] for help
Cliping frame in rate conversion by 0.000008
Cliping frame in rate conversion by 0.349998
    Last message repeated 11 times
Cliping frame in rate conversion by 0.349998me=00:00:02.40 bitrate= 678.4kbits/s    
    Last message repeated 13 times
Cliping frame in rate conversion by 0.349998ime=00:00:03.07 bitrate= 713.4kbits/s    
    Last message repeated 6 times
[h264 @ 0x7f9714845200] corrupted macroblock 64 65 (total_coeff=-1)
[h264 @ 0x7f9714845200] error while decoding MB 64 65
[h264 @ 0x7f9714845200] concealing 255 DC, 255 AC, 255 MV errors in P frame
Cliping frame in rate conversion by 0.349998
[flv @ 0x7f9713812800] Skipping flv packet: type 3, size 7665404, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 13, size 3685709, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 23, size 15462319, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 20, size 5936318, flags 0.
[flv @ 0x7f9713812800] Stream discovered after head already parsed
[flv @ 0x7f9713812800] New video stream 0:4 at pos:272488986 and DTS:148071s
[flv @ 0x7f9713812800] Skipping flv packet: type 11, size 10868984, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 26, size 16524253, flags 0.
[flv @ 0x7f9713812800] Stream discovered after head already parsed
[flv @ 0x7f9713812800] New video stream 0:5 at pos:304061095 and DTS:722462s
[flv @ 0x7f9713812800] Skipping flv packet: type 15, size 5364418, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 23, size 11908533, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 16, size 9323993, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 5, size 14693218, flags 0.
[flv @ 0x7f9713812800] Stream discovered after head already parsed
[flv @ 0x7f9713812800] New audio stream 0:6 at pos:354290289 and DTS:2.14237e+06s
[flv @ 0x7f9713812800] Skipping flv packet: type 0, size 11998935, flags 0.bits/s    
[flv @ 0x7f9713812800] Skipping flv packet: type 10, size 12975439, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 23, size 10878975, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 1, size 3105755, flags 0.
[flv @ 0x7f9713812800] Skipping flv packet: type 13, size 14573150, flags 0.
Cliping frame in rate conversion by 0.349998
    Last message repeated 3 times
[output stream 0:1 @ 0x7f9712d03d20] EOF on sink link output stream 0:1:default.
[output stream 0:0 @ 0x7f9712f006c0] EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
frame=   40 fps= 15 q=22.2 Lsize=     325kB time=00:00:03.36 bitrate= 791.9kbits/s    
video:273kB audio:39kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.023069%
Input file #0 (../2014-04-23-a2-domes-1.flv):
  Input stream #0:0 (video): 40 packets read (217354 bytes); 40 frames decoded; 
  Input stream #0:1 (audio): 52 packets read (26260 bytes); 52 frames decoded (53248 samples); 
  Input stream #0:2 (subtitle): 2 packets read (6288056 bytes); 
  Input stream #0:3 (audio): 1 packets read (4696896 bytes); 
  Total: 95 packets (11228566 bytes) demuxed
Output file #0 (test.avi):
  Output stream #0:0 (video): 40 frames encoded; 40 packets muxed (279411 bytes); 
  Output stream #0:1 (audio): 35 frames encoded (53248 samples); 35 packets muxed (40320 bytes); 
  Total: 75 packets (319731 bytes) muxed
96 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x7f9712e00840] Statistics: 12 seeks, 89 writeouts
[AVIOContext @ 0x7f9712d019a0] Statistics: 40403714 bytes read, 40 seeks

comment:4 by al3x, 9 years ago

Are you sure the file has not been corrupted during upload/download?

[flv @ 0x7fd5a381bc00] type:9, size:4301, dts:3266 pos:243275
[flv @ 0x7fd5a381bc00] 0 27 0 
[flv @ 0x7fd5a381bc00] type:28, size:1667692, dts:360353951 pos:247591
[flv @ 0x7fd5a381bc00] Skipping flv packet: type 28, size 1667692, flags 0.

The packet header:

@ 0x3b643:
0003b640  00 02 06 09 00 10 cd 00  0c c2 00 00 00 00 27 01  |..............'.|
0003b650  00 00 00 00 00 10 c4 41  9a 40 04 0b aa 57 c7 f6  |.......A.@...W..|

Next packet header should be around here:

0003c700  9f 71 98 fe bd 3f 04 77  f9 4b dc bf e2 ca 6d ff  |.q...?.w.K....m.|
0003c710  13 df db f0 9d 0d 7d 0e  15 e1 2e 9e 87 88 ef bc  |......}.........|
0003c720  19 72 6c 7a 90 9f 15 62  fb 72 77 7f e5 bf 7c 75  |.rlz...b.rw...|u|

A packet header is to be found later on:

0003c920  5f b9 24 ef 80 00 00 10  d8 08 00 01 fb 00 0d 40  |_.$............@|
0003c930  00 00 00 00 af 01 01 36  35 80 36 fa 84 1d 86 81  |.......65.6.....|

It seems to be a broken file I guess.

comment:5 by compn, 9 years ago

dont let old broken ffmpeg fool you... but if you do get it working in another player, try flash player or something, let us know.

comment:6 by compn, 9 years ago

Resolution: invalid
Status: newclosed

closing, let us know if any other players play the mystery / corrupted second stream.

Note: See TracTickets for help on using tickets.