[FFmpeg-user] H.265/HEVC codec encapsulation in AVI - wrong BITMAPINFOHEADER.biCompression value

Grégoire GOLOUBINOW g.golou at orange.fr
Fri Sep 1 00:27:16 EEST 2017


Dear all,

 

When VideoLAN-VLC converts an H.265/HEVC-encoded file in AVI format, by
executing a command such as:

VLC -I dummy Tears_400_x265.mp4
--sout=#{access=file,mux=avi,dst='Tears_400_x265.avi'} vlc://quit

VLC and Media Player Classic – Home Cinema are able to read and play the
resulting AVI file.

 

When I try to do the same with ffmpeg, running a command such as:

ffmpeg -i Tears_400_x265.mp4 -vcodec copy -f avi Tears_400_x265.avi

VLC is not able to read the result, because ffmpeg writes “hvc1” at offset
188 (= BITMAPINFOHEADER.biCompression), instead of “hevc” as expected by VLC
and MPC-HC.

 

Incidentally, I notice that fmpeg also writes “hvc1” at offset 112 (=
fccHandler) instead of “cveh” as VLC does.

 

When I try to do the same with a raw H.265 file, ffmpeg writes 00:00:00:00
(null bytes) in fields fccHandler and BITMAPINFOHEADER.biCompression,
instead of “cveh” and “hevc” as expected by VLC, although the trace shows
that ffmpeg actually detects the HEVC codec:

Stream #0:0: Video: hevc, 1 reference frame, yuv420p(tv), 1280x720, 25 fps,
25 tbr, 1200k tbn, 25 tbc

 

Would it be possible for ffmpeg, when it converts an H.265/HEVC-encoded file
to AVI, to write “cveh” (0x63 0x76 0x65 0x68) at offset 112 (= fccHandler)
and “hevc” (0x68 0x65 0x76 0x63) at offset 188
(=BITMAPINFOHEADER.biCompression), so that VLC and MPC-HC can play the file?

 

Best regards,

Gregoire

 

P,S, H.265-encoded video clip
https://s3.amazonaws.com/x265.org/video/Tears_400_x265.mp4 can be downloaded
from https://x265.com/hevc-video-files/ web site.

 

 



More information about the ffmpeg-user mailing list