[Cin] Anamorphic 16:9 SD-DV(D) widescreen to AV1.webm

Terje J. Hanssen terjejhanssen at gmail.com
Mon Jan 15 01:47:42 CET 2024



Den 15.01.2024 01:24, skrev Terje J. Hanssen:
>
>
> Den 14.01.2024 23:03, skrev Andrew Randrianasulu:
>> On Mon, Jan 15, 2024 at 1:10 AM Terje J. Hanssen
>> <terjejhanssen at gmail.com>  wrote:
>>> Den 14.01.2024 21:42, skrev Andrew Randrianasulu:
>>>> On Sun, Jan 14, 2024 at 11:14 PM Terje J. Hanssen
>>>> <terjejhanssen at gmail.com>  wrote:
>>>>> Den 14.01.2024 18:41, skrev Andrew Randrianasulu:
>>>>>
>>>>>
>>>>>
>>>>> вс, 14 янв. 2024 г., 19:51 Terje J. Hanssen<terjejhanssen at gmail.com>:
>>>>>> Den 14.01.2024 17:43, skrev Terje J. Hanssen:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Den 13.01.2024 18:48, skrev Andrew Randrianasulu:
>>>>>>
>>>>>>
>>>>>>
>>>>>> сб, 13 янв. 2024 г., 07:47 Andrew Randrianasulu<randrianasulu at gmail.com>:
>>>>>>> сб, 13 янв. 2024 г., 03:26 Terje J. Hanssen via Cin<cin at lists.cinelerra-gg.org>:
>>>>>>>> Den 11.01.2024 23:43, skrev Terje J. Hanssen:
>>>>>>>>
>>>>>>>> .......
>>>>>>>>
>>>>>>>>
>>>>>>>> 4 a) Cin-GG
>>>>>>>> Loaded a PAL 1080i/50 HDV clip
>>>>>>>> Set Format Preset: PAL 576i (16:9) - DV(D)
>>>>>>>> File Render File Format: FFmepg - avi   (NB! because plain Raw DV still causes DAR 4:3)
>>>>>>>>                        Audio: Preset: avi_pcm_s16.avi
>>>>>>>>                        Video: Compression: dv_pal.avi
>>>>>>>>
>>>>>>>>
>>>>>>>> For me it looks like the Set Format Preset: PAL 576i (16:9) - DV(D and/or the File Format: FFmpeg make up the correct DAR 16:9 here, right?
>>>>>>>>
>>>>>>>> Because by Selecting the Format: Raw DV cause rendering to DAR 4:3 as shown below !
>>>>>>>> This makes me wonder if it is only the FFmepg File formats that currently is fixed by patches?
>>>>>>>> May also other non-FFmpeg formats be affected by anamorphic aspect ratios ?
>>>>>>> This is possible! I basically never used non-ffmpeg video encoders! I think we have 3 of them - raw dv, mpeg video and theora video.
>>>>>>>
>>>>>>> I'll check each of them.
>>>>>> OOPS!
>>>>>> As already mentioned, CinGG's FFmpeg-avi was saved/displayed 16:9 and the Raw DV was saved/displayed 4:3.
>>>>>> BUT, in addition I discovered now that in both cases the images have been cropped around, that is cut off at both sides, top and bottom.
>>>>> I wonder how much was cropped?
>>>>>
>>>>> May be I misread you but you loaded HDV 1440*1080 clip and then rendered it into ffmpeg DV at 576i WITHOUT any scaling on top?
>>>>>
>>>>>
>>>>> Yes, I loaded the anamorphic 16:9 HDV 1440x1080 clip and then rendered it using Set Format Preset PAL 576i (16:9)-DV(D) - without any scaling on top.
>>>> I think only DVD/BD render adds scaling automatically on size mismatch ...
>>>>
>>>> so, for proper downscaling you need to apply it manually.
>>>>
>>> Learning by failing :)
>>> DVD Render Format autoscales the input HDV format to fit the selected
>>> 16x9 DVD output format.
>>> When input format and output rendering formats are identical, it seems
>>> that nothing needs to be set/edited manually in Set Format.
>>>
>>> Then the unavoidable request/suggestion:
>>> Could correspondingly different I/O format via selected Presets also
>>> bake in Autoscale as default (beside color space mentioned before) ?
>> I think no, it was intended to give users control over what  kind of
>> filters they  want to apply.
>
> Yeah, if the Preset's default setting cannot be user overrided?
>
> Fx. the DVD Render window has a Scale dropdown menu, where "Scaled" is 
> default.
> The other options are None and Cropped (various).
> As an additional test I rendered with None, and then got similar 16:9 
> output displayed as ffmpeg-avi.
> (The Raw DV differed with 4_3 display)
>
>> Even with ffmpeg you still manually add scale filter ...
>>
>> More interesting question if we should leave 1440x1080 BD render as is
>> or force it to be 16/9 in other words FullHD 1920x1080 visually ?
>>
>> Some web posts indicated bluray is always 16:9 but libbluray sources
>> contradict that.
>
> IMO keep it with SAR (PAR) and DAR.
> According to Wikipedia the supported BD-Video formats includes
>
>   * HD Resolution 1440 × 1080 25i [c]   with Display Aspect Ratio 16:9 [d]
>   * [c] MPEG-2 at 1440 × 1080 was previously not included in a draft
>     version of the specification from March 2005
>   * [d] These resolutions are stored anamorphically
>     <https://en.wikipedia.org/wiki/Anamorphic_format>, i.e. they are
>     stretched to the display aspect ratio by the player or display.
>
> https://en.wikipedia.org/wiki/Blu-ray#Video
>
> In addition, as in previouus and current discussions:
>
> Distribution:
>
>   * For consumer use, HDV-sourced video can be delivered on a Blu-ray
>     Disc without re-encoding, can be converted to AVCHD and delivered
>     on an AVCHD disc, or can be downconverted to DVD-Video.
>
> https://en.wikipedia.org/wiki/HDV#Distributing

