[FFmpeg-devel] [PATCH]Reset rotation information when using the transpose filter
Clément Bœsch
ubitux at gmail.com
Thu Nov 15 10:54:23 CET 2012
On Thu, Nov 15, 2012 at 09:28:20AM +0000, Carl Eugen Hoyos wrote:
> Clément Bœsch <ubitux <at> gmail.com> writes:
>
> > > + av_dict_set(&picref->metadata, "rotate", NULL, 0);
> > > +
> > > outlink->out_buf->pts = picref->pts;
> > >
> >
> > I can think of several problems with this:
> > - the metadata is per frame while AFAIK the rotate
> > metadata is at stream level in the MOV
>
> This is true and it means the patch does not work.
> Is there a way to access the AVStream (metadata)
> from a filter?
I don't think so
> (I just realized that my other work-around, setting
> the rotate metadata from the command line, does not
> work either.)
>
> > - transpose is a filter to physically change the
> > video: the correct way is likely to kept the
> > metadata after the transcode (isn't it the case?)
>
> I believe that this is the bug:
> The metadata should not be kept if the transcode
> filter is used (it should be reset).
>
Why? Imagine an input with a meta rotate=90. Video players honoring that
metadata will rotate the video correctly at playback. Now two scenarios:
- the first one is your situation: the user has a player not honoring
that metadata (ex: ffplay), so he wants to physically rotate the video
so it is playable everywhere. He will use something like:
ffmpeg -i ... -metadata:s:v rotate=0 -vf transpose=...
to reset the soft rotate, and do the hard rotate.
You might think the rotate=0 should be done automatically, but it's a
problem for the second case:
- the user has a player honoring correctly the metadata, but he wants to
rotate the video even more (without even knowing there is already a
soft rotation done). So he will just add naively a vf transpose: this
will still work for him, except if you decided to drop the rotate
metadata from the filter: the transmux/transcode needs to keep a
maximum of information from the input.
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121115/4e2ead36/attachment.asc>
More information about the ffmpeg-devel
mailing list