Opened 6 years ago

Closed 6 years ago

#3365 closed defect (duplicate)

can't embed h265 in MP4

Reported by: julian Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


curl -O
% ffmpeg -i bigBuckBunny_h265_360p.ts -acodec copy -vcodec copy test.mp4
ffmpeg version 2.1.3-tessus Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 16 2014 13:50:59 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)
  configuration: --prefix=/Users/tessus/data/ext/ffmpeg/sw --as=yasm --extra-version=tessus --disable-shared --enable-static --disable-ffplay --enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-version3 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm --enable-libopus --enable-fontconfig --enable-libfreetype --enable-libass --enable-libbluray --enable-filters --enable-runtime-cpudetect
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  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
[mpegts @ 0x102018200] PES packet size mismatch
Input #0, mpegts, from 'bigBuckBunny_h265_360p.ts':
  Duration: 00:09:56.17, start: 0.083333, bitrate: 932 kb/s
  Program 1 
    Stream #0:0[0x12d]: Video: hevc (HEVC / 0x43564548), yuv420p, 640x360, 24 tbr, 90k tbn, 90k tbc
    Stream #0:1[0x12e]: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 72 kb/s
File 'bigBuckBunny_h265_1080p.mp4' already exists. Overwrite ? [y/N] y
[mp4 @ 0x102018800] track 0: could not find tag, codec not currently supported in container
Output #0, mp4, to 'bigBuckBunny_h265_1080p.mp4':
    encoder         : Lavf55.19.104
    Stream #0:0: Video: hevc (HEVC / 0x43564548), yuv420p, 640x360, q=2-31, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, 72 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted

supposedly embedding H265 / HVEC in MP4 should be possible, MP4Box can do it ( )

Change History (2)

comment:1 Changed 6 years ago by JEEB

14496-15, 3rd edition is not yet finished (link). Because of various seemingly political reasons, the FDIS ballot still hasn't been gotten through with, even though the drafts haven't gotten any major edits since last summer.

Both GPAC and L-SMASH support muxing with the way that's noted in the draft that was going to be pushed to the FDIS ballot. L-SMASH disables it in the command line application for now as it's not official yet (although it's a simple case of switching a #if 0 to #if 1 to re-enable it).

Thanks to the way how extradata for AVC and HEVC is handled in libavformat/-codec (or more like, isn't handled), you would have to write bitstream filters similar to AVC's to convert to and from Annex B from and to the 14496-15 extradata format. For example, MPEG-TS contains HEVC in Annex B format, while you need it in a different format to mux it like noted in 14496-15.

comment:2 Changed 6 years ago by cehoyos

  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from 2.1.3 to git-master

Duplicate of ticket #3306.

Note: See TracTickets for help on using tickets.