Opened 10 years ago

Closed 10 years ago

#3416 closed defect (duplicate)

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:
Cc: Blocked By:
Blocking: Reproduced by developer: no
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 (1)

comment:1 by Carl Eugen Hoyos, 10 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.