[FFmpeg-devel] [PATCH]lavf/isom: Recognize fourcc HEVC

James Almer jamrial at gmail.com
Thu May 3 00:09:15 EEST 2018


On 5/2/2018 5:50 PM, Hendrik Leppkes wrote:
> On Wed, May 2, 2018 at 8:52 PM, James Almer <jamrial at gmail.com> wrote:
>> On 5/2/2018 3:44 PM, Carl Eugen Hoyos wrote:
>>> Hi!
>>>
>>> Attached patch fixes ticket #7110 for me.
>>
>> hevc in AVI is not a thing, and adding a non official fourcc to
>> ff_codec_movvideo_tags to support weird files created by faulty software
>> that are not even mov/mp4 is not a good idea.
>>
>> Why the hell is the avi demuxer even looking at mov tags to begin with?
>>
>>>
>>> Please comment, Carl Eugen
>>>
>>>
>>> 0001-lavf-isom-Recognize-fourcc-HEVC.patch
>>>
>>>
>>> From 281899c95c5b94242fa2bdbb4e830eecaef78f8d Mon Sep 17 00:00:00 2001
>>> From: Carl Eugen Hoyos <ceffmpeg at gmail.com>
>>> Date: Wed, 2 May 2018 20:43:09 +0200
>>> Subject: [PATCH] lavf/isom: Recognize fourcc HEVC.
>>>
>>> Fixes ticket #7110.
>>> ---
>>>  libavformat/isom.c |    1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/libavformat/isom.c b/libavformat/isom.c
>>> index 2792371..261fc6f 100644
>>> --- a/libavformat/isom.c
>>> +++ b/libavformat/isom.c
>>> @@ -163,6 +163,7 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
>>>
>>>      { AV_CODEC_ID_HEVC, MKTAG('h', 'e', 'v', '1') }, /* HEVC/H.265 which indicates parameter sets may be in ES */
>>>      { AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') }, /* HEVC/H.265 which indicates parameter sets shall not be in ES */
>>> +    { AV_CODEC_ID_HEVC, MKTAG('H', 'E', 'V', 'C') }, /* VirtualDub */
>>>
>>>      { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
>>>      { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '2') },
>>> -- 1.7.10.4
>>>
>>>
>>>
> 
> If anything at all, this should most definitely not go into movvideo
> tags. This is about AVI files, so if it should go anywhere, it should
> be in ff_codec_bmp_tags. But of course this would have the side-effect
> that it actually allows encoding such files then, which would
> absolutely not be OK.
> 
> - Hendrik

Which just made me realize we have been allowing the muxing of all kind
of bullshit in AVI all this time and nobody bothered to prevent it.

Seriously, this is really sloppy. We're allowing VP9 and AV1 in avi, for
fucks sake. Why is ff_codec_bmp_tags such a dumping ground of fourccs
meant for random muxers?


More information about the ffmpeg-devel mailing list