[FFmpeg-devel] setting vps/sps/pps id via hevc_metadata

Mark Thompson sw at jkqxz.net
Mon Jan 6 23:42:16 EET 2020


On 06/01/2020 19:24, Eran Gonen wrote:> On Mon, Jan 6, 2020 at 9:05 PM Andreas Rheinhardt <
> andreas.rheinhardt at gmail.com> wrote:
> 
>> On Mon, Jan 6, 2020 at 7:54 PM Eran Gonen <eran.gonen at cloudinary.com>
>> wrote:
>>
>>> Hi,
>>>
>>> The attached patch allows setting vps/sps/pps id
>>>
>>> Usage:
>>> /ffmpeg -i source -c:v libx265 -bsf:v
>>> hevc_metadata=sps_id=8:pps_id=12:vps_id=3 output
>>>
>>>
>> There is a problem with this: Input files with parameter sets of the same
>> kind with different ids can be broken by this (because they would all share
>> the same id in the output and hence overwrite each other upon decoding).
>>
>> - Andreas
>> 
> Thanks Andreas. I also thought about this point.
> I guess the same goes to the rest of parameters in hevc_metadata.
> They all affect all sets in the file. Maybe that's the intention of the
> user for such files.

I'm not sure that comparison is really right, because the existing elements which can be modified are the metadata which don't affect the decoding process.  Changing the PS IDs will break most streams with multiple parameter sets (try PPS_A_qualcomm_7.bit from the conformance test suite).

What is your actual use-case here?  If it's fixing some particular set of broken streams then perhaps it could be a separate BSF like h264_redundant_pps.

- Mark


More information about the ffmpeg-devel mailing list