Report guessed / detected SAR/DAR values
in ffmpeg asset detailed info for files like HDV info is guessed, for files like mov / mp4 you sometimes can get detection working. code lifted from dump.c and ffprobe.c
Den 07.01.2024 17:21, skrev Andrew Randrianasulu:
in ffmpeg asset detailed info
for files like HDV info is guessed, for files like mov / mp4 you sometimes can get detection working.
code lifted from dump.c and ffprobe.c
Aside SAR/DAR values in CinGG Preset (if possible there): Would it be an idea to include also values for YUV color space: BT.601 PAL for PAL SD-DV(D) and BT.709 for HD(V)? This to avoid the need to check also Settings > Preferences > Appearance beside Settings > Format
вс, 7 янв. 2024 г., 21:26 Terje J. Hanssen <[email protected]>:
Den 07.01.2024 17:21, skrev Andrew Randrianasulu:
in ffmpeg asset detailed info
for files like HDV info is guessed, for files like mov / mp4 you sometimes can get detection working.
code lifted from dump.c and ffprobe.c
Aside SAR/DAR values in CinGG Preset (if possible there): Would it be an idea to include also values for YUV color space: BT.601 PAL for PAL SD-DV(D) and BT.709 for HD(V)? This to avoid the need to check also Settings > Preferences > Appearance beside Settings > Format
I'll look into it .....
I struggle to keep up with your emails, partly because I am not familiar with "old" formats. @Andrew, what patches should I use for testing? @Terje do you want me to build you an appimage with these patches? Then you can do some testing.
пн, 8 янв. 2024 г., 18:14 Andrea paz <[email protected]>:
I struggle to keep up with your emails, partly because I am not familiar with "old" formats. @Andrew, what patches should I use for testing?
hopefully patch in this thread should be relatively safe to apply first. It changes same ffmpeg.C but in far away region from one touched by second series. After it you can load say hdv sample and observe one or two new items in ffmpeg detailed info. Then you can try to apply 0001-Set-also-sample-aspect-ratio-for-encoded-ffmpeg-stre.patch 0002-Guard-ffmpeg.C-stream-sample-aspect-ratio-only-for-f.patch 0003-fix-guard-for-stream-sample-aspect-ratio-for-more-fm.patch and observe that hopefully 1) blu-ray encoding still starts. 2) webm/mov/mp4/avi containers now carry their own display aspect ratio info, so vlc and mplayer plays things correctly stretched. @Terje do you want me to build you an appimage with these patches?
Then you can do some testing.
Den 08.01.2024 16:26, skrev Andrew Randrianasulu:
пн, 8 янв. 2024 г., 18:14 Andrea paz <[email protected]>:
I struggle to keep up with your emails, partly because I am not familiar with "old" formats. @Andrew, what patches should I use for testing?
hopefully patch in this thread should be relatively safe to apply first. It changes same ffmpeg.C but in far away region from one touched by second series.
After it you can load say hdv sample and observe one or two new items in ffmpeg detailed info.
Then you can try to apply
0001-Set-also-sample-aspect-ratio-for-encoded-ffmpeg-stre.patch 0002-Guard-ffmpeg.C-stream-sample-aspect-ratio-only-for-f.patch 0003-fix-guard-for-stream-sample-aspect-ratio-for-more-fm.patch
and observe that hopefully
1) blu-ray encoding still starts. 2) webm/mov/mp4/avi containers now carry their own display aspect ratio info, so vlc and mplayer plays things correctly stretched.
I can confirm 2) mp4, because I just testet rendering the same hdv clip to mp4 without any Setting > Format preset or user defined, mp4 displays correctly with SAR 4:3 DAR 16:9: Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/unknown), 1440x1080 [SAR 4:3 DAR 16:9], 9132 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
@Terje do you want me to build you an appimage with these patches? Then you can do some testing.
@Andrea Yes, I would be thankful if you can upgrade the previous cin-aom-38_svt.AppImage .... Do you possibly have any clue why Igot all those startup error messages? (AppImageLauncher:4019): GdkPixbuf-CRITICAL **: 11:01:03.063: gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)' failed These post did report similar messages (though not identical) https://stackoverflow.com/questions/11869705/gdkpixbuf-critical-gdk-pixbuf-g... I asked about similar messages once upon a time previously, I don't remember if it was a test version, but they disapperared. What I can see is that the testversion has a theme with darker black screen and sharper green color on the gui buttons ... Tubleweed-Slowroll currently has Kernel 6.6.3 and Gnome 45.2 desktop (newer than on Leap)
Den 08.01.2024 17:43, skrev Terje J. Hanssen:
Den 08.01.2024 16:26, skrev Andrew Randrianasulu:
пн, 8 янв. 2024 г., 18:14 Andrea paz <[email protected]>:
I struggle to keep up with your emails, partly because I am not familiar with "old" formats. @Andrew, what patches should I use for testing?
hopefully patch in this thread should be relatively safe to apply first. It changes same ffmpeg.C but in far away region from one touched by second series.
After it you can load say hdv sample and observe one or two new items in ffmpeg detailed info.
Then you can try to apply
0001-Set-also-sample-aspect-ratio-for-encoded-ffmpeg-stre.patch 0002-Guard-ffmpeg.C-stream-sample-aspect-ratio-only-for-f.patch 0003-fix-guard-for-stream-sample-aspect-ratio-for-more-fm.patch
and observe that hopefully
1) blu-ray encoding still starts. 2) webm/mov/mp4/avi containers now carry their own display aspect ratio info, so vlc and mplayer plays things correctly stretched.
I can confirm 2) mp4, because I just testet rendering the same hdv clip to mp4 without any Setting > Format preset or user defined, mp4 displays correctly with SAR 4:3 DAR 16:9: Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/unknown), 1440x1080 [SAR 4:3 DAR 16:9], 9132 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
@Terje do you want me to build you an appimage with these patches? Then you can do some testing.
@Andrea Yes, I would be thankful if you can upgrade the previous cin-aom-38_svt.AppImage ....
Do you possibly have any clue why Igot all those startup error messages? (AppImageLauncher:4019): GdkPixbuf-CRITICAL **: 11:01:03.063: gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
These post did report similar messages (though not identical) https://stackoverflow.com/questions/11869705/gdkpixbuf-critical-gdk-pixbuf-g...
I asked about similar messages once upon a time previously, I don't remember if it was a test version, but they disapperared. What I can see is that the testversion has a theme with darker black screen and sharper green color on the gui buttons ...
Tubleweed-Slowroll currently has Kernel 6.6.3 and Gnome 45.2 desktop (newer than on Leap)
and libgdk_pixbuf-2-0-0 v. 2.42.10
I created the appimage with all 4 patches. I have not tested yet due to lack of HDV clips, but now I will create them directly as Phyllis indicated. The appimage starts and seems to work normally. Regarding pixbuf... I don't know what to say. Maybe it is due to the fact that I created the appimage in a distro with KDE? https://www.dropbox.com/scl/fi/8l8k27kxviex1hz4mlu07/cin_svt_aspect-ratio.Ap...
I created a bd.m2ts file by putting "HDV 1080i/25" as the preset. Bd-render worked until the renderig was complete then CinGG shut down (I don't have a BD-burner). Doing ffprobe on this video I get: Input #0, mpegts, from 'bd.m2ts': Duration: 00:01:06.91, start: 0.074667, bitrate: 10242 kb/s Program 1 Stream #0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1440x1080 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn Stream #0:1[0x1100](ita): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s The video is slightly stretched and reduced to 4:3 from the original 16:9. By applying the downsample filter and setting H and V to 40 the pixels become clearly visible and can be seen to be square.(cfr http://www.g-raffa.eu/Cinelerra/HOWTO/anamorphic.html) In postimage, I have uploaded several screenshots showing the "info--details" of the three original sources that make up the video, of the bd.m2ts (hdv.jpeg) file, and also of how the "set format" is automatically set. [@Andrew, is it possible to put PAR and DAR in the Set Format window as shown in the image?] Note: If I force, in Set Format, the aspect ratio (DAR) to 16:9 I get, with the downsample filter, rectangular pixels. But the video is no longer deformed.... The patch seems to work, as "guessed SAR/DAR" and "detected SAR/DAR" appear, but only in source1. In source2 (which is a 4k) there are neither, and in source3 and hdv.jpeg there is only "guessed SAR/DAR". The other 3 patches also seem to work since rendering bd.m2ts worked. https://postimg.cc/kDNqfpT0 https://postimg.cc/SJyq5f5J https://postimg.cc/VdD1cbQ4 https://postimg.cc/ctWZdRLk https://postimg.cc/tnzbJs1q
Den 08.01.2024 20:54, skrev Andrea paz:
I created a bd.m2ts file by putting "HDV 1080i/25" as the preset.
I think there possibly is a fault in the "HDV 1080i/25" preset (mixed with the (FHD) "1080i/25 preset" as mentioned in another post today: https://lists.cinelerra-gg.org/pipermail/cin/2024-January/007628.html
Bd-render worked until the renderig was complete then CinGG shut down (I don't have a BD-burner). Doing ffprobe on this video I get:
Input #0, mpegts, from 'bd.m2ts': Duration: 00:01:06.91, start: 0.074667, bitrate: 10242 kb/s Program 1 Stream #0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1440x1080 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn Stream #0:1[0x1100](ita): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
The video is slightly stretched and reduced to 4:3 from the original 16:9. By applying the downsample filter and setting H and V to 40 the pixels become clearly visible and can be seen to be square.(cfr http://www.g-raffa.eu/Cinelerra/HOWTO/anamorphic.html)
In postimage, I have uploaded several screenshots showing the "info--details" of the three original sources that make up the video, of the bd.m2ts (hdv.jpeg) file, and also of how the "set format" is automatically set. [@Andrew, is it possible to put PAR and DAR in the Set Format window as shown in the image?]
Note: If I force, in Set Format, the aspect ratio (DAR) to 16:9 I get, with the downsample filter, rectangular pixels. But the video is no longer deformed.... Yes, I am also curious, because I tried to set the parameters manually and then rendered to webm, but still 4:3 format on stored file icon and displayed in VLC. I got a feeling that manual changing W Rate to 1.3333 didn't really work and was changed back to 1.000. Can really Canvas Width/Height, W Rate/H Rate and Aspect Ratio in Set> Format be user defined independently? .
The patch seems to work, as "guessed SAR/DAR" and "detected SAR/DAR" appear, but only in source1. In source2 (which is a 4k) there are neither, and in source3 and hdv.jpeg there is only "guessed SAR/DAR".
The other 3 patches also seem to work since rendering bd.m2ts worked.
https://postimg.cc/kDNqfpT0 https://postimg.cc/SJyq5f5J https://postimg.cc/VdD1cbQ4 https://postimg.cc/ctWZdRLk https://postimg.cc/tnzbJs1q
пн, 8 янв. 2024 г., 23:50 Terje J. Hanssen <[email protected]>:
Den 08.01.2024 20:54, skrev Andrea paz:
I created a bd.m2ts file by putting "HDV 1080i/25" as the preset.
I think there possibly is a fault in the "HDV 1080i/25" preset (mixed with the (FHD) "1080i/25 preset" as mentioned in another post today: https://lists.cinelerra-gg.org/pipermail/cin/2024-January/007628.html
Bd-render worked until the renderig was complete then CinGG shut down (I don't have a BD-burner). Doing ffprobe on this video I get:
Input #0, mpegts, from 'bd.m2ts': Duration: 00:01:06.91, start: 0.074667, bitrate: 10242 kb/s Program 1 Stream #0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1440x1080 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn Stream #0:1[0x1100](ita): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
The video is slightly stretched and reduced to 4:3 from the original 16:9. By applying the downsample filter and setting H and V to 40 the pixels become clearly visible and can be seen to be square.(cfr http://www.g-raffa.eu/Cinelerra/HOWTO/anamorphic.html)
In postimage, I have uploaded several screenshots showing the "info--details" of the three original sources that make up the video, of the bd.m2ts (hdv.jpeg) file, and also of how the "set format" is automatically set. [@Andrew, is it possible to put PAR and DAR in the Set Format window as shown in the image?]
Note: If I force, in Set Format, the aspect ratio (DAR) to 16:9 I get, with the downsample filter, rectangular pixels. But the video is no longer deformed.... Yes, I am also curious, because I tried to set the parameters manually and then rendered to webm, but still 4:3 format on stored file icon and displayed in VLC. I got a feeling that manual changing W Rate to 1.3333 didn't really work and was changed back to 1.000. Can really Canvas Width/Height, W Rate/H Rate and Aspect Ratio in Set> Format be user defined independently?
(display) aspect ratio surely set as part of "profile" see cinelerra/defaultformats.h W rate/H rate seems to be purely informational, as in you can set user preset and then manually change dimensions/aspect rate and it will show .. not exactly rate as num/den, but more like width multiplier / height multiplier. So, you enter NOT 4 and 3 there (it will make cannas 4*1440 width, 1080 * 3 height!) but 1.3333 and 1.0 to see dimensions go fullHD. or set fullhd from dropdown menu and see ratio go to 1.333/1.0 Seems more like local calculator, because ratio[] array is local to this code module and mainwindow.C does not consult it for SAR - going purely by set display aspect ratio and dimensions. I looked at code at cinelerra/setformat.C and I am not sure how it works :) I will look at screenshots a bit later, now Fennec dog wants out (fireworks finally faded away) .
The patch seems to work, as "guessed SAR/DAR" and "detected SAR/DAR" appear, but only in source1. In source2 (which is a 4k) there are neither, and in source3 and hdv.jpeg there is only "guessed SAR/DAR".
The other 3 patches also seem to work since rendering bd.m2ts worked.
https://postimg.cc/kDNqfpT0 https://postimg.cc/SJyq5f5J https://postimg.cc/VdD1cbQ4 https://postimg.cc/ctWZdRLk https://postimg.cc/tnzbJs1q
вт, 9 янв. 2024 г., 01:25 Andrew Randrianasulu <[email protected]>:
пн, 8 янв. 2024 г., 23:50 Terje J. Hanssen <[email protected]>:
Den 08.01.2024 20:54, skrev Andrea paz:
I created a bd.m2ts file by putting "HDV 1080i/25" as the preset.
I think there possibly is a fault in the "HDV 1080i/25" preset (mixed with the (FHD) "1080i/25 preset" as mentioned in another post today: https://lists.cinelerra-gg.org/pipermail/cin/2024-January/007628.html
Bd-render worked until the renderig was complete then CinGG shut down (I don't have a BD-burner). Doing ffprobe on this video I get:
Input #0, mpegts, from 'bd.m2ts': Duration: 00:01:06.91, start: 0.074667, bitrate: 10242 kb/s Program 1 Stream #0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1440x1080 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn Stream #0:1[0x1100](ita): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
The video is slightly stretched and reduced to 4:3 from the original 16:9. By applying the downsample filter and setting H and V to 40 the pixels become clearly visible and can be seen to be square.(cfr http://www.g-raffa.eu/Cinelerra/HOWTO/anamorphic.html)
In postimage, I have uploaded several screenshots showing the "info--details" of the three original sources that make up the video, of the bd.m2ts (hdv.jpeg) file, and also of how the "set format" is automatically set. [@Andrew, is it possible to put PAR and DAR in the Set Format window as shown in the image?]
Note: If I force, in Set Format, the aspect ratio (DAR) to 16:9 I get, with the downsample filter, rectangular pixels. But the video is no longer deformed.... Yes, I am also curious, because I tried to set the parameters manually and then rendered to webm, but still 4:3 format on stored file icon and displayed in VLC. I got a feeling that manual changing W Rate to 1.3333 didn't really work and was changed back to 1.000. Can really Canvas Width/Height, W Rate/H Rate and Aspect Ratio in Set> Format be user defined independently?
(display) aspect ratio surely set as part of "profile" see
cinelerra/defaultformats.h
W rate/H rate seems to be purely informational, as in you can set user preset and then manually change dimensions/aspect rate and it will show .. not exactly rate as num/den, but more like width multiplier / height multiplier. So, you enter NOT 4 and 3 there (it will make cannas 4*1440 width, 1080 * 3 height!) but 1.3333 and 1.0 to see dimensions go fullHD. or set fullhd from dropdown menu and see ratio go to 1.333/1.0 Seems more like local calculator, because ratio[] array is local to this code module and mainwindow.C does not consult it for SAR - going purely by set display aspect ratio and dimensions.
I looked at code at cinelerra/setformat.C and I am not sure how it works :)
I will look at screenshots a bit later, now Fennec dog wants out (fireworks finally faded away)
I also found some recent bugreports about various video software and asoect ratio https://github.com/HandBrake/HandBrake/issues/5658 see log, where it says [20:12:27] WARNING: bitstream PAR 1:1 != container PAR 9:16 so, may be we also should be super verbose and print TWO SAR values if detected, one from bitstream (codec) and another from container? See also avidemux question https://avidemux.org/smif/index.php?topic=19617.0 ==== Few video players honor pixel aspect ratio info from codec rather from the container, [..] ==== and openshot bug https://github.com/OpenShot/libopenshot/issues/489 auto-closed due to bot?? so not sure if it was fixed or not in openshot. So, we are not only ones who STILL confused by all this :p
.
The patch seems to work, as "guessed SAR/DAR" and "detected SAR/DAR" appear, but only in source1. In source2 (which is a 4k) there are neither, and in source3 and hdv.jpeg there is only "guessed SAR/DAR".
The other 3 patches also seem to work since rendering bd.m2ts worked.
https://postimg.cc/kDNqfpT0 https://postimg.cc/SJyq5f5J https://postimg.cc/VdD1cbQ4 https://postimg.cc/ctWZdRLk https://postimg.cc/tnzbJs1q
Den 08.01.2024 23:46, skrev Andrew Randrianasulu:
вт, 9 янв. 2024 г., 01:25 Andrew Randrianasulu <[email protected]>:
пн, 8 янв. 2024 г., 23:50 Terje J. Hanssen <[email protected]>:
Den 08.01.2024 20:54, skrev Andrea paz: > I created a bd.m2ts file by putting "HDV 1080i/25" as the preset.
I think there possibly is a fault in the "HDV 1080i/25" preset (mixed with the (FHD) "1080i/25 preset" as mentioned in another post today: https://lists.cinelerra-gg.org/pipermail/cin/2024-January/007628.html
> Bd-render worked until the renderig was complete then CinGG shut down > (I don't have a BD-burner). Doing ffprobe on this video I get: > > Input #0, mpegts, from 'bd.m2ts': > Duration: 00:01:06.91, start: 0.074667, bitrate: 10242 kb/s > Program 1 > Stream #0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), > yuv420p(tv, bt709, top first), 1440x1080 [SAR 1:1 DAR 4:3], 25 fps, 25 > tbr, 90k tbn > Stream #0:1[0x1100](ita): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, > stereo, fltp, 192 kb/s > > The video is slightly stretched and reduced to 4:3 from the original > 16:9. By applying the downsample filter and setting H and V to 40 the > pixels become clearly visible and can be seen to be square.(cfr > http://www.g-raffa.eu/Cinelerra/HOWTO/anamorphic.html) > > In postimage, I have uploaded several screenshots showing the > "info--details" of the three original sources that make up the video, > of the bd.m2ts (hdv.jpeg) file, and also of how the "set format" is > automatically set. > [@Andrew, is it possible to put PAR and DAR in the Set Format window > as shown in the image?] > > Note: If I force, in Set Format, the aspect ratio (DAR) to 16:9 I get, > with the downsample filter, rectangular pixels. But the video is no > longer deformed.... Yes, I am also curious, because I tried to set the parameters manually and then rendered to webm, but still 4:3 format on stored file icon and displayed in VLC. I got a feeling that manual changing W Rate to 1.3333 didn't really work and was changed back to 1.000. Can really Canvas Width/Height, W Rate/H Rate and Aspect Ratio in Set> Format be user defined independently?
(display) aspect ratio surely set as part of "profile" see
cinelerra/defaultformats.h
W rate/H rate seems to be purely informational, as in you can set user preset and then manually change dimensions/aspect rate and it will show .. not exactly rate as num/den, but more like width multiplier / height multiplier. So, you enter NOT 4 and 3 there (it will make cannas 4*1440 width, 1080 * 3 height!) but 1.3333 and 1.0 to see dimensions go fullHD. or set fullhd from dropdown menu and see ratio go to 1.333/1.0 Seems more like local calculator, because ratio[] array is local to this code module and mainwindow.C does not consult it for SAR - going purely by set display aspect ratio and dimensions.
If I understand this correct, W rate/H rate is not the same as PAR nor SAR(?) Here also an url to Adobe Premiere docs about Aspect Ratios: https://helpx.adobe.com/premiere-elements/using/aspect-ratios-field-options....
I looked at code at cinelerra/setformat.C and I am not sure how it works :)
I will look at screenshots a bit later, now Fennec dog wants out (fireworks finally faded away)
I also found some recent bugreports about various video software and asoect ratio
https://github.com/HandBrake/HandBrake/issues/5658
see log, where it says
|[20:12:27] WARNING: bitstream PAR 1:1 != container PAR 9:16 | so, may be we also should be super verbose and print TWO SAR values if detected, one from bitstream (codec) and another from container?
See also avidemux question
https://avidemux.org/smif/index.php?topic=19617.0
==== Few video players honor pixel aspect ratio info from codec rather from the container, [..] ==== and openshot bug
https://github.com/OpenShot/libopenshot/issues/489
auto-closed due to bot?? so not sure if it was fixed or not in openshot.
So, we are not only ones who STILL confused by all this :p
. > > The patch seems to work, as "guessed SAR/DAR" and "detected SAR/DAR" > appear, but only in source1. In source2 (which is a 4k) there are > neither, and in source3 and hdv.jpeg there is only "guessed SAR/DAR". > > The other 3 patches also seem to work since rendering bd.m2ts worked. > > https://postimg.cc/kDNqfpT0 > https://postimg.cc/SJyq5f5J > https://postimg.cc/VdD1cbQ4 > https://postimg.cc/ctWZdRLk > https://postimg.cc/tnzbJs1q
пн, 8 янв. 2024 г., 22:55 Andrea paz <[email protected]>:
I created a bd.m2ts file by putting "HDV 1080i/25" as the preset. Bd-render worked until the renderig was complete then CinGG shut down (I don't have a BD-burner). Doing ffprobe on this video I get:
Input #0, mpegts, from 'bd.m2ts': Duration: 00:01:06.91, start: 0.074667, bitrate: 10242 kb/s Program 1 Stream #0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1440x1080 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn Stream #0:1[0x1100](ita): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
The video is slightly stretched and reduced to 4:3 from the original 16:9. By applying the downsample filter and setting H and V to 40 the pixels become clearly visible and can be seen to be square.(cfr http://www.g-raffa.eu/Cinelerra/HOWTO/anamorphic.html)
In postimage, I have uploaded several screenshots showing the "info--details" of the three original sources that make up the video, of the bd.m2ts (hdv.jpeg) file, and also of how the "set format" is automatically set. [@Andrew, is it possible to put PAR and DAR in the Set Format window as shown in the image?]
well, I can put DAR string in there easily, but other two fields currently NOT calculated as canonical PAR, in sense you can't put 4 and 3 there and get 1.333 horizontally stretched image ... at least in my tests?? I'll try to look harder at how it computed. Can you please file bug about setformat window as being somewhat confusing in how aspect ratio there works? I'll try my best to remember but *something* might distract me long enough so I start to skip on details ....
Note: If I force, in Set Format, the aspect ratio (DAR) to 16:9 I get, with the downsample filter, rectangular pixels. But the video is no longer deformed....
The patch seems to work, as "guessed SAR/DAR" and "detected SAR/DAR" appear, but only in source1. In source2 (which is a 4k) there are neither, and in source3 and hdv.jpeg there is only "guessed SAR/DAR".
The other 3 patches also seem to work since rendering bd.m2ts worked.
https://postimg.cc/kDNqfpT0 https://postimg.cc/SJyq5f5J https://postimg.cc/VdD1cbQ4 https://postimg.cc/ctWZdRLk https://postimg.cc/tnzbJs1q
Den 08.01.2024 19:46, skrev Andrea paz:
I created the appimage with all 4 patches. I have not tested yet due to lack of HDV clips, but now I will create them directly as Phyllis indicated. The appimage starts and seems to work normally.
Regarding pixbuf... I don't know what to say. Maybe it is due to the fact that I created the appimage in a distro with KDE?
https://www.dropbox.com/scl/fi/8l8k27kxviex1hz4mlu07/cin_svt_aspect-ratio.Ap...
@Andrea I don't know what happened here, but Dropbox say the item has been deleted and attempt to download the target url give only 60KB or 75KB
I don't know what happened here, but Dropbox say the item has been deleted and attempt to download the target url give only 60KB or 75KB I'm sorry; my fault. Here the correct link:
https://www.dropbox.com/scl/fi/acd5u762do1sxr1zlru3c/cin_svt_aspect-ratio.Ap...
Den 09.01.2024 00:42, skrev Andrea paz:
I don't know what happened here, but Dropbox say the item has been deleted and attempt to download the target url give only 60KB or 75KB I'm sorry; my fault. Here the correct link:
https://www.dropbox.com/scl/fi/acd5u762do1sxr1zlru3c/cin_svt_aspect-ratio.Ap...
Well, I still got only 127.4 kB downloaded :) But as the last AppImage from Phyllis works fine, maybe no need to put more work in it now.
Den 09.01.2024 15:52, skrev Andrea paz:
Well, I still got only 127.4 kB downloaded :) Sorry, I don't understand why it doesn't work.
Yep, thanks. Now the url worked (possibly it was temporary unstable), downloaded the AppImage on Tw-Sr. Testet the same HDV 16:9 and DV 4:3 clips and they rendered and displayed correctly. mediainfo dv01_07_cingg_svt-av1+opus_tw.webm | grep Display Display aspect ratio : 4:3 ffprobe -hide_banner dv01_07_cingg_svt-av1+opus_tw.webm Stream #0:0: Video: av1 (Main), yuv420p(pc, bt709/unknown/unknown), 720x576, SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn mediainfo hdv07_05_cingg_svt-av1+opus_tw.webm | grep Display Display aspect ratio : 16:9 ffprobe -hide_banner hdv07_05_cingg_svt-av1+opus_tw.webm Stream #0:0: Video: av1 (Main), yuv420p(pc, bt709/unknown/unknown), 1440x1080, SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn As seen above, FFmpeg 6.0.1 has a "cleaner output" without the dual set of [ SAR DAR ] in brackets as from FFmpeg 4.4.4 on Leap https://lists.cinelerra-gg.org/pipermail/cin/2024-January/007654.html Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown), 720x576 [SAR 1:1 DAR 5:4], SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown), 1440x1080 [SAR 1:1 DAR 4:3], SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc
вт, 9 янв. 2024 г., 23:49 Terje J. Hanssen <[email protected]>:
Den 09.01.2024 15:52, skrev Andrea paz:
Well, I still got only 127.4 kB downloaded :) Sorry, I don't understand why it doesn't work.
Yep, thanks. Now the url worked (possibly it was temporary unstable), downloaded the AppImage on Tw-Sr. Testet the same HDV 16:9 and DV 4:3 clips and they rendered and displayed correctly.
mediainfo dv01_07_cingg_svt-av1+opus_tw.webm | grep Display Display aspect ratio : 4:3 ffprobe -hide_banner dv01_07_cingg_svt-av1+opus_tw.webm Stream #0:0: Video: av1 (Main), yuv420p(pc, bt709/unknown/unknown), 720x576, SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn
mediainfo hdv07_05_cingg_svt-av1+opus_tw.webm | grep Display Display aspect ratio : 16:9 ffprobe -hide_banner hdv07_05_cingg_svt-av1+opus_tw.webm Stream #0:0: Video: av1 (Main), yuv420p(pc, bt709/unknown/unknown), 1440x1080, SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn
As seen above, FFmpeg 6.0.1 has a "cleaner output" without the dual set of [ SAR DAR ] in brackets as from FFmpeg 4.4.4 on Leap https://lists.cinelerra-gg.org/pipermail/cin/2024-January/007654.html
well, may be it was container/codec differentiation? I think for troubleshooting issues we better to report both values in our "asset - info - details" ... Can you try few more clips of different nature just to see if it works in more cases? :)
Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown), 720x576 [SAR 1:1 DAR 5:4], SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown), 1440x1080 [SAR 1:1 DAR 4:3], SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc
Den 09.01.2024 23:05, skrev Andrew Randrianasulu:
вт, 9 янв. 2024 г., 23:49 Terje J. Hanssen <[email protected]>:
................
As seen above, FFmpeg 6.0.1 has a "cleaner output" without the dual set of [ SAR DAR ] in brackets as from FFmpeg 4.4.4 on Leap https://lists.cinelerra-gg.org/pipermail/cin/2024-January/007654.html
well, may be it was container/codec differentiation? I think for troubleshooting issues we better to report both values in our "asset - info - details" ...
I don't know if the AppImages *cin_svt_aspect-ratio* (Andrea) and *cin-x86_64 *(Phyllis) are quite identical or of same patch-levels. But for both AppImages I used the _same_ *DV* and *HDV* source files, s*vt-av1* and *opus webm* rendering, without any Set>Format input from my side. As I have installed TW-SR/*cin_svt_aspect-ratio*/FFmpeg6 and LP15/*cin-x86_64/*FFmpeg4 in dualboot on the same workstation, I have cross-tested both set of outputs. In the comparison tables below, the file names suffixed *_tw.webm* are rendered on Tumbleweed_Slowroll, *FF6* is ffprobe output on ditto Tw-Sr, while, *FF4* are ditto on LP15. cin_svt_aspect-ratio rendering on tw-sr --------------------------------------- FF6 ffprobe -hide_banner dv01_07_cingg_svt-av1+opus_tw.webm Stream #0:0: Video: av1 (Main), yuv420p(pc, bt709/unknown/unknown), 720x576, SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn FF4 ffprobe -hide_banner dv01_07_cingg_svt-av1+opus_tw.webm Stream #0:0: Video: av1 (Main), yuv420p(pc, bt709/unknown/unknown), 720x576 [SAR 1:1 DAR 5:4], SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc FF6 ffprobe -hide_banner hdv07_05_cingg_svt-av1+opus_tw.webm Stream #0:0: Video: av1 (Main), yuv420p(pc, bt709/unknown/unknown), 1440x1080, SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn FF4 ffprobe -hide_banner hdv07_05_cingg_svt-av1+opus_tw.webm Stream #0:0: Video: av1 (Main), yuv420p(pc, bt709/unknown/unknown), 1440x1080 [SAR 1:1 DAR 4:3], SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc cin-x86_64 rendering on lp15 ---------------------------- FF6 fprobe -hide_banner dv01_07_cingg_svt-av1+opus.webm Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown), 720x576, SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn FF4 ffprobe -hide_banner dv01_07_cingg_svt-av1+opus.webm Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown), 720x576 [SAR 1:1 DAR 5:4], SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc FF6 ffprobe -hide_banner hdv07_05_cingg_svt-av1+opus.webm Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown), 1440x1080, SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn FF4 ffprobe -hide_banner hdv07_05_cingg_svt-av1+opus.webm Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown), 1440x1080 [SAR 1:1 DAR 4:3], SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc
Can you try few more clips of different nature just to see if it works in more cases? :)
I will report differences if discovered
Andrea, the link below downloaded correctly for me ( size of 96134336 ) AND it executes just fine on the latest Fedora 39 O/S. Just don't give up on making test AppImage's as I can not always get it done in a timely manner ! Thanks, Phyllis On Mon, Jan 8, 2024 at 4:43 PM Andrea paz via Cin < [email protected]> wrote:
I don't know what happened here, but Dropbox say the item has been deleted and attempt to download the target url give only 60KB or 75KB I'm sorry; my fault. Here the correct link:
https://www.dropbox.com/scl/fi/acd5u762do1sxr1zlru3c/cin_svt_aspect-ratio.Ap...
On Mon, Jan 8, 2024 at 8:14 AM Andrea paz via Cin < [email protected]> wrote:
I struggle to keep up with your emails,
Me too. I am still recovering from getting a bad cold. @Terje do you want me to build you an appimage with these patches?
Thanks for doing that so quickly, Andrea. I finally created an old
Ubuntu 16 AppImage and put it out on: https://cinelerra-gg.org/download/testing/cin-x86_64_older.AppImage and a more recent Operating System that should work on non-rolling releases at: https://cinelerra-gg.org/download/testing/cin-x86_64.AppImage Both of these contain the latest patches by Andrew with things that are not checked into GIT. The list should be as follows: 0001-Set-also-sample-aspect-ratio-for-encoded-ffmpeg-stre.patch 0002-Guard-ffmpeg.C-stream-sample-aspect-ratio-only-for-f.patch 0003-fix-guard-for-stream-sample-aspect-ratio-for-more-fm.patch 0001-Add-guessed-detected-SAR-DAR-values-to-ffmpeg-asset-.patch 0001-Fix-libvorbis-option.patch 0001-Add-ffmpeg-rawdv-profiles-can-use-1440x1080-with-yuv.patch (THIS ONE has issues for me) In addition, the cin-x86_64.AppImage includes libaom3.8 and libsvtav1-1.8 as well as color3way and histogram plugins for > 1, av1 render formats, and x265 12172023 snapshot (already checked into GIT).
Den 09.01.2024 00:13, skrev Phyllis Smith via Cin:
On Mon, Jan 8, 2024 at 8:14 AM Andrea paz via Cin <[email protected]> wrote:
I struggle to keep up with your emails,
Me too. I am still recovering from getting a bad cold.
@Terje do you want me to build you an appimage with these patches?
Thanks for doing that so quickly, Andrea. I finally created an old Ubuntu 16 AppImage and put it out on: https://cinelerra-gg.org/download/testing/cin-x86_64_older.AppImage and a more recent Operating System that should work on non-rolling releases at: https://cinelerra-gg.org/download/testing/cin-x86_64.AppImage
@Phyllis Voilà, then the aspect ratio displayed correctly at playback again, this time on Leap 15.5 :) I just loaded the same hdv clip without any Format setting and rendered it to webm. mediainfo hdv07_05_cingg_svt-av1+opus.webm | grep Display Display aspect ratio : 16:9 ffprobe -hide_banner hdv07_05_cingg_svt-av1+opus.webm Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown), 1440x1080 [SAR 1:1 DAR 4:3], SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc
Both of these contain the latest patches by Andrew with things that are not checked into GIT. The list should be as follows:
0001-Set-also-sample-aspect-ratio-for-encoded-ffmpeg-stre.patch 0002-Guard-ffmpeg.C-stream-sample-aspect-ratio-only-for-f.patch 0003-fix-guard-for-stream-sample-aspect-ratio-for-more-fm.patch 0001-Add-guessed-detected-SAR-DAR-values-to-ffmpeg-asset-.patch 0001-Fix-libvorbis-option.patch 0001-Add-ffmpeg-rawdv-profiles-can-use-1440x1080-with-yuv.patch(THIS ONE has issues for me)
In addition, the cin-x86_64.AppImage includes libaom3.8 and libsvtav1-1.8 as well as color3way and histogram plugins for > 1, av1 render formats, and x265 12172023 snapshot (already checked into GIT).
Den 09.01.2024 00:55, skrev Terje J. Hanssen:
Den 09.01.2024 00:13, skrev Phyllis Smith via Cin:
On Mon, Jan 8, 2024 at 8:14 AM Andrea paz via Cin <[email protected]> wrote:
I struggle to keep up with your emails,
Me too. I am still recovering from getting a bad cold.
@Terje do you want me to build you an appimage with these patches?
Thanks for doing that so quickly, Andrea. I finally created an old Ubuntu 16 AppImage and put it out on: https://cinelerra-gg.org/download/testing/cin-x86_64_older.AppImage and a more recent Operating System that should work on non-rolling releases at: https://cinelerra-gg.org/download/testing/cin-x86_64.AppImage
@Phyllis Voilà, then the aspect ratio displayed correctly at playback again, this time on Leap 15.5 :) I just loaded the same hdv clip without any Format setting and rendered it to webm.
mediainfo hdv07_05_cingg_svt-av1+opus.webm | grep Display Display aspect ratio : 16:9
ffprobe -hide_banner hdv07_05_cingg_svt-av1+opus.webm Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown), 1440x1080 [SAR 1:1 DAR 4:3], SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc
Additional test with loading a PAL SD-DV clip and render to webm, is also displayed correct 4:3 default in VLC. Opus audio is fine, while Vorbis is still broken. mediainfo dv01_07_cingg_svt-av1+opus.webm | grep Display Display aspect ratio : 4:3 ffprobe -hide_banner dv01_07_cingg_svt-av1+opus.webm Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown), 720x576 [SAR 1:1 DAR 5:4], SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc
вт, 9 янв. 2024 г., 02:14 Phyllis Smith via Cin <[email protected]
:
On Mon, Jan 8, 2024 at 8:14 AM Andrea paz via Cin < [email protected]> wrote:
I struggle to keep up with your emails,
Me too. I am still recovering from getting a bad cold.
@Terje do you want me to build you an appimage with these patches?
Thanks for doing that so quickly, Andrea. I finally created an old
Ubuntu 16 AppImage and put it out on: https://cinelerra-gg.org/download/testing/cin-x86_64_older.AppImage and a more recent Operating System that should work on non-rolling releases at: https://cinelerra-gg.org/download/testing/cin-x86_64.AppImage
Both of these contain the latest patches by Andrew with things that are not checked into GIT. The list should be as follows:
0001-Set-also-sample-aspect-ratio-for-encoded-ffmpeg-stre.patch 0002-Guard-ffmpeg.C-stream-sample-aspect-ratio-only-for-f.patch 0003-fix-guard-for-stream-sample-aspect-ratio-for-more-fm.patch 0001-Add-guessed-detected-SAR-DAR-values-to-ffmpeg-asset-.patch 0001-Fix-libvorbis-option.patch 0001-Add-ffmpeg-rawdv-profiles-can-use-1440x1080-with-yuv.patch (THIS ONE has issues for me)
if you mean you can't render arbitrary resolutions/framerates/pixfmts with it - yes, it fairly restricted :/ see terminal output for ffmpeg's help on acceptable values. We probably can try and condense this into preset comments like with DNxHD ?
In addition, the cin-x86_64.AppImage includes libaom3.8 and libsvtav1-1.8 as well as color3way and histogram plugins for > 1, av1 render formats, and x265 12172023 snapshot (already checked into GIT). -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Strange results in my "go to" test file with "guessed". See bold below. file path: /root/media1/Britney Spears - Pepsi Commercial with Bob Dole.mpeg 15817144 bytes info: format: mpeg 1 video stream vid0 (0), id 0x000001: video1 mpeg1video 352x240 29.97 pix yuv420p interlace (container level): 1 interlace (codec level): -1 color space:unknown/ range:tv *Guessed SAR: 200:219, DAR: 880:657 * 2712+0 frms 90.51 secs 0:01:30.51 While "mediainfo" reports what I consider to be correct: Video ID : 224 (0xE0) Format : MPEG Video Format version : Version 1 Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : Variable Duration : 1 min 30 s Bit rate mode : Constant Bit rate : 1 150 kb/s Width : 352 pixels Height : 240 pixels *Display aspect ratio : 4:3* On Sun, Jan 7, 2024 at 9:21 AM Andrew Randrianasulu <[email protected]> wrote:
in ffmpeg asset detailed info
for files like HDV info is guessed, for files like mov / mp4 you sometimes can get detection working.
code lifted from dump.c and ffprobe.c
ср, 10 янв. 2024 г., 02:29 Phyllis Smith <[email protected]>:
Strange results in my "go to" test file with "guessed". See bold below.
file path: /root/media1/Britney Spears - Pepsi Commercial with Bob Dole.mpeg 15817144 bytes info: format: mpeg
1 video stream vid0 (0), id 0x000001: video1 mpeg1video 352x240 29.97 pix yuv420p interlace (container level): 1 interlace (codec level): -1 color space:unknown/ range:tv *Guessed SAR: 200:219, DAR: 880:657 * 2712+0 frms 90.51 secs 0:01:30.51
from wcalc console calculator: -> 880/657 = 1.33942 so ... it just different representation? There is code in mwindow.C that does display aspect ratio calculations ..... May be I can reuse that for more user-friendly display .....
While "mediainfo" reports what I consider to be correct:
Video ID : 224 (0xE0) Format : MPEG Video Format version : Version 1 Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : Variable Duration : 1 min 30 s Bit rate mode : Constant Bit rate : 1 150 kb/s Width : 352 pixels Height : 240 pixels *Display aspect ratio : 4:3*
On Sun, Jan 7, 2024 at 9:21 AM Andrew Randrianasulu < [email protected]> wrote:
in ffmpeg asset detailed info
for files like HDV info is guessed, for files like mov / mp4 you sometimes can get detection working.
code lifted from dump.c and ffprobe.c
ср, 10 янв. 2024 г., 02:37 Andrew Randrianasulu <[email protected]>:
ср, 10 янв. 2024 г., 02:29 Phyllis Smith <[email protected]>:
Strange results in my "go to" test file with "guessed". See bold below.
file path: /root/media1/Britney Spears - Pepsi Commercial with Bob Dole.mpeg 15817144 bytes info: format: mpeg
1 video stream vid0 (0), id 0x000001: video1 mpeg1video 352x240 29.97 pix yuv420p interlace (container level): 1 interlace (codec level): -1 color space:unknown/ range:tv *Guessed SAR: 200:219, DAR: 880:657 * 2712+0 frms 90.51 secs 0:01:30.51
from wcalc console calculator:
-> 880/657 = 1.33942
so ... it just different representation?
There is code in mwindow.C that does display aspect ratio calculations ..... May be I can reuse that for more user-friendly display .....
I also tried to just reduce max number (1024*1024) it allowed to reduce to just 100. May be it will work better ... ? currently testing.
While "mediainfo" reports what I consider to be correct:
Video ID : 224 (0xE0) Format : MPEG Video Format version : Version 1 Format settings : CustomMatrix / BVOP Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : Variable Duration : 1 min 30 s Bit rate mode : Constant Bit rate : 1 150 kb/s Width : 352 pixels Height : 240 pixels *Display aspect ratio : 4:3*
On Sun, Jan 7, 2024 at 9:21 AM Andrew Randrianasulu < [email protected]> wrote:
in ffmpeg asset detailed info
for files like HDV info is guessed, for files like mov / mp4 you sometimes can get detection working.
code lifted from dump.c and ffprobe.c
participants (4)
-
Andrea paz -
Andrew Randrianasulu -
Phyllis Smith -
Terje J. Hanssen