H.265/HEVC codec encapsulation in AVI - wrong BITMAPINFOHEADER.biCompression value

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

H.265/HEVC codec encapsulation in AVI - wrong BITMAPINFOHEADER.biCompression value

Grégoire GOLOUBINOW
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.

 

 

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: H.265/HEVC codec encapsulation in AVI - wrong BITMAPINFOHEADER.biCompression value

Carl Eugen Hoyos-2
2017-08-31 23:27 GMT+02:00 Grégoire GOLOUBINOW <[hidden email]>:

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

Please test the following:
$ ffmpeg -i input -vcodec copy -bsf hevc_mp4toannexb out.avi

The question is:
What made vlc create a new fourcc for hevc...

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".