I forgot to add:
As we previously found out regarding the HDV audio part, and later was 
edited in the CinGG manual, Creating Blu-ray Without Re-encoding:

  * HDV (2004) to blu-ray video - process in CINELERRA-GG using the File
    pulldown of BD Render as previously described or use programs
    documented in their manuals to copy mpeg2 video and then re-encode
    MP2 audio to Blu-ray LPCM or AC3.

https://cinelerra-gg.org/download/CinelerraGG_Manual/Creating_Blu_ray_Without_Re.html#19585



>
>>> (refer to the: -vf scale=720:576,setsar=64/45,setdar=16/9 in the ffmpeg
>>> line below)
>>>
>>>>> According to my understanding this should down-convert the full source image to DVD 16:9 anamorphic format, which at playback should display upscaled 16:9 screen.
>>>>> That is, just as in my first post
>>>>> 4 b) FFmpeg transcode HDV to DV-wide
>>>>> ffmpeg -hide_banner -i hdv07_05.m2t -vf scale=720:576,setsar=64/45,setdar=16/9 -c:v dvvideo -c:a pcm_s16le dv07_05_wide.dv
>>>>>
>>>>> Gnome File properties and VLC Tools Codec info just say1440x1080 resolution for the HDV source and 720x576 for the CinGG rendered avi and dv output.
>>>>> I don't know if it possible to find out exactly, but
>>>>>
>>>>> Visually I espect and will estimate that the "middle part" 720x576 px symmetrical around the center of the source image is kept. That is cropped away
>>>>>
>>>>> horizontally at each side: (1440-720)/2 = 360 px
>>>>> vertically top and bottom: (1080-576)/2 = 252 px
>>>>>
>>>>>
>>>>>
>>>>>> That is, the 16:9 avi is displayed with correct geometry, while the 4:3 Raw DV is displayed stretched vertically.
>>>>>> The latter get correct geometry if forced aspect 16:9 during VLC playback..
>>>>>>
>>>>>> Actually, only my ffmpeg manual encoded DV-wide has got correct DAR 16:9 and also correct geometry.
>>>>>>
>>>>>> And kept the full image (un-cropped).
>>>>>>
>>>>>>
>>>>>> A visual tip is that this is easiest to discover and compare side by side using large file thumbnails with (Gnome) Filemanager.
>>>>>>
>>>>>>
>>>>>> in cinelerra/fileogg.C I found this comment:
>>>>>> =====
>>>>>>
>>>>>> if( asset->aspect_ratio > 0 ) {
>>>>>>                   // Cinelerra uses frame aspect ratio, theora uses pixel aspect ratio
>>>>>>     float pixel_aspect = asset->aspect_ratio / asset->width * asset->height;
>>>>>>
>>>>>>    aratio_num = pixel_aspect * 1000000;
>>>>>>     aratio_den = 1000000;                                                                      }
>>>>>>           else {
>>>>>>    aratio_num = 1000000;
>>>>>>
>>>>>>    aratio_den = 1000000;                                                                      }
>>>>>> =====
>>>>>>
>>>>>> strangely enough filedv seems to contain code to set is16x9 encoder flag ... not sure why it fails ....
>>>>>>
>>>>>> mpeg video also should honor aspect ratio, but not tested yet.
>>>>>>
>>>>>>
>>>>>>
>>>>>>>> mediainfo dv07_05_wide_cingg.dv | grep Display
>>>>>>>>     Display aspect ratio                     : 4:3
>>>>>>>>
>>>>>>>> ffprobe -hide_banner dv07_05_wide_cingg.dv
>>>>>>>> Input #0, dv, from 'dv07_05_wide_cingg.dv':
>>>>>>>>     Duration: 00:06:58.08, start: 0.000000, bitrate: 28800 kb/s
>>>>>>>>     Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
>>>>>>>>     Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Cin mailing list
>>>>>>>> Cin at lists.cinelerra-gg.org
>>>>>>>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20240115/dd4c81f5/attachment.htm>


More information about the Cin mailing list