Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
27th September 2023, 17:57 | #82 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,919
|
Sorry about the quick update, but there's a link for new a version dated 2023-09-28 in the opening post.
Fixed a couple of regressions in version 2023-09-26. There was a typo in the VapourSynth version preventing an output sample aspect ratio being used. The Avisynth version was producing an error message when a copping preview was enabled while Info=true. While I was updating I tweaked the way Info displays a frame properties sample aspect ratio of 1:1 so at first glance the source video doesn't appear to be anamorphic. |
3rd April 2024, 09:38 | #87 | Link |
Registered User
Join Date: Jun 2022
Posts: 104
|
If
Code:
cropresize(1920,1080,borders=true) Sources are: - jpg files with different resolution and DAR, but each with PAR 1:1 - mp4, avi files with different resolutions and with 1:1 PAR (I think) It seems to work, but I want to make sure Last edited by rgr; 3rd April 2024 at 13:54. |
6th April 2024, 14:06 | #88 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,919
|
Quote:
The difference between enabling borders and not enabling them... When they're not enabled, the output dimensions determine the display aspect ratio (assuming there's no OutDAR or OutSAR specified). So for example, if the picture is 4:3 and you specify 16:9 output dimensions, the script will automatically increase the cropping if necessary to ensure the picture is cropped to 16:9 before it's resized. If you only specify a width or height though (not both), the script calculates the unspecified width or height instead of cropping. When borders are enabled, the script adds borders instead of increasing the cropping so the DAR of the picture itself won't change. You have to specify both a width and height to add borders, even when Borders=true. Full disclosure.... Sometimes the picture has to be cropped a little to prevent aspect error before it's resized, as the resized picture must be at least mod2 for YV12 (the default is mod4), so even when borders are enabled the script might crop an extra pixel or two, but generally it's not any more than that. Last edited by hello_hello; 6th April 2024 at 18:25. |
|
9th April 2024, 18:23 | #90 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,464
|
Quote:
http://avisynth.nl/index.php/Internal_functions#SARNum Some source filters can read the source SAR and pass this information automatically, some programs like ffmpeg can read avisynth frame properties and pass them along Use PropShow to see the frame properties , propSet to set parameters |
|
10th April 2024, 21:04 | #91 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,919
|
Quote:
Keep in mind there can only be one output SAR per script, so even though you can specify a different OutDAR or OutSAR when there's more than one instance of CropResize in a script (when appending different videos), it doesn't make sense to do so. If you need to change the way CropResize crops and resizes based on an aspect ratio, change the InDAR or InSAR instead. Ignore a chroma location being shown in this screenshot. It's something I'm adding for the next version, mainly for color conversion, although it's turned into more of a chore than I expected. A random anamorphic source, resized to PAL 16:9 dimensions with borders. CropResize(720,576, OutDAR=16.0/9.0, Borders=true, Info=true) An example where videos A and B both have a SAR in frame properties but you want to change it for video B. Both are resized to non-anamorphic (square pixel) dimensions. A = FFVideoSource("VideoA") B = FFVideoSource("VideoB") A.Trim(0, 99).CropResize(1280,720, Borders=true) ++ \ B.Trim(60, 154).CropResize(1280,720, InSAR=64.0/45.0, Borders=true) ++ \ A.Trim(100, 0).CropResize(1280,720, Borders=true) Last edited by hello_hello; 10th April 2024 at 21:35. |
|
10th April 2024, 23:03 | #92 | Link | |
Registered User
Join Date: Jun 2022
Posts: 104
|
Quote:
Code:
Duration: 03:04:24.12, start: 0.000000, bitrate: N/A Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(tv, bt470bg/bt470bg/smpte170m, progressive), 696x560, 50 fps, 50 tbr, 50 tbn Stream #0:1: Audio: pcm_f32le, 48000 Hz, stereo, flt, 3072 kb/s Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (pcm_f32le (native) -> aac (native)) Last edited by rgr; 10th April 2024 at 23:10. |
|
10th April 2024, 23:06 | #93 | Link | |
Registered User
Join Date: Jun 2022
Posts: 104
|
Quote:
I am combining various video files and if PAR is not recognized automatically, I will not do it manually for now. |
|
10th April 2024, 23:17 | #94 | Link | |||
Registered User
Join Date: Sep 2007
Posts: 5,464
|
Quote:
It might not be automatic in the current avs ffmpeg patch. Youu can add "-avisynth_flags sar " as an ffmpeg input option See this post Quote:
Code:
colorbars(720,480,"YV12") Trim(0,300) propSet("_SARNum",10) propSet("_SARDen",11) Quote:
|
|||
11th April 2024, 10:25 | #95 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,919
|
Quote:
When you specify an InDAR or InSAR, CropResize uses it as the basis for it's calculations. You don't need to specify either for a non-anamorphic source, but if the source is anamorphic the correct InDAR or InSAR should be specified if there's no SAR in frame properties. If you were to specify a 16:9 DAR for an NTSC source (for example), you could resize it to 16:9 dimensions without CropResize applying any extra cropping. CropResize(960,540, InDAR=16.0/9.0) Without the InDAR, CropResize would assume 720x480 is both the resolution and the display aspect ratio (1.5:1) and it'll therefore crop unnecessarily to make the video 16:9 before resizing, and the DAR of the picture after resizing will be incorrect. It's important that the correct InDAR or InSAR is used for an anamorphic source. Last edited by hello_hello; 12th April 2024 at 02:44. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|