[FFmpeg-devel] [PATCH] ffmpeg: Add spherical_mapping command-line option.

Mark Thompson sw at jkqxz.net
Fri Oct 6 19:35:49 EEST 2017


On 06/10/17 17:10, Aaron Colwell wrote:
> On Fri, Oct 6, 2017 at 8:53 AM Mark Thompson <sw at jkqxz.net> wrote:
>> On 06/10/17 16:19, Aaron Colwell wrote:
>>> Allows spherical mapping metadata to be injected into files.
>>>
>>> From 6a86e9766708b9b74e4ae0ec6928a81df4041afc Mon Sep 17 00:00:00 2001
>>> From: Aaron Colwell <acolwell at google.com>
>>> Date: Fri, 6 Oct 2017 08:14:15 -0700
>>> Subject: [PATCH] ffmpeg: Add spherical_mapping command-line option.
>>>
>>> Allows spherical mapping metadata to be injected into files.
>>> ---
>>>  fftools/ffmpeg.c     |  12 +++-
>>>  fftools/ffmpeg.h     |   6 ++
>>>  fftools/ffmpeg_opt.c | 160
>> ++++++++++++++++++++++++++++++++++++++++++++++++++-
>>>  3 files changed, 176 insertions(+), 2 deletions(-)
>>
>> Perhaps I'm missing something about this patch, but I'm not seeing why
>> this should be added as a set of special options to ffmpeg.c.  A bsf in
>> libavcodec which edits or replaces the packet side data would seem to be a
>> more generally useful way to achieve the same result.  (E.g. it would also
>> be usable in other applications, and it would be able to edit it on input
>> as well as output.)
> 
> You aren't missing anything. I haven't really used bsf's so it didn't occur
> to me to use them. I'll take a look. Thanks for the suggestion.

Having looked a little further I suspect this doesn't quite work right now.  The output BSFs do not run on the first packet before the header is written, and AVCodecParameters does not carry the global side data - that means the edited side data won't be available at the right moment for global headers (it would be available per-packet, but the actual formats need it per-stream).  I'm not sure how hard that would be to fix.

- Mark


More information about the ffmpeg-devel mailing list