Opened 17 months ago
Last modified 17 months ago
#11569 new defect
Question on "-aspect" in the docs
| Reported by: | idest | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | documentation |
| Version: | unspecified | Keywords: | |
| Cc: | MasterQuestionable | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
In the documentation to the ffmpeg tool, at the end of the -aspect option description there's a phrase:
If used together with -vcodec copy, it will affect the aspect ratio stored at container level, but not the aspect ratio stored in encoded frames, if it exists.
Here "stored at container level" should probably be replaced with "stored at video stream metadata level".
ffmpeg N-118724-g73f4668ef8-20250310.
Change History (9)
comment:1 by , 17 months ago
comment:2 by , 17 months ago
Do you think otherwise? Why?
I do, the reason is this: if you change aspect ratio with a command like this:
ffmpeg -i in.mp4 -aspect 11:3 -vcodec copy out.mp4
, and then analyze the resulting video with ffprobe:
ffprobe -show_format -show_streams out.mp4
, you'll notice that the "sample_aspect_ratio" and "display_aspect_ratio" values, which are related to aspect ratio, are shown in the [STREAM] (video stream metadata) section, not in the [FORMAT] (container level) one.
comment:3 by , 17 months ago
Your assumption that [FORMAT] = “container level” is unfounded. [STREAM] contains information both from the container and the bitstream.
comment:4 by , 17 months ago
Your assumption that [FORMAT] = “container level” is unfounded.
I think it's what ffprobe documentation says:
- (in the "Description" section): Metadata tags stored in the container or in the streams are recognized and printed in the corresponding "FORMAT", "STREAM", "STREAM_GROUP_STREAM" or "PROGRAM_STREAM" section.
- (in the -show_format description): All the container format information is printed within a section with name "FORMAT".
- (in the -show_streams description): Each media stream information is printed within a dedicated section with name "STREAM".
comment:5 by , 17 months ago
Looks accurate.
Note that the aspect ratio is not part of what is specifically called metadata.
comment:6 by , 17 months ago
Container information is that which is written by the muxer.
Video stream metadata i.e. metadata stored about a stream can be
1) written into a container field by the muxer
and/or
2) embedded within the coded bitstream by the encoder or a bitstream filter.
-aspect only affects (1).
comment:7 by , 17 months ago
-
aspectonly affects (1).
Sorry if I'm being stupid now, but doesn't the phrase
"If used together with -vcodec copy, it will affect the aspect ratio stored at container level, but not the aspect ratio stored in encoded frames, if it exists" (that's from -aspect description)
imply that -aspect affects (2) if used without -vcodec copy?
comment:9 by , 17 months ago
| Cc: | added |
|---|---|
| Summary: | A correction to the docs → Question on "-aspect" in the docs |



The change makes it less accurate and less precise.
Do you think otherwise? Why?