Opened 10 years ago

Closed 10 years ago

#3415 closed defect (fixed)

when remux tscc avi to mkv, the mkv can not be displayed

Reported by: chinshou Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mkv
Cc: nfxjfg@googlemail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
when remux tscc avi to mkv, the mkv can not be displayed

How to reproduce:

% ffmpeg -i xxx.avi -codec copy xxx.mkv

% ffplay xxx.mkv

  libavutil      52. 48.100 / 52. 48.100
  libavcodec     55. 39.100 / 55. 39.100
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[camtasia @ 0049DD00] Camtasia error: unknown depth 0 bpp0B f=0/0
    Last message repeated 1 times
Input #0, matroska,webm, from 'xxx.mkv':
  Metadata:
    ARTIST          : ミサチ德コ。「ツウチヲ
    ISBJ            : Altium Designerヤュタ楨シモ・CBノ
    COPYRIGHT       : オ釋モケ、メオ
    ENCODER         : Lavf55.19.104
  Duration: 00:05:39.67, start: 0.000000, bitrate: 690 kb/s
    Stream #0:0: Video: tscc (tscc / 0x63637374), 1280x772, SAR 1:1 DAR 320:193,
 15 fps, 15 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1: Audio: pcm_s16le, 22050 Hz, 1 channels, s16, 352 kb/s (default)

[camtasia @ 0049DD00] Camtasia error: unknown depth 0 bpp
   2.43 M-A:  0.000 fd=   0 aq=   11KB vq=    0KB sq=    0B f=0/0

The error message come from

    switch(avctx->bits_per_coded_sample){
    case  8: avctx->pix_fmt = AV_PIX_FMT_PAL8; break;
    case 16: avctx->pix_fmt = AV_PIX_FMT_RGB555; break;
    case 24:
             avctx->pix_fmt = AV_PIX_FMT_BGR24;
             break;
    case 32: avctx->pix_fmt = AV_PIX_FMT_RGB32; break;
    default: av_log(avctx, AV_LOG_ERROR, "Camtasia error: unknown depth %i bpp\n", avctx->bits_per_coded_sample);
             return AVERROR_PATCHWELCOME;
    }

I check the matroskaenc.c and matroskadec.c , mkv muxer does not write the bits_per_coded_sample information for video track , it only write similar information as MATROSKA_ID_AUDIOBITDEPTH for audio track.

avidec.yuv will call ff_get_bmp_header to parse bitmap header to get the bits_per_coded_sample information from video stream.

mkv demuxer also does not do such work. Is it a bug of mkv demuxer or muxer? Is it possible to support RGB Pixel format video stream in mkv container? If possible , what should we do to support such feature?

best regards

Change History (3)

comment:1 by gjdfgh, 10 years ago

Cc: nfxjfg@googlemail.com added

Upload a sample (preferably both avi and mkv).

comment:2 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavformat
Keywords: mkv added
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Patch sent.

For future tickets: Please only provide ffplay command line and console output if the problem is not reproducible with ffmpeg.

$ ffmpeg -i fate-suite/tscc/2004-12-17-uebung9-partial.avi -vcodec copy -an out.mkv
ffmpeg version N-60871-g2a3cb1c Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 24 2014 11:17:11 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gray
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  1.103 /  4.  1.103
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 18.100 /  0. 18.100
Input #0, avi, from 'fate-suite/tscc/2004-12-17-uebung9-partial.avi':
  Duration: 00:00:24.53, start: 0.000000, bitrate: 101 kb/s
    Stream #0:0: Video: tscc (tscc / 0x63637374), bgra, 1024x768, 15 tbr, 15 tbn, 15 tbc
    Metadata:
      title           : Camtasia Recorder_capture12e7f7.avi Video #1
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 24000 Hz, mono, s16p, 24 kb/s
    Metadata:
      title           : Microsoft Waveform: Camtasia Recorder_convert46a8d2.wav
Output #0, matroska, to 'out.mkv':
  Metadata:
    encoder         : Lavf55.33.100
    Stream #0:0: Video: tscc (tscc / 0x63637374), bgra, 1024x768, q=2-31, 1k tbn, 15 tbc
    Metadata:
      title           : Camtasia Recorder_capture12e7f7.avi Video #1
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=  161 fps=0.0 q=-1.0 Lsize=     274kB time=00:00:10.73 bitrate= 209.5kbits/s
video:270kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead 1.788606%
$ ffmpeg -i out.mkv
ffmpeg version N-60871-g2a3cb1c Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 24 2014 11:17:11 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gray
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  1.103 /  4.  1.103
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 18.100 /  0. 18.100
[camtasia @ 0x18e25a0] Camtasia error: unknown depth 0 bpp
[matroska,webm @ 0x18e1100] Failed to open codec in av_find_stream_info
[camtasia @ 0x18e25a0] Camtasia error: unknown depth 0 bpp
Input #0, matroska,webm, from 'out.mkv':
  Metadata:
    ENCODER         : Lavf55.33.100
  Duration: 00:00:10.73, start: 0.000000, bitrate: 209 kb/s
    Stream #0:0: Video: tscc (tscc / 0x63637374), 1024x768, SAR 1:1 DAR 4:3, 15 fps, 15 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      title           : Camtasia Recorder_capture12e7f7.avi Video #1
At least one output file must be specified

comment:3 by Carl Eugen Hoyos, 10 years ago

Resolution: fixed
Status: openclosed

Should be fixed in 96fc2908
Thank you for the report!

Note: See TracTickets for help on using tickets.