Quantcast
Channel: VideoHelp Forum
Viewing all articles
Browse latest Browse all 45776

Muxing h.265/HEVC Annex B raw to MP4 using MP4Box

$
0
0
Hey there,
I am producing a raw10bit h265 Annex B file by using ffmpeg and x265. The source is a 8bit 1080p BluRay. Muxing the h265 to a MKV container using MKVMerge, everything is fine and VLC player starts playing, also allows browsing the video by clicking the progress bar. Muxing the h265 to a MP4 file using MP4Box also allows VLC to play the video, but clicking the progress bar freezes the VLC player immediately, allowing to cancel it only by task manager. I am using the latest versions of all tools. Muxing to MKV and MP4 here looks like this:
Code:

mkvmerge.exe -o mycontainer.mkv myvideo.h265
Code:

MP4Box.exe -add myvideo.h265:fmt=HEVC -new mycontainer.mp4
I had found the expression ".h265:fmt=HEVC" in some other forum and it enables muxing HEVC. Not using it will result in an error by MP4Box, muxing nothing. Strangely, HEVC is not listened at the official manpage of MP4Box (maybe the manual is outdated?): https://www.mankier.com/1/mp4box#Supported_Input_Formats
The video file in the resulting MP4 container gives the following info:

Quote:

General
Complete name : E:\mycontainer.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : iso4 (iso4/hvc1/iso6)
File size : 554 MiB
Duration : 43 min 0 s
Overall bit rate : 1 802 kb/s
Encoded date : UTC 2018-02-16 13:03:08
Tagged date : UTC 2018-02-16 13:03:08

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L4@Main
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 43 min 0 s
Bit rate : 1 800 kb/s
Maximum bit rate : 7 777 kb/s
Width : 1 916 pixels
Height : 1 076 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (23976/1000) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.036
Stream size : 554 MiB (100%)
Writing library : x265 2.6+37-1949157705ce:[Windows][GCC 7.2.0][64 bit] 10bit
Encoding settings : cpuid=1173503 / frame-threads=3 / numa-pools=12 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1916x1076 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / radl=0 / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / no-sao / no-sao-non-deblock / rd=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=22.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1
Language : English
Encoded date : UTC 2018-02-16 13:03:08
Tagged date : UTC 2018-02-16 13:03:15
For further testing, I had the MKV checked by eac3to using "eac3to.exe -check mycontainer.mkv" and everything is fine. If the HEVC inside the MKV would be invalid, eac3to usually notices. Same as with "eac3to.exe mycontainer.mkv -demux": The h265 is extracted flawlessly. So I think there must be something wrong with the way I mux into MP4. Could anyone tell me how to make it work with MP4 and MP4Box? Thanks in advance!

Viewing all articles
Browse latest Browse all 45776

Trending Articles