[FFmpeg-trac] #10667(avformat:open): [Android] MediaCodec h264 encoder cannot output to Matroska container on stdout

FFmpeg trac at avcodec.org
Sat Nov 18 13:19:04 EET 2023


#10667: [Android] MediaCodec h264 encoder cannot output to Matroska container on
stdout
-------------------------------------+------------------------------------
             Reporter:  bubbleguuum  |                    Owner:  (none)
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  avformat
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------
Changes (by quinkblack):

 * status:  new => open
 * component:  avcodec => avformat

Comment:

 MediaCodec doesn't support global header, both mp4 and flv can handle
 that, but mkv muxer doesn't.

 There is already a workaround in mkv to support AV1 without global header:

 {{{
     case AV_CODEC_ID_AV1:
         if (extradata_size)
             return ff_isom_write_av1c(dyn_cp, extradata,
                                       extradata_size, 1);
         else
             *size_to_reserve = (AV1_SANE_SEQUENCE_HEADER_MAX_BITS + 7) / 8
 + 100;
         break;

 }}}

 We need to the same for H.264/H.265.

 However, I'm wondering how to fix it in a generic way, instead of rework
 in each format.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10667#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list