[FFmpeg-devel] [PATCH 2/2] libx265: Only set the SAR if it is valid

Anshul anshul.ffmpeg at gmail.com
Thu Apr 10 16:22:34 CEST 2014


Hendrik Leppkes <h.leppkes at gmail.com> wrote:
>On Thu, Apr 10, 2014 at 3:29 PM, anshul <anshul.ffmpeg at gmail.com>
>wrote:
>> On 04/10/2014 05:58 PM, Derek Buitenhuis wrote:
>>>
>>> +    if (avctx->sample_aspect_ratio.num > 0 &&
>>> avctx->sample_aspect_ratio.den > 0) {
>>
>> I don't think this condition is valid.
>> I have attached the logs where SAR is 0:1, I have some media with
>0:0.
>> Please ignore this if those condition are already taken care.
>>
>> The below streams with SAR 0:1 and 0:0 are working fine without this
>patch.
>> so please consider this case too.
>
>This is about encoding, and there is absolutely no use in encoding an
>invalid SAR (which 0:1 or 0:0 obviously are).
>In avcodec, such SAR values mean "invalid". If no SAR is encoded at
>all, upon decoding you'll get such an "invalid" or "unset" value back.
>
>The patch looks correct.
>
>- Hendrik
>_______________________________________________

Hey,
Should I make those sar to 1:1 before passing to encoder explicitly.

Just now I scale all my image to x:y resolution before passing them to encoder. I keep the sar or par as it is.

This is much an user question. Since it was too much related over here, so... 

-Anshul
 
>ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


More information about the ffmpeg-devel mailing list