Opened 5 years ago

Closed 4 years ago

#2777 closed defect (duplicate)

H.264 decoding failure

Reported by: Snowknight26 Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: mkv h264 regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

ffmpeg doesn't seem to decode several H.264 streams I have from a capture card.

ffmpeg.exe -i "ffmpeg h264 sample.mkv"
ffmpeg version N-54643-g15cee5e Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul 11 2013 03:35:11 with gcc 4.7.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib
  libavutil      52. 39.100 / 52. 39.100
  libavcodec     55. 18.102 / 55. 18.102
  libavformat    55. 12.101 / 55. 12.101
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 80.100 /  3. 80.100
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[matroska,webm @ 00000000002ca1a0] decoding for stream 0 failed
Input #0, matroska,webm, from 'ffmpeg h264 sample.mkv':
  Metadata:
    creation_time   : 2013-07-12 03:49:13
  Duration: 00:00:00.51, start: 0.000000, bitrate: 19473 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p, 1280x720 [SAR 1:1 DAR 16:9],
60 fps, 60 tbr, 1k tbn, 120 tbc (default)
    Stream #0:1(eng): Audio: aac, 48000 Hz, stereo, fltp (default)

Likewise, muxing to MP4 fails:

ffmpeg.exe -i "ffmpeg h264 sample.mkv" -acodec copy -vcodec copy output.mp4

returns an MP4 with only the AAC stream.

Attachments (1)

ffmpeg h264 sample.mkv (1.2 MB) - added by Snowknight26 5 years ago.

Download all attachments as: .zip

Change History (9)

Changed 5 years ago by Snowknight26

comment:1 Changed 5 years ago by cehoyos

  • Keywords mkv h264 regression added
  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open

Regression since a64b028 related to ticket #472.
Workaround is to use -flags2 showall

comment:2 Changed 5 years ago by cehoyos

Could you add the type of the capture card?
Does it directly output to mkv, or is there some "raw" output from the card that you remuxed?

comment:3 Changed 5 years ago by Snowknight26

As it turns out this MKV was made with mkvmerge (6.3.0 I believe).

Although the initial MP4 was from an AVerMedia Live Gamer HD capture card, the MP4 doesn't exhibit the issue.

comment:4 Changed 5 years ago by cehoyos

Could you provide the original mp4?

comment:5 follow-up: Changed 5 years ago by Snowknight26

http://stfcc.org/misc/mkvmerge%20split%20source.mp4

The best I can do is the above file. It's made from the original source with the following command:

ffmpeg -i input.mp4 -vcodec copy -an "mkvmerge split source.mp4"

comment:6 in reply to: ↑ 5 ; follow-up: Changed 5 years ago by cehoyos

Replying to Snowknight26:

http://stfcc.org/misc/mkvmerge%20split%20source.mp4

The best I can do is the above file.

Is the problem - that short extracts of the file do not play without -flags2 showall / that the beginning of the file does not play without -flags2 showall - also reproducible with the original file as produced by the capture card or only after the file was remuxed with FFmpeg?

It is possible that FFmpeg behaves as specified, unfortunately the reference decoder (JM 18.5) crashes for the sample, so I cannot judge.
If there is an issue, it can be reproduced by transcoding with and without -flags2 showall, the first 17 seconds are missing without showall:

$ ffmpeg -i mkvmerge\ split\ source.mp4 -t 20 -qscale 2 out.avi
ffmpeg version N-54692-gdd1382a Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul 13 2013 01:32:58 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
  libavutil      52. 39.100 / 52. 39.100
  libavcodec     55. 18.102 / 55. 18.102
  libavformat    55. 12.102 / 55. 12.102
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 80.101 /  3. 80.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'mkvmerge split source.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.12.102
  Duration: 00:01:57.08, start: 0.016000, bitrate: 14887 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 14885 kb/s, 60 fps, 60 tbr, 180k tbn, 120 tbc
    Metadata:
      handler_name    : VideoHandler
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to 'out.avi':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    ISFT            : Lavf55.12.102
    Stream #0:0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 60 tbn, 60 tbc
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
Press [q] to stop, [?] for help
frame=  206 fps=138 q=2.0 Lsize=    7806kB time=00:00:20.00 bitrate=3197.1kbits/s
video:7772kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.435589%
$ ffmpeg -flags2 showall -i mkvmerge\ split\ source.mp4 -t 20 -qscale 2 outshowall.avi
ffmpeg version N-54692-gdd1382a Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul 13 2013 01:32:58 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
  libavutil      52. 39.100 / 52. 39.100
  libavcodec     55. 18.102 / 55. 18.102
  libavformat    55. 12.102 / 55. 12.102
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 80.101 /  3. 80.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'mkvmerge split source.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.12.102
  Duration: 00:01:57.08, start: 0.016000, bitrate: 14887 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 14885 kb/s, 60 fps, 60 tbr, 180k tbn, 120 tbc
    Metadata:
      handler_name    : VideoHandler
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to 'outshowall.avi':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    ISFT            : Lavf55.12.102
    Stream #0:0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 60 tbn, 60 tbc
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
Press [q] to stop, [?] for help
frame= 1200 fps=376 q=2.0 Lsize=   43227kB time=00:00:20.00 bitrate=17705.8kbits/s
video:43193kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.079508%

out.avi is only ~3,5 seconds long

Last edited 5 years ago by cehoyos (previous) (diff)

comment:7 in reply to: ↑ 6 Changed 5 years ago by Snowknight26

Replying to cehoyos:

Replying to Snowknight26:

http://stfcc.org/misc/mkvmerge%20split%20source.mp4

The best I can do is the above file.

Is the problem - that short extracts of the file do not play without -flags2 showall / that the beginning of the file does not play without -flags2 showall - also reproducible with the original file as produced by the capture card or only after the file was remuxed with FFmpeg?

Seems to be reproducible with a file produced by the capture card as well.

http://stfcc.org/misc/AVerMedia%20Live%20Gamer%20HD%20sample.mp4

comment:8 Changed 4 years ago by michael

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

Duplicate of #2968

Note: See TracTickets for help on using tickets.