can you check attached patch esp with 1440x1080 (HDV) vids?

вт, 27 дек. 2022 г., 05:10 Phyllis Smith <[email protected]>:

> Tested on Sept. 18, 2020 with "Auto Rotate" enabled and it correctly
> loaded with the right Aspect Ratio.  So, a little something must have been
> missed in the later auto ratio autodetect patch.  But since there is an
> easy workaround ...
>
> On Mon, Dec 26, 2022 at 5:56 PM Andrew Randrianasulu via Cin <
> [email protected]> wrote:
>
>> So, I looked into folders with videos recorded on my tablet sometime in
>> last summer. Some of them naturally rotated (vertical)
>>
>> I found latest cingg git show them with wrong (inversed) aspect ratio
>> until I bring up format window and doubleclick on Auto checkbox near format
>> dropdown menus ....
>>
>> I just used 'cin' as program in window "Open with ..." available from
>>  context menu item by right-click on video file  in konqueror filemanager (
>> TDE 14.0.13), effectively using cin as video player
>>
>> Was this bug there before? May be * I * made it while working on aspect
>> ratio autodetect ....
>>
>> Something to think about outside of bluray box!
>> --
>> Cin mailing list
>> [email protected]
>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>
>
From af8ae21ca5f1b7bda5d922925c8e07b476eb7793 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <[email protected]>
Date: Tue, 27 Dec 2022 12:39:14 +0300
Subject: [PATCH] Try to fix aspect rati with rotated video (ffmpeg)

---
 cinelerra-5.1/cinelerra/ffmpeg.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C
index ee3edba5..a9f42178 100644
--- a/cinelerra-5.1/cinelerra/ffmpeg.C
+++ b/cinelerra-5.1/cinelerra/ffmpeg.C
@@ -3638,7 +3638,7 @@ float FFMPEG::ff_aspect_ratio(int stream)
 	AVCodecParameters *par = ffvideo[stream]->st->codecpar;
 	AVRational dar;
 	AVRational sar = av_guess_sample_aspect_ratio(fmt_ctx, strm, NULL);
-        if (sar.num) {
+        if (sar.num && ffvideo[stream]->get_rotation_angle() == 0) {
             av_reduce(&dar.num, &dar.den,
                       par->width  * sar.num,
                       par->height * sar.den,
-- 
2.39.0

-- 
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to