Le primidi 21 pluviôse, an CCXXIII, Kieran Kunhya a écrit :
> The DAR for analogue compatible media (e.g. SD DVB) comes from the
> active samples and not from the "full image".

The exact meaning of DAR in this context is entirely for us to decide. And
that means collectively, not you alone. And a simple unrelated FAQ entry is
not the place to discuss it anyway.

New patch attached with an example, and the CGA changed to EGA.

Regards,

-- 
  Nicolas George
From 2b238e7df5bd1c00a0c3c6c8b4070f4b6b0fa744 Mon Sep 17 00:00:00 2001
From: Nicolas George <geo...@nsup.org>
Date: Mon, 9 Feb 2015 16:17:22 +0100
Subject: [PATCH] doc/faq: explain DAR/SAR preserving.

Signed-off-by: Nicolas George <geo...@nsup.org>
---
 doc/faq.texi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/doc/faq.texi b/doc/faq.texi
index 494da86..c15fcf5 100644
--- a/doc/faq.texi
+++ b/doc/faq.texi
@@ -467,6 +467,38 @@ point acceptable for your tastes. The most common options to do that are
 @option{-qscale} and @option{-qmax}, but you should peruse the documentation
 of the encoder you chose.
 
+@section I have a stretched video, why does scaling does not fix it?
+
+A lot of video codecs and formats can store the @emph{aspect ratio} of the
+video: this is the ratio between the width and the height of either the full
+image (DAR, display aspect ratio) or individual pixels (SAR, sample aspect
+ratio). For example, EGA screens at resolution 640×350 had 4:3 DAR and 35:48
+SAR.
+
+Most still image processing work with square pixels, i.e. 1:1 SAR, but a lot
+of video standards, especially from the analogic-numeric transition era, use
+non-square pixels.
+
+Most processing filters in FFmpeg handle the aspect ratio to avoid
+stretching the image: cropping adjusts the DAR to keep the SAR constant,
+scaling adjusts the SAR to keep the DAR constant.
+
+If you want to stretch, or “unstretch”, the image, you need to override the
+information with the
+@url{http://ffmpeg.org/ffmpeg-filters.html#setdar_002c-setsar, @code{setdar or setsar filters}}.
+
+Do not forget to examine carefully the original video to check whether the
+stretching comes from the image or from the aspect ratio information.
+
+For example, to fix a badly encoded EGA capture, use the following commands,
+either the first one to upscale to square pixels or the second one to set
+the correct aspect ratio:
+
+@example
+ffmpeg -i ega_screen.nut -vf scale=640:480,setsar=1 ega_screen_scaled.nut
+ffmpeg -i ega_screen.nut -vf setdar=4/3 ega_screen_anamorphic.nut
+@end example
+
 @chapter Development
 
 @section Are there examples illustrating how to use the FFmpeg libraries, particularly libavcodec and libavformat?
-- 
2.1.4

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to