[FFmpeg-devel] [PATCH] ffmpeg: set user-set rotation for encoded streams too

Gyan Doshi ffmpeg at gyani.pro
Thu May 12 10:01:31 EEST 2022



On 2022-05-12 10:55 am, Anton Khirnov wrote:
> Quoting Gyan Doshi (2022-05-11 21:15:15)
>>
>> On 2022-05-12 12:19 am, Anton Khirnov wrote:
>>> Quoting Gyan Doshi (2022-05-11 14:18:49)
>>>> On 2022-05-11 05:26 pm, Anton Khirnov wrote:
>>>>> Quoting Gyan Doshi (2022-05-10 13:40:54)
>>>>>> So far, -metadata:s:v rotate would only be applied to streamcopied
>>>>>> video streams.
>>>>> Using -metadata for this functionality is a hack that should be removed,
>>>>> not extended.
>>>> When there's a replacement for CLI users, sure.
>>>> Till then, there's no need for the disparity to be maintained.
>>> I disagree. You are adding new behavior, which will need to be
>>> maintained for backward compatibility and add extra burden on the person
>>> who would want to implement this properly.
>>>
>>> If you want this functionality, just add a new option. It's not that
>>> hard. There's plenty of hacks in ffmpeg already, we don't need any new
>>> ones.
>> All the current state does is force the user to run a 2nd remux command
>> to set rotation.
>> A new option for encoded streams creates a divergent syntax for no
>> visible benefit.
> This new option would presumably apply to all streams, deprecating the
> use of metadata for specifying rotations.
>
>> If and when a display matrix can be user-specified, it will be easier to
>> retire the metadata hack than to change the arg syntax of a newly added
>> 'rotate' option.
> I see no reason why the syntax should be changed.

A substitute option for metadata rotate would accept a single rotation 
value.
If adding an option for matrix, we should allow flips too.

Regards,
Gyan


More information about the ffmpeg-devel mailing list