[FFmpeg-user] Quicktime DV MOVs - 2 different SAR informations

Robert Krüger krueger at lesspain.de
Tue May 13 10:14:05 CEST 2014


On Mon, May 12, 2014 at 9:02 PM, Christoph Gerstbauer
<christophgerstbauer at gmx.at> wrote:
> Hi Phil!
>Hi,
> ok, so the second values are from the stream, but how does ffmpeg read the
> informations form the container itself and how can I extract it?
>
> With -show_frames, -show_format, -show_streams I dont get the values from
> the container. Always the values from the streams (frames).

looking at the code it looks like the second output on the ffmpeg
command line is what ffmpeg reads from the container (in this case for
mov from the pasp atom) and for the first one that from the codec
context which probably derives the values from the (DV) bitstream.
This is inconsistent with the output of ffprobe because ffprobe uses
the function av_guess_sample_aspect_ratio to obtain the SAR for the
stream shown in the show_streams output and that always uses the SAR
from the stream/container if it is there.

Currently it looks as if you would have to use the api to obtain these
values. If you need a command line to extract it, you either
- parse the ffmpeg -i output (ugly)
- hack ffprobe to use the values from the codec context instead (also
ugly and does not help the project)
- add the output for the codec SAR/DAR to the output of show_streams
(and then submit a patch)
- add a feature request for the latter in the bug tracker and hope
Stefano, the ffprobe maintainer, implements it (and maybe offer a
bounty for it if you need it for work)

HTH,

Robert


More information about the ffmpeg-user mailing list