Re: [Cin] on macos we have few undefined functions

2024-06-10 Thread Andrew Randrianasulu via Cin
tried to fix few of them via stackoverflow answers

DO NOT COMMIT as-is while I think edlexport.C change is harmless (just
extend netbsd/freebsd check for macosx).

sadly, linking still fails with

 ld: warning: unknown stabs type 0x71 in x86_64/theme_data.o

ld: warning: unknown stabs type 0x71 in x86_64/theme_data.o

 ld: warning: unknown stabs type 0x5F in x86_64/theme_data.o

ld: object file x86_64/theme_data.o was built for different x86_64 sub-type
(-2147483645) than link command line (3) file 'x86_64/theme_data.o' for
architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: ***
[/Users/andrewrandrianasulu/cinelerra/cinelerra-5.1/cinelerra/../bin/cin]
Error 1


so our fancy png in machine code object theme supports upsets  MacOSX's
clang ...?

also plugin linking completely fails ...

пн, 10 июн. 2024 г., 17:56 Andrew Randrianasulu :

> You guess it - I tried to convince cingg to build on macos 10.12.6
>
> bchash.C:184:13: error: use of undeclared identifier 'open_memstream'
>
> seems to exist (reimplemented ) here
>
>
> https://android.googlesource.com/platform/system/core/+/cf63d5d00f5a631a2905da7812b5c029b5211cf6%5E!/
>
> fmemopen also used in bchash.C
>
> https://github.com/mprzybylski/darwin-fmemopen
>
>
> pthread_spinlock_t does not exist here ...
>
>
> https://stackoverflow.com/questions/8177031/does-mac-os-x-have-pthread-spinlock-t-type
>
> there is also bunch of  dirent64 vs dirent and this
>
>
> ffmpeg.C:4499:26: error: no member named 'st_mtim' in 'stat'
>  time_t t =
> (time_t)tst.st_mtim.tv_sec;
> ~~~ ^
>  ffmpeg.C:4502:20: error: no member named 'st_mtim' in
> 'stat'   int64_t us =
> tst.st_mtim.tv_nsec / 1000;
> ~~~ ^
>20 warnings and 19 errors generated.
>
> 
>
> I set build against wrong ffmpeg includes 
>
From 6dfdb1da752ff4a74d21422a4074143ecb76e75f Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Mon, 10 Jun 2024 22:13:45 +0300
Subject: [PATCH 5/5] cinelerra Makefile hacks for macos WIP

---
 cinelerra-5.1/cinelerra/Makefile | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile
index 1cb58d50..093fb3ee 100644
--- a/cinelerra-5.1/cinelerra/Makefile
+++ b/cinelerra-5.1/cinelerra/Makefile
@@ -525,8 +525,11 @@ LINKER = ld -o $(OUTPUT)
 CFLAGS += -DUSE_ALPHA
 
 else
-
+ifeq ($(shell uname),Darwin)
+LDFLAGS1 =  -g
+else
 LDFLAGS1 = -Wl,-export-dynamic -g -Wl,-z,noexecstack
+endif
 LDFLAGS2 = $(LDFLAGS)
 LINKER = $(CXX) -o $(OUTPUT)
 
@@ -543,8 +546,8 @@ all:	$(OUTPUT) $(CUTADS) $(BDWRITE) $(LV2UI)
 # Also VFS only overrides the C library when dynamic linking is used.
 $(OUTPUT): $(OBJS) $(THEME_DATA) $(DCRAW) $(LIBRARIES)
 	$(LINKER) `cat $(OBJDIR)/objs`
-	$(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G))
-	$(if $(findstring -g,$(CFLAGS)),objcopy --add-gnu-debuglink=$(OUTPUT_G) $(OUTPUT))
+	$(if $(findstring -g,$(CFLAGS)),gobjcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G))
+	$(if $(findstring -g,$(CFLAGS)),gobjcopy --add-gnu-debuglink=$(OUTPUT_G) $(OUTPUT))
 	$(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
 	ln -f -s ../bin/$(WANT_CIN) ci
 
@@ -552,8 +555,8 @@ ifneq ($(WANT_COMMERCIAL),no)
 $(CUTADS):	$(CUTOBJS) $(CUTLIBS) $(LIBRARIES)
 	@echo $(CXX) -o $@ $(CUTOBJS)
 	@$(CXX) $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS)
-	$(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(CUTADS) $(CUTADS).debuginfo)
-	$(if $(findstring -g,$(CFLAGS)),objcopy --add-gnu-debuglink=$(CUTADS).debuginfo $(CUTADS))
+	$(if $(findstring -g,$(CFLAGS)),gobjcopy --only-keep-debug $(CUTADS) $(CUTADS).debuginfo)
+	$(if $(findstring -g,$(CFLAGS)),gobjcopy --add-gnu-debuglink=$(CUTADS).debuginfo $(CUTADS))
 	$(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS))
 
 install-cutads:
@@ -565,7 +568,7 @@ endif
 $(BDWRITE):	$(BDWOBJS) $(LIBRARIES)
 	@echo $(CXX) -o $@ $(BDWOBJS)
 	@$(CXX) $(CFLAGS) -pthread -o $@ $(BDWOBJS) $(LIBS)
-	$(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(BDWRITE) $(BDWRITE).debuginfo)
+	$(if $(findstring -g,$(CFLAGS)),gobjcopy --only-keep-debug $(BDWRITE) $(BDWRITE).debuginfo)
 	$(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE))
 
 install-bdwrite:
-- 
2.13.5 (Apple Git-94)

From a15c67f0219822c4951a3c4ce2d1c0599dbe6edb Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Mon, 10 Jun 2024 22:08:22 +0300
Subject: [PATCH 1/5] macos build files WIP

---
 cinelerra-5.1/blds/macos.bld   | 20 +
 cinelerra-5.1/guicast/pthread_spin_lock_shim.h | 59 ++
 2 files changed, 79 insertions(+)
 create mode 100755 cinelerra-5.1/blds/m

[Cin] on macos we have few undefined functions

2024-06-10 Thread Andrew Randrianasulu via Cin
You guess it - I tried to convince cingg to build on macos 10.12.6

bchash.C:184:13: error: use of undeclared identifier 'open_memstream'

seems to exist (reimplemented ) here


https://android.googlesource.com/platform/system/core/+/cf63d5d00f5a631a2905da7812b5c029b5211cf6%5E!/

fmemopen also used in bchash.C

https://github.com/mprzybylski/darwin-fmemopen


pthread_spinlock_t does not exist here ...

https://stackoverflow.com/questions/8177031/does-mac-os-x-have-pthread-spinlock-t-type

there is also bunch of  dirent64 vs dirent and this


ffmpeg.C:4499:26: error: no member named 'st_mtim' in 'stat'
   time_t t =
(time_t)tst.st_mtim.tv_sec;
~~~ ^
 ffmpeg.C:4502:20: error: no member named 'st_mtim' in
'stat'   int64_t us =
tst.st_mtim.tv_nsec / 1000;
~~~ ^
   20 warnings and 19 errors generated.



I set build against wrong ffmpeg includes 
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Will the LV2 Plugin interfaces in Cinelerra-GG be affected by the possible withdrawal of GTK2 from certained linux distribution?

2024-06-06 Thread Andrew Randrianasulu via Cin
чт, 6 июн. 2024 г., 05:15 Pierre autourduglobe via Cin <
cin@lists.cinelerra-gg.org>:

> A message from AVLinux (creator of AVL-MXe) on the MX Linux furum
> explains that the removal of GTK2 from the next stable release of Debian
> could affect the user interface display of certain plugins. He explains
> the problem and the source of the solution he intends to use for AVL-MXe.
>
> Will this problem affect the display of LV2 Plugin interfaces in
> Cinelerra-GG?
>


well, because this is distribution-level decision ... I think it will
depend on distribution users use? May be, like TDE gtk2 will be  maintained
separately  (wishful thinking).


>
> https://forum.mxlinux.org/viewtopic.php?t=80745=d86a25d93bc096a81fbf8ee94491d18d
>
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-05-24 Thread Andrew Randrianasulu via Cin
чт, 23 мая 2024 г., 03:17 Andrew Randrianasulu :

> On Wed, May 22, 2024 at 9:17 PM Phyllis Smith 
> wrote:
> >
> > FFmpeg 7.0 checked into GIT (previous version 6.1) thanks to Andrew
> updating numerous patches in ffmpeg plus another bunch in the cinelerra
> subdirectory (5 or so).  And thanks to Andrea and others for all of the
> testing and problem reporting.  If Andrew and Andrea can verify I did not
> make any mistakes on checking it in, that would be highly appreciated!
> ...Phyllis
>
> Builds  fine as static ffmpeg 7.0 (default) version on Slackware  15.0
> i586, loads and seeks in avi fine.
> Builds as dynamic version against system's ffmpeg 6.1 on
> termux/aarch64 and loads/plays m2ts file fine.
>


vvc decoder fails to build on Ubuntu 16.04 (x86-64) probably due to old
nasm?

So I added --disable-decoder=vvc to
export FFMPEG_EXTRA_CFG="" line (inside "") before running
autogen.sh/configure/make

I think this should go into "building" and release notes /news on site.



> >
> > On Wed, Mar 27, 2024 at 10:08 PM Andrew Randrianasulu <
> randrianas...@gmail.com> wrote:
> >>
> >> It already branched
> >>
> >> changelog says:
> >>
> >> version 7.0:
> >> - DXV DXT1 encoder
> >> - LEAD MCMP decoder
>   - EVC decoding using external library libxevd-
> EVC encoding using external library libxeve
> >> - QOA decoder and demuxer
> >> - aap filter
> - demuxing, decoding, filtering, encoding, and muxing
> in the ffmpeg CLI now all run in parallel-
> enable gdigrab device to grab a window using the hwnd=HANDLER syntax
> >> - IAMF raw demuxer and muxer  -
> D3D12VA hardware accelerated H264, HEVC, VP9, AV1, MPEG-2 and VC1 decoding
> >>  - tiltandshift filter
> - qrencode filter and qrencodesrc source
> >> - quirc filter
> - lavu/eval: introduce randomi() function in expressions
> >> - VVC decoder
> >> - fsync filter
> >> - Raw Captions with Time (RCWT) closed caption muxer
> >> - ffmpeg CLI -bsf option may now be used for input as well as output
> >> - ffmpeg CLI options may now be used as -/opt , which is
> equivalent
> >>   to -opt >
> >> - showinfo bitstream filter
> >> - a C11-compliant compiler is now required; note that this requirement
> >>   will be bumped to C17 in the near future, so consider updating your
> >>   build environment if it lacks C17 support
> >> - Change the default bitrate control method from VBR to CQP for QSV
> encoders.
> >> - removed deprecated ffmpeg CLI options -psnr and -map_channel
> >> - DVD-Video demuxer, powered by libdvdnav and libdvdread
> >> - ffprobe -show_stream_groups option
> >> - ffprobe (with -export_side_data film_grain) now prints film grain
> metadata
> >> - AEA muxer
> >> - ffmpeg CLI loopback decoders
> >> - Support PacketTypeMetadata of PacketType in enhanced flv format
> >> - ffplay with hwaccel decoding support (depends on vulkan renderer via
> libplacebo)
> >> - dnn filter libtorch backend
> >> - Android content URIs protocol
> >>
> >> 
> >>
> >> I also smell  more breakage :)
> >>
> >> not sure if I want/will able to catch up with them, may be we should
> stick to some branch instead of chasing latest.
> >>
> >>
> >>
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] OT: video about old usb 1.1 capture device

2024-05-23 Thread Andrew Randrianasulu via Cin
Under old windows, too .. but as top comment says, quality is quite
surprizing, considering all limitations.

https://m.youtube.com/watch?v=4U32Hl4uSBs
"USB video capture in 2002: Dazzle DCS 200"

mpeg2 SD video (NTSC/PAL), at around 6 Mbits/s

ofcourse capturing raw/lossless is superior ... if you have hd space. But I
guess analog/noise filtering part in those old parts was main feature and
not afterthought like on some more modern devices {echoing from comments}
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-05-22 Thread Andrew Randrianasulu via Cin
On Wed, May 22, 2024 at 9:17 PM Phyllis Smith  wrote:
>
> FFmpeg 7.0 checked into GIT (previous version 6.1) thanks to Andrew updating 
> numerous patches in ffmpeg plus another bunch in the cinelerra subdirectory 
> (5 or so).  And thanks to Andrea and others for all of the testing and 
> problem reporting.  If Andrew and Andrea can verify I did not make any 
> mistakes on checking it in, that would be highly appreciated!  ...Phyllis

Builds  fine as static ffmpeg 7.0 (default) version on Slackware  15.0
i586, loads and seeks in avi fine.
Builds as dynamic version against system's ffmpeg 6.1 on
termux/aarch64 and loads/plays m2ts file fine.

>
> On Wed, Mar 27, 2024 at 10:08 PM Andrew Randrianasulu 
>  wrote:
>>
>> It already branched
>>
>> changelog says:
>>
>> version 7.0:
>> - DXV DXT1 encoder
>> - LEAD MCMP decoder  
>> - EVC decoding using external library libxevd- EVC 
>> encoding using external library libxeve
>> - QOA decoder and demuxer
>> - aap filter 
>>- demuxing, decoding, filtering, encoding, and muxing in the 
>> ffmpeg CLI now all run in parallel- enable 
>> gdigrab device to grab a window using the hwnd=HANDLER syntax
>> - IAMF raw demuxer and muxer  - 
>> D3D12VA hardware accelerated H264, HEVC, VP9, AV1, MPEG-2 and VC1 decoding
>>  - tiltandshift filter   
>>- qrencode filter and qrencodesrc source
>> - quirc filter   
>>- lavu/eval: introduce randomi() function in expressions
>> - VVC decoder
>> - fsync filter
>> - Raw Captions with Time (RCWT) closed caption muxer
>> - ffmpeg CLI -bsf option may now be used for input as well as output
>> - ffmpeg CLI options may now be used as -/opt , which is equivalent
>>   to -opt >
>> - showinfo bitstream filter
>> - a C11-compliant compiler is now required; note that this requirement
>>   will be bumped to C17 in the near future, so consider updating your
>>   build environment if it lacks C17 support
>> - Change the default bitrate control method from VBR to CQP for QSV encoders.
>> - removed deprecated ffmpeg CLI options -psnr and -map_channel
>> - DVD-Video demuxer, powered by libdvdnav and libdvdread
>> - ffprobe -show_stream_groups option
>> - ffprobe (with -export_side_data film_grain) now prints film grain metadata
>> - AEA muxer
>> - ffmpeg CLI loopback decoders
>> - Support PacketTypeMetadata of PacketType in enhanced flv format
>> - ffplay with hwaccel decoding support (depends on vulkan renderer via 
>> libplacebo)
>> - dnn filter libtorch backend
>> - Android content URIs protocol
>>
>> 
>>
>> I also smell  more breakage :)
>>
>> not sure if I want/will able to catch up with them, may be we should stick 
>> to some branch instead of chasing latest.
>>
>>
>>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Cinelerra-HV 9 is out!

2024-05-20 Thread Andrew Randrianasulu via Cin
пн, 20 мая 2024 г., 22:43 Phyllis Smith :

> Also, it was suggested that we (cinelerra-gg) can create different git
>> branch < named, say, "testing" >  for "potentially unstable" patches, like
>> current ffmpeg 7.0 patchset and then merge back to main/stable when feature
>> is deemed ready.
>>
>
>  +2 for testing branch. (wink, wink).
>
> Actually Sam had wanted me to switch to Github as more standard and I
> attempted to do this quite some time ago, and ended up damaging the current
> Git database.  Fortunately I was able to recover, but I can barely do most
> of what I do already, although I plan on continuing this for at least
> another 17 years because I do not want to see Cinelerra fade away.  People
> come and go and I am not sure if a similarly dedicated person would want to
> be responsible long term for CinGG maintenance/moderation.
>
> However, when/if I find time, I will make another attempt at getting to
> Github and adding a "testing" branch.
>


I think you can create git branch manually, from terminal.

https://devconnected.com/create-git-branch/

or more descriptive official documentation:

https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell

first try ot on separate copy of  full cingg git tree ...

I hope next git push will create new branches remotely too?

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] Cinelerra-HV 9 is out!

2024-05-20 Thread Andrew Randrianasulu via Cin
News item at linux.org.ru - because official one just few lines without any
picture :)

https://www.linux.org.ru/news/multimedia/17621213

Also, it was suggested that we (cinelerra-gg) can create different git
branch < named, say, "testing" >  for "potentially unstable" patches, like
current ffmpeg 7.0 patchset and then merge back to main/stable when feature
is deemed ready. So, "main" releases will be once  in half year, year but
they will look more like releases, with Changelog looking less like git log
:)
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ChromakeyHSV menu much improved

2024-05-16 Thread Andrew Randrianasulu via Cin
чт, 16 мая 2024 г., 21:43 Andrea paz via Cin :

> With the new, beautiful, configuration window, we need to change the
> image in the manual.
>

tnx!

sorry,  I am distracting myself with  details of openpic realization in
Powermacs and similar offtop 


-- 
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] a52dec sf files are gone ..

2024-05-14 Thread Andrew Randrianasulu via Cin
Not sure if they will ever resurface there ...

https://repology.org/project/a52dec/information


https://repology.org/link/http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] mjpegtools update

2024-05-10 Thread Andrew Randrianasulu via Cin
сб, 11 мая 2024 г., 02:34 Phyllis Smith :

> Correction, it is not HD causing the problem but "with_audio".  Using
> ffmpeg's ffplay on these files will play the picture but no sound and maybe
> that is why ffmpeg inside of CinGG can not load them.
>



mediainfo also can't see sound.

I tried cin-cve (ffmpeg 4.4 based), cin-cv - all black...

I tried mplayer (close to svn/git from few months ago) - this one worked
(image). ffplay (4.4.4) worked (image)

mpv (using 4.4 av libs) was unable to open file.

Media mystery!



> On Fri, May 10, 2024 at 5:26 PM Phyllis Smith 
> wrote:
>
>> But sample_960x540.mjpeg  which is SD instead of HD does play.
>>
>> On Fri, May 10, 2024 at 5:14 PM Phyllis Smith 
>> wrote:
>>
>>> Maybe this is not the right kind of video to test, but it sure did not
>>> work.
>>> I just picked the first one at::   https://filesamples.com/formats/mjpeg
>>> which was:
>>> sample_1280x720_surfing_with_audio.mjpeg
>>>
>>> On Fri, May 10, 2024 at 4:47 PM Andrew Randrianasulu <
>>> randrianas...@gmail.com> wrote:
>>>
>>>>
>>>>
>>>> сб, 11 мая 2024 г., 01:39 Phyllis Smith via Cin <
>>>> cin@lists.cinelerra-gg.org>:
>>>>
>>>>> Because Andrea had a compile problem and Andrew found an update to
>>>>> mjpegtools from 2.1.0 to 2.2.1 that seemed to solve the problem, I have
>>>>> been testing this.
>>>>>
>>>>> Questions for Andrew concerning the patches in 2.1.0 to be moved to
>>>>> 2.2.1:
>>>>> ??? patch 1,2,3 are no longer relevant because patch1 cpuinfo.sh file
>>>>> no longer exists; patch2 NOPIC not there; patch3 bad spelling must be gone
>>>>> (wink, wink).
>>>>> ??? patch 4,5,6,7 appear to be needed for TERMUX.  Is that still
>>>>> necessary?  and bthread.h needs to be created as in patch7?
>>>>>
>>>>
>>>> yeah, termux patches still needed ...
>>>>
>>>>>
>>>>> Patch 8 is still relevant as it adds sample rate.
>>>>>
>>>>> Build working with patches 4-8 applied.  Now I just have to figure out
>>>>> how to test.  I did find that loading a mjpeg video does not work and has
>>>>> not been working - maybe never did.
>>>>>
>>>>
>>>> mjpegtools provide mostly their mpeg2video encoder.
>>>>
>>>> so for testing you usually need to select m2v old encoder in render
>>>> settings 
>>>>
>>>> mjpeg should be decodeable by ffmpeg ... any link to file?
>>>>
>>>>
>>>>>
>>>>> --
>>>>> Cin mailing list
>>>>> Cin@lists.cinelerra-gg.org
>>>>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>>>>
>>>>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] mjpegtools update

2024-05-10 Thread Andrew Randrianasulu via Cin
сб, 11 мая 2024 г., 01:39 Phyllis Smith via Cin :

> Because Andrea had a compile problem and Andrew found an update to
> mjpegtools from 2.1.0 to 2.2.1 that seemed to solve the problem, I have
> been testing this.
>
> Questions for Andrew concerning the patches in 2.1.0 to be moved to 2.2.1:
> ??? patch 1,2,3 are no longer relevant because patch1 cpuinfo.sh file no
> longer exists; patch2 NOPIC not there; patch3 bad spelling must be gone
> (wink, wink).
> ??? patch 4,5,6,7 appear to be needed for TERMUX.  Is that still
> necessary?  and bthread.h needs to be created as in patch7?
>

yeah, termux patches still needed ...

>
> Patch 8 is still relevant as it adds sample rate.
>
> Build working with patches 4-8 applied.  Now I just have to figure out how
> to test.  I did find that loading a mjpeg video does not work and has not
> been working - maybe never did.
>

mjpegtools provide mostly their mpeg2video encoder.

so for testing you usually need to select m2v old encoder in render
settings 

mjpeg should be decodeable by ffmpeg ... any link to file?


>
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Problem with the compile

2024-05-10 Thread Andrew Randrianasulu via Cin
пт, 10 мая 2024 г., 15:36 Andrew Randrianasulu :

>
>
> пт, 10 мая 2024 г., 15:17 Andrea paz via Cin :
>
>> I have been trying to compile with the Phyllis patch for vaapi. I have
>> crashes which, however, I think are dependent on libsvtav1 and libaom
>> and not on the patch. I attach the cin5.log. I have tried both the
>> patch and manual intervention on Main.C. I have the same crash even
>> without the patch. I have the crashes with both ffmpeg7 (and related
>> patches) and ffmpeg 6.1.
>> The problem with AV1 recalls the problem posted by Deim on MantisBT
>> #0655. Deim uses Gentoo, I Arch that they are both rolling. Maybe some
>> update bringing problems?
>>
>
>
>
> from log:
>
> mpeg2enc.cc: In member function ‘void
> MPEG2EncCmdLineOptions::StartupBanner()’:
> mpeg2enc.cc:597:27: error: SSE register return with SSE disabled
>
> sounds like upgraded gcc started to misunderstand some old code? what
> version of gcc you have?
>

Also, there is update for mjpegtools, may be you can try with it put in
thirdparty/src  (and configure.ac updated)  instead of ours 2.1.0 ?

https://sourceforge.net/projects/mjpeg/files/mjpegtools/2.2.1/




>
> --
>> Cin mailing list
>> Cin@lists.cinelerra-gg.org
>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Problem with the compile

2024-05-10 Thread Andrew Randrianasulu via Cin
пт, 10 мая 2024 г., 15:17 Andrea paz via Cin :

> I have been trying to compile with the Phyllis patch for vaapi. I have
> crashes which, however, I think are dependent on libsvtav1 and libaom
> and not on the patch. I attach the cin5.log. I have tried both the
> patch and manual intervention on Main.C. I have the same crash even
> without the patch. I have the crashes with both ffmpeg7 (and related
> patches) and ffmpeg 6.1.
> The problem with AV1 recalls the problem posted by Deim on MantisBT
> #0655. Deim uses Gentoo, I Arch that they are both rolling. Maybe some
> update bringing problems?
>



from log:

mpeg2enc.cc: In member function ‘void
MPEG2EncCmdLineOptions::StartupBanner()’:
mpeg2enc.cc:597:27: error: SSE register return with SSE disabled

sounds like upgraded gcc started to misunderstand some old code? what
version of gcc you have?


-- 
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] vaapi vs appimage, kdenlive way

2024-05-07 Thread Andrew Randrianasulu via Cin
ср, 8 мая 2024 г., 01:39 Phyllis Smith :

> This is what I tried, but it made no difference.  Is there some other way
> for me to try?
>
> 1) in creating the AppImage, I ran the following 2 lines.  The 2nd line is
> the usual.
>   export
> "LIBVA_DRIVERS_PATH=/usr/lib/dri:/usr/lib64/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/aarch64-linux-gnu/dri"
>  /proj/appimage/linuxdeploy-x86_64.AppImage --appdir=AppDir -o appimage ...
> That made no difference.
> 2) so I did the full build again, using the export line first and then ran
> linuxdeploy to make the appimage.
> Still no difference.
>

well, we are c++ and thus *I think* we can try to hardcode this like I did
with DRI3 disable patch ...

diff --git a/cinelerra-5.1/cinelerra/main.C b/cinelerra-5.1/cinelerra/main.C
index 0def64b7..3f123b98 100644
--- cinelerra/main.C
+++ cinelerra/main.C
@@ -168,6 +168,15 @@ int main(int argc, char *argv[])
batch_path[0] = 0;
deamon_path[0] = 0;
Units::init();
+
+   /* disable dri3 for non_prime, it broke hw effects on nouveau as of
26-08-2020 */
+   const char *prime = getenv("DRI_PRIME");
+   if (prime)
+   setenv("LIBGL_DRI3_DISABLE", "0", 1);
+   else
+   setenv("LIBGL_DRI3_DISABLE", "1", 1);
+

===

in your case just single setenv() should work,I hope?

just replace variable name and second argument  (long string in "")  ?


> The reason I know it made no difference is because instead of the path
> being /usr/lib/dri:..., I changed it to exporting the path to a dummy value
> of /etc/fstab instead and the vaapi and vdpau settings still worked.  Any
> suggestions?
>
>
>> "LIBVA_DRIVERS_PATH=/usr/lib/dri:/usr/lib64/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/aarch64-linux-gnu/dri"
>>
>
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] vaapi vs appimage, kdenlive way

2024-05-06 Thread Andrew Randrianasulu via Cin
https://invent.kde.org/packaging/craft-blueprints-kde/-/commit/ce5096a51ce1f9009ba98c339894aaceb79fc5ef

see, they set

"LIBVA_DRIVERS_PATH=/usr/lib/dri:/usr/lib64/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/aarch64-linux-gnu/dri"

I wonder if we should do the same 
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] OT: when you try to record dolphin, but result is mostly radio interference

2024-04-30 Thread Andrew Randrianasulu via Cin
вт, 30 апр. 2024 г., 12:01 Mat via Cin :

> The radio signals which are interfering could be shortwave.
>
> I would recommend using ferrite clamps on the cables which do not carry
> digital signals, especially those in the most sensitive area, like
> from the hydrophone and pre-amp. Also the pre-amp power cable, if it is
> not battery powered.


*I think* preamp in this case is battery-powered.

By ferrite rings you mean like those?

https://www.ebay.com/itm/403346040770


And screen the pre-amp, if it is not in a metal
> box. The pre-amp itself ought to have provisions for preventing this,
> like a low-pass filter at the input.
>
> MatN
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] OT: when you try to record dolphin, but result is mostly radio interference

2024-04-29 Thread Andrew Randrianasulu via Cin
My long-time friend Julian trying to record some underwater acoustics with
resident dolphin known as Randy. Well,  long chain of equipment
(hydrophone, pream, macbook with some adapters because apple eliminated
normal separate audio line in/outs) resulted in this:

https://drive.google.com/drive/folders/1Mm_Gt8XneZI5fFAgJcy4lE6G5vNcALlI?usp=sharing

For some reason Audacity for mac refused to record  above 44.1 Khz sampling
rate, so all sound still limited to around 22 Khz frequencies.

I suggested Ubuntu studio 24.04  but while personally testing my suggestion
I run into problems, spend some time resetting win 8.1 on laptop (there was
magical command to make  Windows boot again but you need Windows install
image for it  to work ...)
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] HTML manual

2024-04-27 Thread Andrew Randrianasulu via Cin
сб, 27 апр. 2024 г., 20:29 Phyllis Smith :

> may be use "index.htm" ?
>>
> In looking for the easy out I was hoping "index.htm" without the "l" on
> the end would work but of course it did not.  I always wondered why I saw
> some URLs only have the first 3 letters, htm, working and now I know - it
> was a good history lesson for today.
>
> So I took the recommendation of modifying .htaccess in the local directory
> above the CinelerraGG_Manual directory to use cin-index.html instead.  It
> seems to work so *Andrea* could you confirm it works for you?
>


I just clicked on https://cinelerra-gg.org/download/CinelerraGG_Manual and
it leads me to first page of manual , as intended. Thanks!

>
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] HTML manual

2024-04-26 Thread Andrew Randrianasulu via Cin
сб, 27 апр. 2024 г., 02:25 Phyllis Smith via Cin :

> Correction -- I need to find a way to change lowercase "index.html" to
> another name.  Can not change uppercase "Index.html" to another name
> because it is used by Context Help (I have to verify that I said this
> correctly now).
>


may be use "index.htm" ?

https://help.turbify.com/s/article/SLN20406

>
> On Fri, Apr 26, 2024 at 5:05 PM Phyllis Smith 
> wrote:
>
>> Trying to open the html manual directly from the website, I no longer get
>>> to the
>>> cover and context menu,
>>>
>> ...
>>
>>> This has been happening for a couple of weeks.
>>>
>> This is fixed so IgorBeg's workaround is no longer needed.  It was my
>> mistake for removing "index.html" so as to not conflict with "Index.html"
>> (lower and uppercase "i" is the only difference).  Although lowercase
>> "index.html" is not used in Context Help, it is needed for the HTML manual
>> itself on the website.  I will see if I can find a way to change uppercase
>> "Index.html" to another name for a different solution.
>>
>> P.S. it is probably better to report a potential error right away --
>> preferable even if it turns out not to be a real error.  I should have
>> verified everything was working after I removed lowercase index.html from
>> the website (shame on me!)
>>
>>
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] amdgpu_top

2024-04-26 Thread Andrew Randrianasulu via Cin
чт, 25 апр. 2024 г., 19:00 Andrew Randrianasulu :

> https://github.com/Umio-Yasuno/amdgpu_top?tab=readme-ov-file
>
> Written in Rust, but Arch should have binary package. I think this one
> should display encode/decode gpu utilization separately,at least according
> to screenshots.
>

https://aur.archlinux.org/packages/amdgpu_top-bin

may be this ?
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] av1 hw decoding

2024-04-26 Thread Andrew Randrianasulu via Cin
пт, 26 апр. 2024 г., 19:52 Andrea paz :

> Your patch doesn't seem to work: the message still appears that
> 'libdav1d does not support
> vaap'i. You can't see any load on the GPU. It is the same starting CinGG
> with
> “CIN_HW_DEV=vaapi” than without.
>


Ah, thanks. Then I guess only way to get vaapi accel for av1 is to comment
line in ffmpeg/decode.opts

>
> I have tried various appimages:
> - kdenlive has the option for GPU disabled (I think I need to install
> motif).
> - Openshot doesn't start because it requires glibc 2.35 while I have 2.39.
> - Shotcut works: GPU = 10-30%; CPU = 10-30%. However, it indicates
> that it is using
> libdav1d for the decoding and I don't understand why it works.
>

May be indication of decoder itself a bit broken in this case? Anyway, may
be situation will be a bit better with some async patches floating at mesa
and ffmpeg mail list/patch tracker  If you think this is generic bug in
AMD's vaapi driver you can try to enter it at mesa's bugtracker. May be
this time our name/program will stick for at least some devs .

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] av1 hw decoding

2024-04-26 Thread Andrew Randrianasulu via Cin
 can you try this patch for av1 hw decoding without commented out remap
line? I also wonder if anything else (shotcut, openshot, kdenlive) can
utilize hw av1 decoding better on your specific setup?

пт, 26 апр. 2024 г., 15:52 Andrea paz :

> I am responding here because the title is more appropriate than in the
> other thread.
>
> > you can simply comment out line "remap_video_decoder
> libaom-av1=libdav1d" in
> ffmpeg/decode.opts
>
> Yes, hardware decoding with libaom works. There are no messages on the
> terminal. The GPU
> is only 8-21% busy but the CPU is only 2-6% busy.
> However, if scrolling there are still freezes and artifacts; the
> performance seems to me
> similar to dav1d and so I don't think it is convenient to use libaom.
>
> Note: again, until I deleted .bcast5, and started from 0, was left
> with working libdav1d
> instead of libaom.
>
> If you have other ideas/tests for me to do, please let me know.
>
From 2d252c63ffc602f5d4ea9a888ba3c3784b8e0e18 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Fri, 26 Apr 2024 17:39:51 +0300
Subject: [PATCH] Do not remap video codec if hw accel

---
 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 8d9a762a..ed764dae 100644
--- a/cinelerra-5.1/cinelerra/ffmpeg.C
+++ b/cinelerra-5.1/cinelerra/ffmpeg.C
@@ -434,7 +434,7 @@ int FFStream::decode_activate()
 			AVCodec *decoder = 0;
 #endif
 			if( is_video() ) {
-if( ffmpeg->opt_video_decoder )
+if( ffmpeg->opt_video_decoder && hw_type == AV_HWDEVICE_TYPE_NONE )
 	decoder = avcodec_find_decoder_by_name(ffmpeg->opt_video_decoder);
 else
 	ffmpeg->video_codec_remaps.update(codec_id, decoder);
-- 
2.44.0

-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] amdgpu_top

2024-04-26 Thread Andrew Randrianasulu via Cin
пт, 26 апр. 2024 г., 11:45 Andrea paz :

> > Interesting, so av1 does not decode in hw in our case ... something to
> investigate, but I have no relevant hardware ...
>
> It seems that Dav1d is developed by VLC together with ffmpeg. They say
> it is software only
> and does not uses any GPU acceleration:
> https://www.videolan.org/projects/dav1d.html
>
> It would be to try with Nvidia hardware to confirm.
>
> It can use AVX2 in decoding, though. Do you have to enable this option
> or is it by
> default?
> https://code.videolan.org/videolan/dav1d
>
> It seems that dav1d is not a very up-to-date project; if I wanted to
> compare with
> libaom I just need to disable "-enable-libdav1d" in configure?
>

you can simply comment out line "remap_video_decoder libaom-av1=libdav1d"
in ffmpeg/decode.opts

if this works (hw decode acceleration of av1 started to work) I might have
patch for you to try  ...



> > hm, ah, second error! Was it 10bit hevc by the way?
>
> Yes, it is a file 10-bit:
>
> "pix yuv420p10le"; Color Space: bt2020nc; Color range: TV (mpeg).
>
> Has anything changed between CinGG with ffmpeg6 and 7, since with
> appimage I have no
> problems
> loading ("second error").
>
> [PS:
> Following the manual, I tried to start CinGG(ffmpeg7) with:
> CIN_HW_DEV=vaapi ./cin
> Now loading works without errors and playback works with a certain
> percentage of GPU
> acceleration (8-20%). If you try scrolling, however, there are
> continuous freezes and
> artifacts. But there are no messages and errors in the terminal.
>


well, freezes and artifacts are no fun either! Internals of ffmpeg were
reworked, not sure how it affected user-visible interfaces cingg use ...

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] av1 hw decoding

2024-04-25 Thread Andrew Randrianasulu via Cin
It seems problem surface for OBS software too:

https://github.com/obsproject/obs-studio/issues/10213#issuecomment-1931140062


Can you try to set codec to generic av1 (or av1_vaapi) via our video codec
mapping override (somewhere in manual)
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] amdgpu_top

2024-04-25 Thread Andrew Randrianasulu via Cin
чт, 25 апр. 2024 г., 21:44 Andrea paz :

> I use system monitor from KDE.
> I tried loading into CinGG an 8k video; 60 fps; AV1
> (supported by vaapi) and mkv. I ran the playback, but I do not detect
> GPU utilization.
> The GPU load varies from 0 to 10%, but these are normal variations
> that are repeated even
> with GPU at rest. The CPU has a load of about 30%.
> With the appimage I have: GPU = Same values. CPU = about 60%.
>
> Confirmation is the terminal message:
> "Decoder libdav1d does not support device type vaapi."
>
> I also tried vdpau (which for AMD GPU is a wrapper that leads to vaapi)
> and the
> result is the same:
> "Decoder libdav1d does not support device type vdpau."
>


Interesting, so av1 does not decode in hw in our case ... something to
investigate, but I have no relevant hardware ...


> I tried a second video: 4k; 60 fps; HEVC; mp4. The video does not load
> and I have numerous
> errors like:
>
> "file: /home/paz/video_editing/free_video/Life Untouched 4K Demo.mp4
> int FFVideoConvert::convert_picture_vframe(VFrame*, AVFrame*, AVFrame*):
> Error retrieving data from GPU to CPU"
>

hm, ah, second error! Was it 10bit hevc by the way?



> With appimage I have no loading errors, but still the GPU is not engaged:
>
> "file:/home/paz/video_editing/free_video/Life Untouched 4K Demo.mp4
>   err: Operation not permitted
> Failed HW device create.
> dev:vaapi
>   err: Input/output error
> HW device init failed, using SW decode."
>

I think appimage may have outdated libva inside it, so course of action was
to unpack it and delete this library 



>
> Finally using mpv from the command line (set to vaapi):
>
> $ mpv 'Life Untouched 4K Demo.mp4'
>
> GPU = 30-60%
> CPU = 0-2%
>


Well, finally it works :) But not for us  I'll try to add a bit more
debug at least temporarily

Thanks for testing!

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] amdgpu_top

2024-04-25 Thread Andrew Randrianasulu via Cin
https://github.com/Umio-Yasuno/amdgpu_top?tab=readme-ov-file

Written in Rust, but Arch should have binary package. I think this one
should display encode/decode gpu utilization separately,at least according
to screenshots.
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-24 Thread Andrew Randrianasulu via Cin
ср, 24 апр. 2024 г., 19:43 Andrea paz :

> > I assume attached tar archive then only about TEST1 ?
>
> ?
>
> In test 1 I used a VP8/mov source without audio [4-3_3-2.mov] combined
> with an
> mp3/wav audio and in addition the render result [igor_test3.webm]:
> VP9/webm with audio
> Vorbis (webm.webm preset). [I didn't notice that the wav audio was
> mp3, maybe I need to
> use PCM audio?]
> In test 2 I used Big Buck Bunny_sunflower in h264/mp4 version with mp3
> audio.
>
> In both tests I simply loaded (in test 1, the project and in test
> 2, the file) with the “replace current project” option and then did a
> little
> playback/scrolling.
>
> The messages shown are everything that appeared between starting and
> closing CinGG
> (I just removed the normal start/end messages that CinGG has).
>
> The problems with vaapi are probably due to the combination of AMD,
> mesa, amdgpu and
> rocm, since every time they are updated the behavior always changes and
> new problems always arise...
> However in CinGG/ffmpeg7 it seems that vaapi is working (test 2
> [bbb_sunflower_1080p_30fps_normal.mp4]: no line “HW device init failed,
> using SW
> decode"). In test 1 you have errors with vaapi with VP8 [4-3_3-2.mov],
> which I believe is
> not supported. But there are no errors with VP9 [igor_test3.webm],
> which certainly
> supports vaapi.
>

Ah, sorry I was not sure if error messages show up serially right after
loading file or they can  show up asynchronous ...


Sorry for taking your time. I know vaapi is fragile, nice to see at least
sw fallback in our code still works as intended, even if it makes checking
vaapi runtime status harder ...



> > I wonder if plain system ffmpeg still  works for hw decoding?
>
> In Arch I still have ffmpeg 6.1.1. I have tried transcoding from mp4 to
> mp4, via
> decoding and encoding in vaapi, but I don't understand if decoding in
> vaapi works,
> while encoding works (https://trac.ffmpeg.org/wiki/Hardware/VAAPI):
>
> $ ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128
> -hwaccel_output_format vaapi
> -i mixkit-worried-and-sad-woman-outdoors-8739.mp4  -c:v h264_vaapi
> -b:v 2M -maxrate 2M
> output.mp4
>
> [...]
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
> 'mixkit-worried-and-sad-woman-outdoors-8739.mp4':
>   Metadata:
> major_brand : M4V
> minor_version   : 1
> compatible_brands: isomavc1mp42
> creation_time   : 2020-06-21T18:53:40.00Z
>   Duration: 00:00:15.00, start: 0.00, bitrate: 24801 kb/s
>   Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661),
> yuv420p(tv, bt709,
> progressive), 1920x1080 [SAR 1:1 DAR 16:9], 24798 kb/s, 24 fps, 24
> tbr, 24k tbn (default)
> Metadata:
>   creation_time   : 2020-06-21T18:53:40.00Z
>   handler_name: ETI ISO Video Media Handler
>   vendor_id   : [0][0][0][0]
>   encoder : Elemental H.264
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi))
> Press [q] to stop, [?] for help
> [h264_vaapi @ 0x571d363508c0] Driver does not support some wanted
> packed headers (wanted
> 0xd, found 0x1).
> Output #0, mp4, to 'output.mp4':
>   Metadata:
> major_brand : M4V
> minor_version   : 1
> compatible_brands: isomavc1mp42
> encoder : Lavf60.16.100
>   Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), vaapi(tv,
> bt709, progressive),
> 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 2000 kb/s, 24 fps, 12288 tbn
> (default)
> Metadata:
>   creation_time   : 2020-06-21T18:53:40.00Z
>   handler_name: ETI ISO Video Media Handler
>   vendor_id   : [0][0][0][0]
>   encoder : Lavc60.31.102 h264_vaapi
> [out#0/mp4 @ 0x571d3632dc80] video:3649kB audio:0kB subtitle:0kB other
> streams:0kB global
> headers:0kB muxing overhead: 0.064330%
> frame=  360 fps=196 q=-0.0 Lsize=3652kB time=00:00:14.95
> bitrate=1999.9kbits/s
> speed=8.14x
>

may be mpv can be used to check decoding? It usually linked to system's
ffmpeg. Not sure if tools like radeontop still works with new amdgpu
supported  AMD hardware.

Anyway, thanks for testing, I hope it not ate too much time from your day.

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-24 Thread Andrew Randrianasulu via Cin
ср, 24 апр. 2024 г., 16:15 Andrea paz :

> > hm, so hw decoding of vp9 does not work? Only on this version or on
> previous ffmpeg 6.1 based cingg too?
>
> TEST 1
> I directly loaded the project containing both the sources and the
> render (VP9). The two CinGGs are configured similarly, decoding with vaapi.
>
> TEST2
> Second test regarding decoding in hardware with vaapi. I loaded directly
> into
> timeline a media with h264 codec and mp4 format to make sure vaapi is
> supported.
> Playback and scrolling does not produce any messages on the terminal.
>

I assume attached tar archive then only about TEST1 ? Because it contain
"HW device init failed, using SW decode." messages. I wonder if plain
system ffmpeg still  works for hw decoding? I def. saw ffmpeg patch related
to new libva and AMD hardware ...

https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240321151054.1241-1-primeadv...@gmail.com/

ah, no it was about HEVC encoding ...


> NOTE:
> Audio with PulseAudio does not work. The following message is shown:
>
> AudioPulse::open_output 110: failed server=(null) Invalid argument
>
> I don't understand why, on other occasions it works. This is true for
> both appimage and
> compiled.
>


May be pipewire's pulseaudio emulation tries to be smart and start only if
there demand, but sometimes fail behind a bit?

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-24 Thread Andrew Randrianasulu via Cin
ср, 24 апр. 2024 г., 14:51 Andrea paz :

> > well, this is even with my latest patch?
> Sorry for the late response. Below is what
> is written in the terminal from loading the media in timeline, then
> the render and finally
> the subsequent loading of the render to timeline:
>
> file:/home/paz/test/4-3_3-2.mov
>   err: Invalid argument
> Render::render_single: Session finished.
> ** rendered 1019 frames in 50.335 secs, 20.244 fps
> FFMPEG::open_decoder: some stream times estimated:
> /home/paz/igor_test3.webm
> audio0 pad 8 -143 (151)
> audio0 pad 0 -143 (143)
> FFMPEG::open_decoder: some stream times estimated:
> /home/paz/igor_test3.webm
> FFStream::decode: avcodec_send_packet failed.
> file:/home/paz/test/4-3_3-2.mov
>   err: Invalid argument
> FFStream::decode: failed
> HW device init failed, using SW decode.
> file:/home/paz/test/4-3_3-2.mov
>   err: Invalid argument
> FFMPEG::open_decoder: some stream times estimated:
> /home/paz/igor_test3.webm
> FFMPEG::open_decoder: some stream times estimated:
> /home/paz/igor_test3.webm
>

hm, so hw decoding of vp9 does not work? Only on this version or on
previous ffmpeg 6.1 based cingg too?



> Also, you can try to run cin via qemu-x86_64 user level emulator with
> different -cpu parameters, may be bug surface only on specific cpus .
> I have the latest Ubuntu on qemu, but I don't quite understand what I
> need to do. What
> parameters of the processor should I use?
>

if you run qemu with -cpu help it should print long list of supported
processors ... Note, in this specific case I mean not full system emulation
(qemu-system-*) but purely user-space component running directly on host
kernel. It was unable to catch some alignment problems in my case, but for
making your cpu unusually slow it definitely works!



> Anyway, I thought there still a lot to test (hw decoding, hw rendering,
> renderfarm, background render, proxies, various profiles) so we better not
> to rush release this month ...
> I agree about postponing the version with ffmpeg7.
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] OT: 3D audio gui editor

2024-04-23 Thread Andrew Randrianasulu via Cin
https://hackaday.io/project/178760-3d-audio-producer

may be someone will like to play with it (it does not make giant 55 channel
audio files, instead it tries to play many-many mono sounds in 3d space for
stereo sound systems (or may be 5.1 ones)). Even if it does not have render
to file features (?) you probably can capture it via alsa/pulseaudio
loopback ?
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-23 Thread Andrew Randrianasulu via Cin
вт, 23 апр. 2024 г., 16:05 Andrea paz via Cin :

> Trying to repeat Igor's test, with CinGG compiled with ffmpeg7, I find
> the render audio clean and without scratches. I remember that I use
> Arch, which has all updated drivers and libraries. On the terminal I
> read:
>
> file:/home/paz/igor_test.webm
>   err: Invalid data found when processing input
> FFStream::decode: failed
> FFMPEG::open_decoder: some stream times estimated: /home/paz/igor_test.webm
> FFMPEG::open_decoder: some stream times estimated: /home/paz/igor_test.webm
>

well, this is even with my latest patch? I think it eliminated *encoder*
errors, and there was no decoding errors with libvorbis encoded streams
..but there was with ffmpeg_vorbis.

Also, you can try to run cin via qemu-x86_64 user level emulator with
different -cpu parameters, may be bug surface only on specific cpus .

Anyway, I thought there still a lot to test (hw decoding, hw rendering,
renderfarm, background render, proxies, various profiles) so we better not
to rush release this month ...


-- 
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] trying to fix libopus for 5.1 sound

2024-04-23 Thread Andrew Randrianasulu via Cin
вт, 23 апр. 2024 г., 16:03 Andrea paz :

>  I don't understand how the channel map works. Anyway I post you the image
> showing on the left the sources and on the right a render:
> https://postimg.cc/Bj9GrFyc
>


Hm, they quite different.

Thing is, as I've read in mozilla bugtracker  mapping_family 1 applies some
kind of LFE channel compression so .1 (subwoofer) low frequency channel
must be in specific position 

https://bugzilla.mozilla.org/show_bug.cgi?id=1301518

Anyway, we hopefully can set this option manually. Just I had no idea what
values I can use ...

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] trying to fix libopus for 5.1 sound

2024-04-23 Thread Andrew Randrianasulu via Cin
вт, 23 апр. 2024 г., 13:12 Andrew Randrianasulu :

>
>
> вт, 23 апр. 2024 г., 13:09 Andrea paz :
>
>> > But then can you try ffmpeg 7 with and without patch just in case it
>> only affects ffmpeg 7.0?
>>
>> Still the same result.
>>
>
>
> Thanks! Then, if real channel order not affected (hopefully something you
> can confirm by looking at audio track's waveforms) I guess this patch
> really not needed, sorry!
>


small dig on what this parameter mean resulted in this link:

https://www.iana.org/assignments/opus-channel-mapping-families/opus-channel-mapping-families.xhtml


Available Formats
CSV
<https://www.iana.org/assignments/opus-channel-mapping-families/mapping-families.csv>
Value Description Reference
0 Mono, L/R stereo [RFC7845, Section 5.1.1.1
<https://www.iana.org/go/rfc7845>][RFC8486, Section 5
<https://www.iana.org/go/rfc8486>]
1 1-8 channel surround [RFC7845, Section 5.1.1.2
<https://www.iana.org/go/rfc7845>][RFC8486, Section 5
<https://www.iana.org/go/rfc8486>]
2 Ambisonics as individual channels [RFC8486, Section 3.1
<https://www.iana.org/go/rfc8486>]
3 Ambisonics with demixing matrix [RFC8486, Section 3.2
<https://www.iana.org/go/rfc8486>]
4-239 Unassigned
240-254 Experimental use [RFC8486, Section 6
<https://www.iana.org/go/rfc8486>]
255 Discrete channels
[RFC7845, Section 5.1.1.3 <https://www.iana.org/go/rfc7845>][RFC8486,
Section 5 <https://www.iana.org/go/rfc8486>]
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] trying to fix libopus for 5.1 sound

2024-04-23 Thread Andrew Randrianasulu via Cin
вт, 23 апр. 2024 г., 13:09 Andrea paz :

> > But then can you try ffmpeg 7 with and without patch just in case it
> only affects ffmpeg 7.0?
>
> Still the same result.
>


Thanks! Then, if real channel order not affected (hopefully something you
can confirm by looking at audio track's waveforms) I guess this patch
really not needed, sorry!

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] trying to fix libopus for 5.1 sound

2024-04-23 Thread Andrew Randrianasulu via Cin
вт, 23 апр. 2024 г., 12:46 Andrea paz :

> Same result with a cut made by me. I got the various files from:
> https://samples.mplayerhq.hu/A-codecs/AC3/
>
> Broadway-5.1-48khz-448kbit.ac3
> Canyon-5.1-48khz-448kbit.ac3
> monsters_inc_2.0_192.ac3
> TomorrowNeverDies-2.1-48khz-192kbit.ac3
>
> There are no video tracks, I only rendered the audio.
>


Should be ok.

But then can you try ffmpeg 7 with and without patch just in case it only
affects ffmpeg 7.0?

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] trying to fix libopus for 5.1 sound

2024-04-23 Thread Andrew Randrianasulu via Cin
вт, 23 апр. 2024 г., 10:37 Andrea paz :

> > Can you also post output of mediainfo for both cases?
> Here it is.
>


Channel layout seems to be the same in both cases:

L R C Lb Rb LFE

so, probably patch not needed in our case .

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] trying to fix libopus for 5.1 sound

2024-04-22 Thread Andrew Randrianasulu via Cin
пн, 22 апр. 2024 г., 21:43 Andrea paz :

> Test with CinGG-20240229-x86_64-multibit.AppImage (no patch):
>
> https://streamable.com/r4r150
>
> test with compile version with ffmpeg7 and patch:
>
> https://streamable.com/rd9sz0


Can you also post output of mediainfo for both cases?



>
> With only 4 audio channels:
>
> [libopus @ 0x75d44803b100] Invalid channel layout 4.0 for specified
> mapping family -1.
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-22 Thread Andrew Randrianasulu via Cin
пн, 22 апр. 2024 г., 19:43 Phyllis Smith via Cin :

> IgorBeg, in Preferences/Settings/Playback A what is the audio set to?  The
> default on a new startup seems to be Alsa, default, 16 bit linear.
> Unfortunately I have no speakers on my Ubuntu 16 O/S, but when I download
> this new AppImage and load a ffmpeg 7.0 audio filter on my laptop, it works
> for me.  I am confused by your bad results.  Also, even though you get
> those error messages, are you getting audio because you say it is
> "scratchy", so it is working?
>

If you set encoding preference to add newly encoded asset to new tracks you
can easily see for default webm profile (at least on slower machine?) that
resulting audio waveform is very glitchy and different from source audio




> On Sun, Apr 21, 2024 at 4:13 AM Igor BEGHETTO via Cin <
> cin@lists.cinelerra-gg.org> wrote:
>
>>  AppImage for my old UbuntuStudio.
>> Same messages and issues as before for me by my tests.
>>
>> CLI output:
>> FFStream::encode_frame: encode failed.
>> file: /home/charlie/Documents/temp/pippo_ffmpeg7_test-20240421-2.webm
>>err: Resource temporarily unavailable
>> FFMPEG::mux_audio  err: Operation not permitted
>>
>> And the audio of the rendered file is full of scratches, unfortunately.
>>
>> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] trying to fix libopus for 5.1 sound

2024-04-22 Thread Andrew Randrianasulu via Cin
пн, 22 апр. 2024 г., 14:15 Andrea paz :

> I cannot find "matrixbench_highdivx_ac3.avi". Can you provide it?
>

http://samples.mplayerhq.hu/benchmark/testsuite1/matrixbench_highdivx_ac3.avi



NOTE: could the problems stem from the AVI format, which is old and limited?
>


Hardly, it decodes correctly, just opus encoding may suffer from wrong
channel mapping 

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] trying to fix libopus for 5.1 sound

2024-04-22 Thread Andrew Randrianasulu via Cin
Patch via
https://github.com/HandBrake/HandBrake/commit/8a0847806d558b252daceb5610d2ba61f7e9ba5a

you can test it with matrixbench trailer:

bin/cin /home/admin/K38/files/home/HUAWEI/home/matrixbench_highdivx_ac3.avi

and set encoder to FFMPEG webm - libopus (and video encoder of your choice).

For some reason 4 ch. still does not work, but those files must be rare
(made one by accident, trying to encode 2 stereo tracks avi into mp4
without any  audio track disabling)
From 4e558d31dcd92a93154d286aa1d292ec960f0193 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Mon, 22 Apr 2024 11:26:21 +0300
Subject: [PATCH] Set mapping_family to 1 for 5.1 libopus

---
 cinelerra-5.1/cinelerra/ffmpeg.C | 4 
 1 file changed, 4 insertions(+)

diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C
index 9b8832dd..1f00b883 100644
--- a/cinelerra-5.1/cinelerra/ffmpeg.C
+++ b/cinelerra-5.1/cinelerra/ffmpeg.C
@@ -2951,6 +2951,10 @@ int FFMPEG::open_encoder(const char *type, const char *spec)
 sprintf(arg, "%d", ctx->global_quality);
 av_dict_set(, "global_quality", arg, 0);
 			}
+			if(!strcmp(codec_name, "libopus")) {
+			if(asset->channels > 2)
+av_dict_set(, "mapping_family", "1", 0);
+			}
 			int aidx = ffaudio.size();
 			int fidx = aidx + ffvideo.size();
 			FFAudioStream *aud = new FFAudioStream(this, st, aidx, fidx);
-- 
2.35.8

-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] AgingTV plugin issue

2024-04-22 Thread Andrew Randrianasulu via Cin
On Mon, Apr 22, 2024 at 11:03 AM Andrea paz 
wrote:

> AgingTv seems to work fine for me. The settings are maintained. The
> slider at 0 gives no effect and increasing it works well. The check
> button works well.
> Two of my notes:
> 1- Grain is too pronounced. In my opinion there should be a slider for
> "Grain" as well so that it can be modulated.
> 2- I didn't quite understand the effect of "Dust"; what does it do?
>

Should make some kind of dark spots on video ...
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] May be I fixed vorbis for webm/mkv with ffmpeg 7/6

2024-04-22 Thread Andrew Randrianasulu via Cin
On Mon, Apr 22, 2024 at 11:02 AM Andrea paz 
wrote:

> I don't remember the Vorbis problem very well. I ran renders of:
> Ogg/Vorbis; ffmpeg/Ogg (vorbis); ffmpeg/Ogg (flac); ffmpeg/webm
> (vorbis); ffmpeg/mkv (vorbis) and ffmpeg/mkv (flac). In all cases the
> sound was clean and correct.
>

I think Igor BEGHETTO run into scratching sound exactly with ffmpeg's
default webm profile ?
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] May be I fixed vorbis for webm/mkv with ffmpeg 7/6

2024-04-22 Thread Andrew Randrianasulu via Cin
Can you check attached patch ?
From a00d181b876c3630175c4affb9e2df1bff34 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Mon, 22 Apr 2024 09:22:42 +0300
Subject: [PATCH] may be fix vorbis in ffmpeg 6/7 ?

---
 cinelerra-5.1/cinelerra/ffmpeg.C | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C
index 2fa3d85d..9b8832dd 100644
--- a/cinelerra-5.1/cinelerra/ffmpeg.C
+++ b/cinelerra-5.1/cinelerra/ffmpeg.C
@@ -641,8 +641,8 @@ int FFStream::encode_frame(AVFrame *frame)
 		if ( ret == AVERROR(EAGAIN) && !frame ) continue;
 		FFPacket opkt;
 		ret = avcodec_receive_packet(avctx, opkt);
-		if( !frame && ret == AVERROR_EOF ) return pkts;
-		if( ret < 0 ) break;
+		if( !frame && (ret == AVERROR_EOF || ret == AVERROR(EAGAIN) )) return pkts;
+		//if( ret < 0 ) break;
 		ret = write_packet(opkt);
 		if( ret < 0 ) break;
 		++pkts;
-- 
2.35.8

-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] AgingTV plugin issue

2024-04-21 Thread Andrew Randrianasulu via Cin
Please try attached patches - first fixes aging window sliders so they show
latest changes over configure window  close/reopen cycle
Second patch mods againg.C so processing for pits/dust happens only if
param > 0 (not sure if such change desirable?)

On Thu, Feb 29, 2024 at 10:08 AM Andrew Randrianasulu <
randrianas...@gmail.com> wrote:

>
>
> ср, 28 февр. 2024 г., 20:37 Phyllis Smith via Cin <
> cin@lists.cinelerra-gg.org>:
>
>> (ometimes I just can not stop myself and just had to look at AgingTV.)  I
>> think I found the problem.  If everything is unchecked and then one of the
>> 3 items of Scratch, Pits, or Dust is checked BUT set to zero, you can still
>> see that item in the compositor.  Grain is either on or off and works as
>> expected.
>>
>
>
> Einar added  few commits to cin-cve version of plugin:
>
> https://github.com/vanakala/cinelerra-cve/commits/master/plugins/aging
>
> "Fixed applying of AgingTV pits"
>
> "New function AgingConfig::boundaries
>
> Checks the limits of configuration parameters
> Area_scale and dust_interval can't be zero
>
> "
>
>
>> The good news is that at least you can designate which type of aging you
>> want, be it grain, scratch, pits, dust, or all or none.  I will log a BT on
>> this in case anyone wants to look at it in the future.
>>
>> --
>> Cin mailing list
>> Cin@lists.cinelerra-gg.org
>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>
>
From 99f324b76997097e571f2e637b739b5381edb6cc Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Sun, 21 Apr 2024 11:45:15 +0300
Subject: [PATCH 1/2] Save value of agingwindow sliders by using get_value().

---
 cinelerra-5.1/plugins/aging/agingwindow.C | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cinelerra-5.1/plugins/aging/agingwindow.C b/cinelerra-5.1/plugins/aging/agingwindow.C
index 5f4007aa..9ccb4d8a 100644
--- a/cinelerra-5.1/plugins/aging/agingwindow.C
+++ b/cinelerra-5.1/plugins/aging/agingwindow.C
@@ -82,6 +82,7 @@ AgingISlider::~AgingISlider()
 int AgingISlider::handle_event()
 {
 	int ret = BC_ISlider::handle_event();
+	*output = get_value();
 	win->plugin->send_configure_change();
 	return ret;
 }
-- 
2.35.8

From 49a6d85161ed3d26cb0b56986e393768d601d76e Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Sun, 21 Apr 2024 11:46:39 +0300
Subject: [PATCH 2/2] Only process agingTV dust/pits if value > 0

---
 cinelerra-5.1/plugins/aging/aging.C | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/plugins/aging/aging.C b/cinelerra-5.1/plugins/aging/aging.C
index 5517b44d..41d30d75 100644
--- a/cinelerra-5.1/plugins/aging/aging.C
+++ b/cinelerra-5.1/plugins/aging/aging.C
@@ -581,12 +581,12 @@ void AgingClient::process_package(LoadPackage *package)
 			plugin->input_ptr->get_color_model(),
 			plugin->input_ptr->get_w(),
 			local_package->row2 - local_package->row1);
-	if( plugin->config.pits )
+	if( plugin->config.pits && plugin->config.pits_interval > 0 )
 		pits(output_rows,
 			plugin->input_ptr->get_color_model(),
 			plugin->input_ptr->get_w(),
 			local_package->row2 - local_package->row1);
-	if( plugin->config.dust )
+	if( plugin->config.dust && plugin->config.dust_interval > 0 )
 		dusts(output_rows,
 			plugin->input_ptr->get_color_model(),
 			plugin->input_ptr->get_w(),
-- 
2.35.8

-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ChomaKey's old bug

2024-04-21 Thread Andrew Randrianasulu via Cin
On Sun, Apr 21, 2024 at 9:50 AM Andrea paz 
wrote:

> You are right. You can't see it by applying Title to the same track as
> the purple background, but by putting Title in an empty upper track
> the problem is still there.
>

Thing is, patch only alters dissolve plugin, and not titler (our titler
and one in cinHV  differentiate quite far)
But then I tried  to reconstruct test case with red and white2 png (rgb
from cinHV tests folder) on same track with dissolve transition
between them and even unpatched cingg was ok in all modes (yuva-8, rgb-8
...) ?
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ChomaKey's old bug

2024-04-20 Thread Andrew Randrianasulu via Cin
On Sun, Apr 7, 2024 at 12:52 AM Andrew Randrianasulu <
randrianas...@gmail.com> wrote:

>
>
> вс, 7 апр. 2024 г., 00:19 Andrea paz via Cin :
>
>> In an exchange of mails Igor Vladimirsky pointed out to me that the
>> old bug reported by Camille:
>>
>> https://lists.cinelerra-gg.org/pipermail/cin/2021-March/003149.html
>> and:
>> https://www.cinelerra-gg.org/bugtracker/view.php?id=559
>>
>> Has been fixed by Adam in CinHV. The patch with the fix is at:
>>
>>
>> https://github.com/heroineworshiper/hvirtual/commit/9080ca3fc952edce68fcabb6d7460dda7c75da79
>>
>> Andrew, do you think it is possible to implement the patch in CinGG?
>>
>
>
> may be? I hope it just self-contained in plugins/dissolve ... will try to
> copy/pasta  changes from this commit  tomorrow when I power up desktop
>
>
Can you try attached patch ?


>
> --
>> Cin mailing list
>> Cin@lists.cinelerra-gg.org
>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>
>
From a553332a41f8c045422cf32d1feccf4ebc9bf3ba Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Sat, 20 Apr 2024 18:58:04 +0300
Subject: [PATCH] Dissolve fix from HV

---
 cinelerra-5.1/plugins/dissolve/dissolve.C | 58 ++-
 1 file changed, 56 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/plugins/dissolve/dissolve.C b/cinelerra-5.1/plugins/dissolve/dissolve.C
index 37b5ac8c..20a49f2a 100644
--- a/cinelerra-5.1/plugins/dissolve/dissolve.C
+++ b/cinelerra-5.1/plugins/dissolve/dissolve.C
@@ -1,7 +1,7 @@
 
 /*
  * CINELERRA
- * Copyright (C) 2008 Adam Williams 
+ * Copyright (C) 2008-2024 Adam Williams 
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -69,11 +69,65 @@ int DissolveMain::process_realtime(VFrame *incoming, VFrame *outgoing)
 // Use software
 	if(!overlayer) overlayer = new OverlayFrame(get_project_smp() + 1);
 
+// porter duff fails us for alpha
+// copy what OPENGL does
+#define DISSOLVE(type, temp, max, chroma) \
+{ \
+temp opacity = fade * max; \
+temp transparency = max - opacity; \
+type **out_rows = (type**)outgoing->get_rows(); \
+type **in_rows = (type**)incoming->get_rows(); \
+for(int i = 0; i < h; i++) \
+{ \
+type *out_row = out_rows[i]; \
+type *in_row = in_rows[i]; \
+for(int j = 0; j < w; j++) \
+{ \
+temp out_r = out_row[0]; \
+temp out_g = out_row[1]; \
+temp out_b = out_row[2]; \
+temp out_a = out_row[3]; \
+temp in_r = *in_row++; \
+temp in_g = *in_row++; \
+temp in_b = *in_row++; \
+temp in_a = *in_row++; \
+*out_row++ = (out_r * transparency + \
+in_r * opacity) / max; \
+*out_row++ = ((out_g - chroma) * transparency + \
+(in_g - chroma) * opacity) / max + chroma; \
+*out_row++ = ((out_b - chroma) * transparency + \
+(in_b - chroma) * opacity) / max + chroma; \
+*out_row++ = (out_a * transparency + \
+(in_a * opacity)) / max; \
+} \
+} \
+}
+
+if(BC_CModels::has_alpha(outgoing->get_color_model()))
+{
+int w = outgoing->get_w();
+int h = outgoing->get_h();
+switch (outgoing->get_color_model())
+{
+	case BC_RGBA:
+DISSOLVE(uint8_t, int16_t, 255, 0);
+break;
+	case BC_YUVA:
+DISSOLVE(uint8_t, int16_t, 255, 128);
+break;
+	case BC_RGBA_FLOAT:
+DISSOLVE(float, float, 1.0, 0.0);
+break;
+}
+}
+else
+{
+
 	overlayer->overlay(outgoing, incoming,
 		0, 0, incoming->get_w(), incoming->get_h(),
 		0, 0, incoming->get_w(), incoming->get_h(),
 		fade, TRANSFER_SRC, NEAREST_NEIGHBOR);
-
+}
 	return 0;
 }
 
-- 
2.35.8

-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-19 Thread Andrew Randrianasulu via Cin
пт, 19 апр. 2024 г., 10:31 Andrea paz :

> As usual, I get a little confused about patches and how to put them on
> top of others.
> Can you clarify for me which patches to put and how to put them?
>

you already have cingg build tree with most 7.0 support patches applied?

then you need to apply (git am)

0001-May-be-fix-audio-filters-in-ffmpeg-7.0.patch

0002-Fix-ffmpeg-audio-filter-harder.patch

 0003-Use-av_opt_set-for-ch_layout-in-abuffersink.patch

in this order and see if ffmpeg audio filters started to work ...

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-18 Thread Andrew Randrianasulu via Cin
On Fri, Apr 19, 2024 at 6:27 AM Phyllis Smith 
wrote:

> Success, I think as there are no errors and it is doing something normal
> but have not compared to ffmpeg 6.1 yet..  Still need more tests and Andrea
> to try.
> I had a hard time telling if several plugins were making a difference
> until I tried F_volume and set the volume range to 10.  Definitely got real
> loud.
>
> THANK YOU!  will test more tomorrow on a different computer.
>

I also tried to re-add removed in last patch option using different
function, seems to  work, too!


>
> On Thu, Apr 18, 2024 at 9:08 PM Andrew Randrianasulu <
> randrianas...@gmail.com> wrote:
>
>> try this one patch on top of already applied one?
>>
>> On Fri, Apr 19, 2024 at 5:16 AM Phyllis Smith 
>> wrote:
>>
>>> Sorry for the late reply - I had to reboot to check.  I added the first
>>> 12 F_ audio plugins, turned them all off, and then checked by turning them
>>> each on one by one.  All had the same error. (I will leave the computer on
>>> for another hour if you want me to try something else).
>>>
>>> But Andrea should verify also.
>>>
>>> On Thu, Apr 18, 2024 at 7:26 PM Andrew Randrianasulu <
>>> randrianas...@gmail.com> wrote:
>>>
>>>>
>>>>
>>>> пт, 19 апр. 2024 г., 04:22 Phyllis Smith :
>>>>
>>>>> Andrew, sorry but no change for me - still same errors.  At first I
>>>>> only recompiled pluginfclient.C but since it did not work, I did a full
>>>>> build.  Still failed.  Also, verified that the patch was actually applied
>>>>> just in case I made a mistake.  I have settings Alsa  / HD-Audio Generic 
>>>>> #0
>>>>> / 16 bit linear.
>>>>>
>>>>
>>>> what exactly filter you tried?
>>>>
>>>>>
>>>>> On Thu, Apr 18, 2024 at 5:41 PM Andrew Randrianasulu <
>>>>> randrianas...@gmail.com> wrote:
>>>>>
>>>>>> try attached fix?
>>>>>>
>>>>>> mashed together from ffmpeg examples and
>>>>>> https://stackoverflow.com/questions/76080651/how-do-we-get-the-channel-layout-syntax-from-new-ffmpeg-avcodecparameters
>>>>>>
>>>>>> чт, 18 апр. 2024 г., 11:10 Andrew Randrianasulu <
>>>>>> randrianas...@gmail.com>:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> чт, 18 апр. 2024 г., 11:07 Andrea paz via Cin <
>>>>>>> cin@lists.cinelerra-gg.org>:
>>>>>>>
>>>>>>>> @Andrew Randrianasulu
>>>>>>>>
>>>>>>>> Complete failure with ffmpeg audio filters.
>>>>>>>> One premise, setting the audio driver to "pulse" the audio does not
>>>>>>>> work. Setting it to "alsa" works normally. I do not have Pulseaudio
>>>>>>>> in
>>>>>>>> my system, but Pipewire takes pulse signals as if it were there. In
>>>>>>>> ffmpeg6 I do not have this problem.
>>>>>>>>
>>>>>>>> None of the ffmpeg filters I have tried work.
>>>>>>>> The typical error is as follows:
>>>>>>>>
>>>>>>>> PluginFAClient::activate: F_adynamicequalizer failed
>>>>>>>>   err: Option not found
>>>>>>>> PluginFAClient::process_buffer() F_adynamicequalizer
>>>>>>>>   err: Operation not permitted
>>>>>>>>
>>>>>>>> The old CinGG with ffmpeg 6 works normally.
>>>>>>>>
>>>>>>>> LV2 and native filters work fine, of course.
>>>>>>>>
>>>>>>>
>>>>>>> Ahh, thanks! something still wrong then ... I'll look into this.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>> Cin mailing list
>>>>>>>> Cin@lists.cinelerra-gg.org
>>>>>>>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>>>>>>>
>>>>>>>
From 65e3aa437a8fdb5adedfd43e5331c6f3dad093cc Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Fri, 19 Apr 2024 07:07:27 +0300
Subject: [PATCH 3/3] Use av_opt_set for ch_layout in abuffersink

---
 cinelerra-5.1/cinelerra/pluginfclient.C | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/pluginfclient.C b/cinelerra-5.1/cinelerra/pluginfclient.C
index 0ffcf905..b8694b12 100644
--- a/cinelerra-5.1/cinelerra/pluginfclient.C
+++ b/cinelerra-5.1/cinelerra/pluginfclient.C
@@ -870,9 +870,9 @@ int PluginFAClient::activate()
 	if( ret >= 0 )
 		ret = av_opt_set_bin(fsink, "sample_fmts",
 			(uint8_t*)_fmt, sizeof(sample_fmt), AV_OPT_SEARCH_CHILDREN);
-/*	if( ret >= 0 )
-		ret = av_opt_set_bin(fsink, "ch_layouts",
-			(uint8_t*), sizeof(chLayoutDescription), AV_OPT_SEARCH_CHILDREN); */
+	if( ret >= 0 )
+		ret = av_opt_set(fsink, "ch_layouts",
+			chLayoutDescription, AV_OPT_SEARCH_CHILDREN);
 	if( ret >= 0 )
 		ret = av_opt_set_bin(fsink, "sample_rates",
 			(uint8_t*)_rate, sizeof(sample_rate), AV_OPT_SEARCH_CHILDREN);
-- 
2.35.8

-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-18 Thread Andrew Randrianasulu via Cin
try this one patch on top of already applied one?

On Fri, Apr 19, 2024 at 5:16 AM Phyllis Smith 
wrote:

> Sorry for the late reply - I had to reboot to check.  I added the first 12
> F_ audio plugins, turned them all off, and then checked by turning them
> each on one by one.  All had the same error. (I will leave the computer on
> for another hour if you want me to try something else).
>
> But Andrea should verify also.
>
> On Thu, Apr 18, 2024 at 7:26 PM Andrew Randrianasulu <
> randrianas...@gmail.com> wrote:
>
>>
>>
>> пт, 19 апр. 2024 г., 04:22 Phyllis Smith :
>>
>>> Andrew, sorry but no change for me - still same errors.  At first I only
>>> recompiled pluginfclient.C but since it did not work, I did a full build.
>>> Still failed.  Also, verified that the patch was actually applied just in
>>> case I made a mistake.  I have settings Alsa  / HD-Audio Generic #0 / 16
>>> bit linear.
>>>
>>
>> what exactly filter you tried?
>>
>>>
>>> On Thu, Apr 18, 2024 at 5:41 PM Andrew Randrianasulu <
>>> randrianas...@gmail.com> wrote:
>>>
>>>> try attached fix?
>>>>
>>>> mashed together from ffmpeg examples and
>>>> https://stackoverflow.com/questions/76080651/how-do-we-get-the-channel-layout-syntax-from-new-ffmpeg-avcodecparameters
>>>>
>>>> чт, 18 апр. 2024 г., 11:10 Andrew Randrianasulu <
>>>> randrianas...@gmail.com>:
>>>>
>>>>>
>>>>>
>>>>> чт, 18 апр. 2024 г., 11:07 Andrea paz via Cin <
>>>>> cin@lists.cinelerra-gg.org>:
>>>>>
>>>>>> @Andrew Randrianasulu
>>>>>>
>>>>>> Complete failure with ffmpeg audio filters.
>>>>>> One premise, setting the audio driver to "pulse" the audio does not
>>>>>> work. Setting it to "alsa" works normally. I do not have Pulseaudio in
>>>>>> my system, but Pipewire takes pulse signals as if it were there. In
>>>>>> ffmpeg6 I do not have this problem.
>>>>>>
>>>>>> None of the ffmpeg filters I have tried work.
>>>>>> The typical error is as follows:
>>>>>>
>>>>>> PluginFAClient::activate: F_adynamicequalizer failed
>>>>>>   err: Option not found
>>>>>> PluginFAClient::process_buffer() F_adynamicequalizer
>>>>>>   err: Operation not permitted
>>>>>>
>>>>>> The old CinGG with ffmpeg 6 works normally.
>>>>>>
>>>>>> LV2 and native filters work fine, of course.
>>>>>>
>>>>>
>>>>> Ahh, thanks! something still wrong then ... I'll look into this.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>> Cin mailing list
>>>>>> Cin@lists.cinelerra-gg.org
>>>>>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>>>>>
>>>>>
From 49e3834a0108a845ece885a1bccca0883fb16010 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Fri, 19 Apr 2024 06:05:34 +0300
Subject: [PATCH 2/2] Fix ffmpeg audio filter harder?

---
 cinelerra-5.1/cinelerra/pluginfclient.C | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/pluginfclient.C b/cinelerra-5.1/cinelerra/pluginfclient.C
index 9cf6407f..0ffcf905 100644
--- a/cinelerra-5.1/cinelerra/pluginfclient.C
+++ b/cinelerra-5.1/cinelerra/pluginfclient.C
@@ -858,10 +858,11 @@ int PluginFAClient::activate()
 	if( ret >= 0 && ffilt->filter->inputs ) {
 		char args[BCTEXTLEN];
 		snprintf(args, sizeof(args),
-			"time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=%s",
-			1, sample_rate, sample_rate, av_get_sample_fmt_name(sample_fmt), chLayoutDescription);
+			"time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=%s:channels=%i",
+			1, sample_rate, sample_rate, av_get_sample_fmt_name(sample_fmt), chLayoutDescription, channels);
 		ret = avfilter_graph_create_filter(, avfilter_get_by_name("abuffer"),
 			"in", args, NULL, graph);
+		if(ret <0) printf("abuffer failed!\n");
 	}
 	if( ret >= 0 )
 		ret = avfilter_graph_create_filter(, avfilter_get_by_name("abuffersink"),
@@ -869,9 +870,9 @@ int PluginFAClient::activate()
 	if( ret >= 0 )
 		ret = av_opt_set_bin(fsink, "sample_fmts",
 			(uint8_t*)_fmt, sizeof(sample_fmt), AV_OPT_SEARCH_CHILDREN);
-	if( ret >= 0 )
-		ret = av_opt_set_bin(fsink, "channel_layout",
-			(uint8_t*), sizeof(layout), AV_OPT_SEARCH_CHILDREN);
+/*	if( ret >= 0 )
+		ret = av_opt_set_bin(fsink, "ch_layouts",
+			(uint8_t*), sizeof(chLayoutDescription), AV_OPT_SEARCH_CHILDREN); */
 	if( ret >= 0 )
 		ret = av_opt_set_bin(fsink, "sample_rates",
 			(uint8_t*)_rate, sizeof(sample_rate), AV_OPT_SEARCH_CHILDREN);
-- 
2.35.8

-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-18 Thread Andrew Randrianasulu via Cin
пт, 19 апр. 2024 г., 04:22 Phyllis Smith :

> Andrew, sorry but no change for me - still same errors.  At first I only
> recompiled pluginfclient.C but since it did not work, I did a full build.
> Still failed.  Also, verified that the patch was actually applied just in
> case I made a mistake.  I have settings Alsa  / HD-Audio Generic #0 / 16
> bit linear.
>

what exactly filter you tried?

>
> On Thu, Apr 18, 2024 at 5:41 PM Andrew Randrianasulu <
> randrianas...@gmail.com> wrote:
>
>> try attached fix?
>>
>> mashed together from ffmpeg examples and
>> https://stackoverflow.com/questions/76080651/how-do-we-get-the-channel-layout-syntax-from-new-ffmpeg-avcodecparameters
>>
>> чт, 18 апр. 2024 г., 11:10 Andrew Randrianasulu > >:
>>
>>>
>>>
>>> чт, 18 апр. 2024 г., 11:07 Andrea paz via Cin <
>>> cin@lists.cinelerra-gg.org>:
>>>
>>>> @Andrew Randrianasulu
>>>>
>>>> Complete failure with ffmpeg audio filters.
>>>> One premise, setting the audio driver to "pulse" the audio does not
>>>> work. Setting it to "alsa" works normally. I do not have Pulseaudio in
>>>> my system, but Pipewire takes pulse signals as if it were there. In
>>>> ffmpeg6 I do not have this problem.
>>>>
>>>> None of the ffmpeg filters I have tried work.
>>>> The typical error is as follows:
>>>>
>>>> PluginFAClient::activate: F_adynamicequalizer failed
>>>>   err: Option not found
>>>> PluginFAClient::process_buffer() F_adynamicequalizer
>>>>   err: Operation not permitted
>>>>
>>>> The old CinGG with ffmpeg 6 works normally.
>>>>
>>>> LV2 and native filters work fine, of course.
>>>>
>>>
>>> Ahh, thanks! something still wrong then ... I'll look into this.
>>>
>>>
>>>
>>> --
>>>> Cin mailing list
>>>> Cin@lists.cinelerra-gg.org
>>>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>>>
>>>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-18 Thread Andrew Randrianasulu via Cin
try attached fix?

mashed together from ffmpeg examples and
https://stackoverflow.com/questions/76080651/how-do-we-get-the-channel-layout-syntax-from-new-ffmpeg-avcodecparameters

чт, 18 апр. 2024 г., 11:10 Andrew Randrianasulu :

>
>
> чт, 18 апр. 2024 г., 11:07 Andrea paz via Cin  >:
>
>> @Andrew Randrianasulu
>>
>> Complete failure with ffmpeg audio filters.
>> One premise, setting the audio driver to "pulse" the audio does not
>> work. Setting it to "alsa" works normally. I do not have Pulseaudio in
>> my system, but Pipewire takes pulse signals as if it were there. In
>> ffmpeg6 I do not have this problem.
>>
>> None of the ffmpeg filters I have tried work.
>> The typical error is as follows:
>>
>> PluginFAClient::activate: F_adynamicequalizer failed
>>   err: Option not found
>> PluginFAClient::process_buffer() F_adynamicequalizer
>>   err: Operation not permitted
>>
>> The old CinGG with ffmpeg 6 works normally.
>>
>> LV2 and native filters work fine, of course.
>>
>
> Ahh, thanks! something still wrong then ... I'll look into this.
>
>
>
> --
>> Cin mailing list
>> Cin@lists.cinelerra-gg.org
>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>
>
From 95be2bfbc168816bfe89282e619062195fe6fa07 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Fri, 19 Apr 2024 02:29:03 +0300
Subject: [PATCH] May be fix audio filters in ffmpeg 7.0

---
 cinelerra-5.1/cinelerra/pluginfclient.C | 23 ++-
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/pluginfclient.C b/cinelerra-5.1/cinelerra/pluginfclient.C
index 5d4fb659..9cf6407f 100644
--- a/cinelerra-5.1/cinelerra/pluginfclient.C
+++ b/cinelerra-5.1/cinelerra/pluginfclient.C
@@ -845,14 +845,21 @@ int PluginFAClient::activate()
 	}
 	AVSampleFormat sample_fmt = AV_SAMPLE_FMT_FLTP;
 	int channels = PluginClient::total_in_buffers;
-	uint64_t layout = (((uint64_t)1)<graph;
 	int ret = !graph ? -1 : 0;
 	if( ret >= 0 && ffilt->filter->inputs ) {
 		char args[BCTEXTLEN];
 		snprintf(args, sizeof(args),
-			"time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%jx",
-			1, sample_rate, sample_rate, av_get_sample_fmt_name(sample_fmt), layout);
+			"time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=%s",
+			1, sample_rate, sample_rate, av_get_sample_fmt_name(sample_fmt), chLayoutDescription);
 		ret = avfilter_graph_create_filter(, avfilter_get_by_name("abuffer"),
 			"in", args, NULL, graph);
 	}
@@ -863,7 +870,7 @@ int PluginFAClient::activate()
 		ret = av_opt_set_bin(fsink, "sample_fmts",
 			(uint8_t*)_fmt, sizeof(sample_fmt), AV_OPT_SEARCH_CHILDREN);
 	if( ret >= 0 )
-		ret = av_opt_set_bin(fsink, "channel_layouts",
+		ret = av_opt_set_bin(fsink, "channel_layout",
 			(uint8_t*), sizeof(layout), AV_OPT_SEARCH_CHILDREN);
 	if( ret >= 0 )
 		ret = av_opt_set_bin(fsink, "sample_rates",
@@ -990,10 +997,16 @@ int PluginFAClient::process_buffer(int64_t size, Samples **buffer, int64_t start
 	if( ret >= 0 ) {
 		in_channels = get_inchannels();
 		out_channels = get_outchannels();
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59,24,100)
+		AVChannelLayout in_ch_layout;
+		AVFilterContext *fctx = ffilt->fctx;
+		AVFilterLink **links = !fctx->nb_outputs ? 0 : fctx->outputs;
+		av_channel_layout_copy(_ch_layout, [0]->ch_layout);
+#endif
 		frame->nb_samples = size;
 		frame->format = AV_SAMPLE_FMT_FLTP;
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61,3,100)
-		frame->ch_layout.u.mask = (1<ch_layout, _ch_layout);
 #else
 		frame->channel_layout = (1<-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-18 Thread Andrew Randrianasulu via Cin
чт, 18 апр. 2024 г., 11:07 Andrea paz via Cin :

> @Andrew Randrianasulu
>
> Complete failure with ffmpeg audio filters.
> One premise, setting the audio driver to "pulse" the audio does not
> work. Setting it to "alsa" works normally. I do not have Pulseaudio in
> my system, but Pipewire takes pulse signals as if it were there. In
> ffmpeg6 I do not have this problem.
>
> None of the ffmpeg filters I have tried work.
> The typical error is as follows:
>
> PluginFAClient::activate: F_adynamicequalizer failed
>   err: Option not found
> PluginFAClient::process_buffer() F_adynamicequalizer
>   err: Operation not permitted
>
> The old CinGG with ffmpeg 6 works normally.
>
> LV2 and native filters work fine, of course.
>

Ahh, thanks! something still wrong then ... I'll look into this.



-- 
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-17 Thread Andrew Randrianasulu via Cin
ср, 17 апр. 2024 г., 17:08 Andrea paz :

> I am continuing to use the version compiled with ffmpeg7 and have
> found no bugs or other problems. Even the efficiency of playback and
> some rendering are comparable with the previous version. All OK, for
> me.
>


This is good news! I am a bit worried about ff_ audio plugins, especially
acting on few audio tracks at once. It will be amazing if you try few of
them on say mono/stereo sources to see if result still same as with ffmpeg
6.1

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] request for adding dependency

2024-04-15 Thread Andrew Randrianasulu via Cin
it was reported that without libxml-parser-perl in
blds/bld_prepare.sh {debian section} Debian bookworm build does not work


https://www.linux.org.ru/forum/multimedia/17019779?cid=17584121
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 api changes

2024-04-13 Thread Andrew Randrianasulu via Cin
On Sat, Apr 13, 2024 at 9:13 PM Andrew Randrianasulu <
randrianas...@gmail.com> wrote:

>
>
> сб, 13 апр. 2024 г., 21:04 Andrea paz :
>
>> Sometimes I think it is my old projects or even not my own that cause
>> some problems. For example to test ChromaKeyHSV I created my own
>> project, but I also used two projects of IgorV. I could never see
>> precise cause and effect though, so I'm not sure.
>>
>> Regarding AC3, there is a commit in Adam's repository about decoding
>> AC3, but I don't think it is related. Anyway, the link is this one:
>>
>> https://github.com/heroineworshiper/hvirtual/commit/3124ad744154eae8e48bdeff00d81d11613dc9a4
>
>
>
> yeah, looks like quicktime/ffmpeg interaction soecific to HV.
>
> Sorry, still stuck with this mysteriously non-working ac3 encoder 
>

I think I fixed it, can you try attached patch on top of all previous?
From f269904fef4aab0e66cdfde5518fe5636bd24a4f Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Sun, 14 Apr 2024 01:45:22 +0300
Subject: [PATCH 6/6] Fix fileac3 encoding with ffmpeg 7.0?

---
 cinelerra-5.1/cinelerra/fileac3.C | 25 +++--
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/fileac3.C b/cinelerra-5.1/cinelerra/fileac3.C
index 1f0083f0..63654f32 100644
--- a/cinelerra-5.1/cinelerra/fileac3.C
+++ b/cinelerra-5.1/cinelerra/fileac3.C
@@ -143,7 +143,9 @@ int FileAC3::open_file(int rd, int wr)
 			int sample_rate = asset->sample_rate;
 			int64_t layout = get_channel_layout(channels);
 			AVChannelLayout ch_layout;
-			av_channel_layout_from_mask(_layout, layout);
+			av_channel_layout_default(_layout, channels);
+			if(!ch_layout.nb_channels) {
+			printf ("av_ch_layut_default failed! \n"); }
 			int bitrate = asset->ac3_bitrate * 1000;
 			av_init_packet();
 			codec_context = avcodec_alloc_context3(codec);
@@ -151,18 +153,28 @@ int FileAC3::open_file(int rd, int wr)
 			codec_context->sample_rate = sample_rate;
 			codec_context->ch_layout.nb_channels = channels;
 			codec_context->ch_layout.u.mask = layout;
+			av_channel_layout_copy(_context->ch_layout, _layout);
 			codec_context->sample_fmt = codec->sample_fmts[0];
-			SwrContext *resample_context = NULL;
-			swr_alloc_set_opts2(_context,
+			SwrContext *tmp_resample_context = NULL;
+			int ret = swr_alloc_set_opts2(_resample_context,
 	_layout, codec_context->sample_fmt, sample_rate,
 	_layout, AV_SAMPLE_FMT_S16, sample_rate,
 	0, NULL);
-			swr_init(resample_context);
+			if(ret <0) printf("swr_alloc eror: %i \n", ret );
+			if(tmp_resample_context){
+			resample_context = tmp_resample_context;
+			if(swr_init(resample_context))
+			{
+eprintf(_("FileAC3::open_file failed to init swr.\n"));
+result = 1;
+			}
+			}
 			if(avcodec_open2(codec_context, codec, 0))
 			{
 eprintf(_("FileAC3::open_file failed to open codec.\n"));
 result = 1;
 			}
+			av_channel_layout_uninit(_layout);
 		}
 	}
 
@@ -317,8 +329,9 @@ int FileAC3::write_samples(double **buffer, int64_t len)
 		AVFrame *frame = av_frame_alloc();
 		frame->nb_samples = frame_size;
 		frame->format = avctx->sample_fmt;
-		frame->ch_layout.u.mask = avctx->ch_layout.u.mask;
+		av_channel_layout_copy(>ch_layout, >ch_layout);
 		frame->sample_rate = avctx->sample_rate;
+
 		ret = av_frame_get_buffer(frame, 0);
 		if( ret >= 0 ) {
 			const uint8_t *samples = (uint8_t *)temp_raw +
@@ -326,7 +339,7 @@ int FileAC3::write_samples(double **buffer, int64_t len)
 			ret = swr_convert(resample_context,
 (uint8_t **)frame->extended_data, frame_size,
 , frame_size);
-		}
+		} else { printf("fileAC3: av_frame_get_buffer failed!\n"); }
 		if( ret >= 0 ) {
 			frame->pts = avctx->sample_rate && avctx->time_base.num ?
 file->get_audio_position() : AV_NOPTS_VALUE ;
-- 
2.35.8

-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 api changes

2024-04-13 Thread Andrew Randrianasulu via Cin
сб, 13 апр. 2024 г., 21:04 Andrea paz :

> Sometimes I think it is my old projects or even not my own that cause
> some problems. For example to test ChromaKeyHSV I created my own
> project, but I also used two projects of IgorV. I could never see
> precise cause and effect though, so I'm not sure.
>
> Regarding AC3, there is a commit in Adam's repository about decoding
> AC3, but I don't think it is related. Anyway, the link is this one:
>
> https://github.com/heroineworshiper/hvirtual/commit/3124ad744154eae8e48bdeff00d81d11613dc9a4



yeah, looks like quicktime/ffmpeg interaction soecific to HV.

Sorry, still stuck with this mysteriously non-working ac3 encoder 

>
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 api changes

2024-04-07 Thread Andrew Randrianasulu via Cin
On Sun, Apr 7, 2024 at 9:34 PM Phyllis Smith 
wrote:

> Andrea, oops, I guess I had better try another video as BD Render did not
> crash for me, but I always use the same small file with only 2 channels.
> Your terminal output looks correct though!  More testing !!  Phyllis
>

for fileac3.C I tried to add line

av_channel_layout_copy(_context->ch_layout, _la
yout);

in FileAC3::open_file(int rd, int wr) function, so it reads

 av_channel_layout_copy(_context->ch_layout, _la
yout);
codec_context->sample_fmt = codec->sample_fmts[0];
SwrContext *resample_context = NULL;
swr_alloc_set_opts2(_context,

but this does not lead to ac3 working. I'll try to ask on libav maillist


>
> On Sun, Apr 7, 2024 at 12:28 PM Andrea paz 
> wrote:
>
>> Compilation with all the patches went well. I loaded a m2ts file with
>> many audio channels and tried (from root) to do a BD render. I left
>> all settings at default. At the end of the render I got a crash (no
>> dump).
>> In the terminal I have these lines:
>>
>>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 api changes

2024-04-07 Thread Andrew Randrianasulu via Cin
вс, 7 апр. 2024 г., 19:12 Phyllis Smith :

> I attached ffmpeg-7.0.patch0, but maybe we do not need anymore?? Andrew??
>


yes, patch0 was for termux, but I just added ffmpeg configure option into
termux.bld so patch is not needed anymore ...


bigger problem I can't make ac3 encoding to work, it does not crash but
file is empty. And copying context by specialized av_  function just
crashes it. So I am a bit stuck on this one.

>
> > Ah, even if most patches apart from 3, 4 and D still apply encoding is
>>> busted :/
>>> I have tried three encodings and they work normally (h265-Hi;
>>> DNxHR-HQX and AV1.svt).
>>>
>>
>>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 api changes

2024-04-07 Thread Andrew Randrianasulu via Cin
On Sun, Apr 7, 2024 at 5:38 PM Andrea paz 
wrote:

> >> I tried to cp thirdparty/src/ffmpeg-6.1.patch10 as ffmpeg-7.0.patch10
> and compilation currently  progressed beyond this error.
> Success! Thank you very much, Andrew.
>
> I saw that in this edition there are few filters. In CinGG there is
> only "tiltandshift" filter; it does not give error but it does not
> work. In the terminal I have only the message:
>
> "resource temporarily unavaible"
>
> Of the other filters, there is no trace. These are:
>
> aap
> qrencode
> quirc
> fsync
> showinfo bitstream
> dnn
>
> > Ah, even if most patches apart from 3, 4 and D still apply encoding is
> busted :/
> I have tried three encodings and they work normally (h265-Hi;
> DNxHR-HQX and AV1.svt).
>

I tried default ffmpeg  mp4 profile and it was giving me errors ...

But I think I fixed it, see last patch in attached git series (modelled
after ffmpeg-7.0/doc/examples/transcode_aac.c)

not sure about ac3 encoding and bdwrite yet ...
From 92de3d25efb24607c3760da9a4aa84b07e23338b Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Sat, 6 Apr 2024 13:18:11 +0300
Subject: [PATCH 1/5] Adapt to ffmpeg 7.0, drop ffmpeg pre 5.1 support

---
 cinelerra-5.1/cinelerra/bdwrite.C   |  2 +-
 cinelerra-5.1/cinelerra/ffmpeg.C| 56 -
 cinelerra-5.1/cinelerra/fileac3.C   | 15 ---
 cinelerra-5.1/cinelerra/fileffmpeg.C|  2 +-
 cinelerra-5.1/cinelerra/pluginfclient.C | 14 ---
 5 files changed, 56 insertions(+), 33 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/bdwrite.C b/cinelerra-5.1/cinelerra/bdwrite.C
index 1b864bb9..1f7f027e 100644
--- a/cinelerra-5.1/cinelerra/bdwrite.C
+++ b/cinelerra-5.1/cinelerra/bdwrite.C
@@ -2675,7 +2675,7 @@ int media_info::scan()
   break; }
 case AVMEDIA_TYPE_AUDIO: {
   s->coding_type = bd_coding_type(codec_id);
-  s->format = bd_audio_format(st->codecpar->channels);
+  s->format = bd_audio_format(st->codecpar->ch_layout.nb_channels);
   s->rate = bd_audio_rate(st->codecpar->sample_rate);
   strcpy((char*)s->lang, "eng");
   break; }
diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C
index 8c753a35..e0e9bf62 100644
--- a/cinelerra-5.1/cinelerra/ffmpeg.C
+++ b/cinelerra-5.1/cinelerra/ffmpeg.C
@@ -880,13 +880,17 @@ void FFAudioStream::init_swr(int ichs, int ifmt, int irate)
 	swr_ichs = ichs;  swr_ifmt = ifmt;  swr_irate = irate;
 	if( ichs == channels && ifmt == AV_SAMPLE_FMT_FLT && irate == sample_rate )
 		return;
-	uint64_t ilayout = av_get_default_channel_layout(ichs);
-	if( !ilayout ) ilayout = ((uint64_t)1<= AV_VERSION_INT(61,3,100)
+	reserve(len+1, st->codecpar->ch_layout.nb_channels);
+#else
 	reserve(len+1, st->codecpar->channels);
+#endif
 	for( int ch=0; chnb_samples = frame_sz;
 	frame->format = avctx->sample_fmt;
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61,3,100)
+	frame->ch_layout.u.mask = avctx->ch_layout.u.mask;
+#else
 	frame->channel_layout = avctx->channel_layout;
+#endif
 	frame->sample_rate = avctx->sample_rate;
 	int ret = av_frame_get_buffer(frame, 0);
 	if (ret < 0)
@@ -1004,7 +1016,7 @@ int FFAudioStream::load(int64_t pos, int len)
 	while( ret>=0 && !flushed && curr_pos=0 ) {
 		ret = read_frame(frame);
 		if( ret > 0 && frame->nb_samples > 0 ) {
-			init_swr(frame->channels, frame->format, frame->sample_rate);
+			init_swr(frame->ch_layout.nb_channels, frame->format, frame->sample_rate);
 			load_history(>extended_data[0], frame->nb_samples);
 			curr_pos += frame->nb_samples;
 		}
@@ -2780,14 +2792,14 @@ int FFMPEG::open_decoder()
 			ret = vid->create_filter(opt_video_filter);
 			break; }
 		case AVMEDIA_TYPE_AUDIO: {
-			if( avpar->channels < 1 ) continue;
+			if( avpar->ch_layout.nb_channels < 1 ) continue;
 			if( avpar->sample_rate < 1 ) continue;
 			has_audio = 1;
 			int aidx = ffaudio.size();
 			FFAudioStream *aud = new FFAudioStream(this, st, aidx, i);
 			ffaudio.append(aud);
 			aud->channel0 = astrm_index.size();
-			aud->channels = avpar->channels;
+			aud->channels = avpar->ch_layout.nb_channels;
 			for( int ch=0; chchannels; ++ch )
 astrm_index.append(ffidx(aidx, ch));
 			aud->sample_rate = avpar->sample_rate;
@@ -2943,10 +2955,12 @@ int FFMPEG::open_encoder(const char *type, const char *spec)
 			FFAudioStream *aud = new FFAudioStream(this, st, aidx, fidx);
 			aud->avctx = ctx;  ffaudio.append(aud);  fst = aud;
 			aud->sample_rate = asset->sample_rate;
-			ctx->channels = aud->channels = asset->channels;
+			ctx->ch_layout.nb_channels = aud->channels = asset->channels;
 			for( int ch=0; chchannels; ++ch )
 astrm_index.append(ffidx(aidx,

Re: [Cin] ffmpeg 7.0 api changes

2024-04-07 Thread Andrew Randrianasulu via Cin
вс, 7 апр. 2024 г., 16:45 Andrew Randrianasulu :

>
>
> вс, 7 апр. 2024 г., 16:41 Andrea paz :
>
>> > you mean
>> > echo "system_libs += -L/usr/pkg/lib/ffmpeg6"
>> > echo "CFLAGS += -I/usr/pkg/include/ffmpeg6"
>> > ?
>> > those are for NetBSD 
>> >
>> Yes, I meant those. didn't know they were for BSD.
>> In the log it talks about a cuda error; maybe it tries to activate
>> even on my system that doesn't have cuda?
>>
>
> I think this more related to our version of nv headers ...
>
> I tried to cp thirdparty/src/ffmpeg-6.1.patch10 as ffmpeg-7.0.patch10 and
> compilation currently  progressed beyond this error.
>


Ah, even if most patches apart from 3, 4 and D still apply encoding is
busted :/

so more work needed 

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 api changes

2024-04-07 Thread Andrew Randrianasulu via Cin
вс, 7 апр. 2024 г., 16:41 Andrea paz :

> > you mean
> > echo "system_libs += -L/usr/pkg/lib/ffmpeg6"
> > echo "CFLAGS += -I/usr/pkg/include/ffmpeg6"
> > ?
> > those are for NetBSD 
> >
> Yes, I meant those. didn't know they were for BSD.
> In the log it talks about a cuda error; maybe it tries to activate
> even on my system that doesn't have cuda?
>

I think this more related to our version of nv headers ...

I tried to cp thirdparty/src/ffmpeg-6.1.patch10 as ffmpeg-7.0.patch10 and
compilation currently  progressed beyond this error.

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 api changes

2024-04-07 Thread Andrew Randrianasulu via Cin
вс, 7 апр. 2024 г., 16:02 Andrea paz :

> Compilation does not work. I attach the cin5.log
>
> In configure.ac I changed the entry:
> ffmpeg-6.1 to ffmpeg-7.0
> However, I left two entries unchanged
> ffmpeg6
> because in my system I still don't have ffmpeg7.
> Should I also change these two entries to ffmpeg7?
>

you mean

echo "system_libs += -L/usr/pkg/lib/ffmpeg6"
echo "CFLAGS += -I/usr/pkg/include/ffmpeg6"

?

those are for NetBSD 

I am compiling on desktop machine right now, may be I forgot to make some
changes so it only worked in termux 
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 api changes

2024-04-07 Thread Andrew Randrianasulu via Cin
вс, 7 апр. 2024 г., 14:09 Andrea paz :

> How to compile CinGG with ffmpeg7?
> Should I remove ffmpeg5.1 and ffmpeg6.1 and all their patches and then
> add the tarball of ffmpeg7 plus your new patch?
>


I just put ffmpeg 7.0 tar.xz into thirdparty/src then changed configure.ac
so it refers to ffmpeg 7.0 instead of 6.1

then run ./autogen.sh  configure make as usual. Nothing was deleted. (but
then I haven't tried to port our patches yet ). Patch is git patch to apply
to  cinelerra sources, (git am/git apply) not patch to put in thirdparty/src

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ChomaKey's old bug

2024-04-06 Thread Andrew Randrianasulu via Cin
вс, 7 апр. 2024 г., 00:19 Andrea paz via Cin :

> In an exchange of mails Igor Vladimirsky pointed out to me that the
> old bug reported by Camille:
>
> https://lists.cinelerra-gg.org/pipermail/cin/2021-March/003149.html
> and:
> https://www.cinelerra-gg.org/bugtracker/view.php?id=559
>
> Has been fixed by Adam in CinHV. The patch with the fix is at:
>
>
> https://github.com/heroineworshiper/hvirtual/commit/9080ca3fc952edce68fcabb6d7460dda7c75da79
>
> Andrew, do you think it is possible to implement the patch in CinGG?
>


may be? I hope it just self-contained in plugins/dissolve ... will try to
copy/pasta  changes from this commit  tomorrow when I power up desktop


-- 
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 api changes

2024-04-06 Thread Andrew Randrianasulu via Cin
сб, 6 апр. 2024 г., 01:16 Andrew Randrianasulu :

> so I was using this  patch as guidance
>
>
> https://github.com/HandBrake/HandBrake/pull/4451/commits/5e86b74d405f63ed020fa09eb076a65b7337bd4e
>
> apparently channels was replaced by ch_layout.nb_channels
>
> and channel_layout
> by ch_layout.u.mask
>
> I'll try to put ifdef guards around those changes and make some patches ...
>


It compiles :)

but not sure if it actually works ..

note, it should compile even with our ffmpeg 6.1 , I hope? because api
change was for 5.1, 7.0 just removed it as "long deprecated" .

>
From ad9d27735686b5aa4256f0a46c338559337fa98a Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Sat, 6 Apr 2024 13:18:11 +0300
Subject: [PATCH] Adapt to ffmpeg 7.0, drop ffmpeg pre 5.1 support

---
 cinelerra-5.1/cinelerra/bdwrite.C   |  2 +-
 cinelerra-5.1/cinelerra/ffmpeg.C| 56 -
 cinelerra-5.1/cinelerra/fileac3.C   | 15 ---
 cinelerra-5.1/cinelerra/fileffmpeg.C|  2 +-
 cinelerra-5.1/cinelerra/pluginfclient.C | 14 ---
 5 files changed, 56 insertions(+), 33 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/bdwrite.C b/cinelerra-5.1/cinelerra/bdwrite.C
index 1b864bb9..1f7f027e 100644
--- a/cinelerra-5.1/cinelerra/bdwrite.C
+++ b/cinelerra-5.1/cinelerra/bdwrite.C
@@ -2675,7 +2675,7 @@ int media_info::scan()
   break; }
 case AVMEDIA_TYPE_AUDIO: {
   s->coding_type = bd_coding_type(codec_id);
-  s->format = bd_audio_format(st->codecpar->channels);
+  s->format = bd_audio_format(st->codecpar->ch_layout.nb_channels);
   s->rate = bd_audio_rate(st->codecpar->sample_rate);
   strcpy((char*)s->lang, "eng");
   break; }
diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C
index bee5c690..8d9a762a 100644
--- a/cinelerra-5.1/cinelerra/ffmpeg.C
+++ b/cinelerra-5.1/cinelerra/ffmpeg.C
@@ -880,13 +880,17 @@ void FFAudioStream::init_swr(int ichs, int ifmt, int irate)
 	swr_ichs = ichs;  swr_ifmt = ifmt;  swr_irate = irate;
 	if( ichs == channels && ifmt == AV_SAMPLE_FMT_FLT && irate == sample_rate )
 		return;
-	uint64_t ilayout = av_get_default_channel_layout(ichs);
-	if( !ilayout ) ilayout = ((uint64_t)1<= AV_VERSION_INT(61,3,100)
+	reserve(len+1, st->codecpar->ch_layout.nb_channels);
+#else
 	reserve(len+1, st->codecpar->channels);
+#endif
 	for( int ch=0; chnb_samples = frame_sz;
 	frame->format = avctx->sample_fmt;
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61,3,100)
+	frame->ch_layout.u.mask = avctx->ch_layout.u.mask;
+#else
 	frame->channel_layout = avctx->channel_layout;
+#endif
 	frame->sample_rate = avctx->sample_rate;
 	int ret = av_frame_get_buffer(frame, 0);
 	if (ret < 0)
@@ -1004,7 +1016,7 @@ int FFAudioStream::load(int64_t pos, int len)
 	while( ret>=0 && !flushed && curr_pos=0 ) {
 		ret = read_frame(frame);
 		if( ret > 0 && frame->nb_samples > 0 ) {
-			init_swr(frame->channels, frame->format, frame->sample_rate);
+			init_swr(frame->ch_layout.nb_channels, frame->format, frame->sample_rate);
 			load_history(>extended_data[0], frame->nb_samples);
 			curr_pos += frame->nb_samples;
 		}
@@ -2780,14 +2792,14 @@ int FFMPEG::open_decoder()
 			ret = vid->create_filter(opt_video_filter);
 			break; }
 		case AVMEDIA_TYPE_AUDIO: {
-			if( avpar->channels < 1 ) continue;
+			if( avpar->ch_layout.nb_channels < 1 ) continue;
 			if( avpar->sample_rate < 1 ) continue;
 			has_audio = 1;
 			int aidx = ffaudio.size();
 			FFAudioStream *aud = new FFAudioStream(this, st, aidx, i);
 			ffaudio.append(aud);
 			aud->channel0 = astrm_index.size();
-			aud->channels = avpar->channels;
+			aud->channels = avpar->ch_layout.nb_channels;
 			for( int ch=0; chchannels; ++ch )
 astrm_index.append(ffidx(aidx, ch));
 			aud->sample_rate = avpar->sample_rate;
@@ -2943,10 +2955,12 @@ int FFMPEG::open_encoder(const char *type, const char *spec)
 			FFAudioStream *aud = new FFAudioStream(this, st, aidx, fidx);
 			aud->avctx = ctx;  ffaudio.append(aud);  fst = aud;
 			aud->sample_rate = asset->sample_rate;
-			ctx->channels = aud->channels = asset->channels;
+			ctx->ch_layout.nb_channels = aud->channels = asset->channels;
 			for( int ch=0; chchannels; ++ch )
 astrm_index.append(ffidx(aidx, ch));
-			ctx->channel_layout =  av_get_default_channel_layout(ctx->channels);
+			AVChannelLayout ch_layout;
+			av_channel_layout_default(_layout, ctx->ch_layout.nb_channels);
+			ctx->ch_layout.u.mask =  ch_layout.u.mask;
 			ctx->sample_rate = check_sample_rate(codec, asset->sample_rate);
 			if( !ctx->sample_rate ) {
 eprintf(_("check_sample_rate failed %s\n"), filename);
@@ -2958,10 +2972,12 @@ int FFMPEG::open_encode

[Cin] ffmpeg 7.0 api changes

2024-04-05 Thread Andrew Randrianasulu via Cin
so I was using this  patch as guidance

https://github.com/HandBrake/HandBrake/pull/4451/commits/5e86b74d405f63ed020fa09eb076a65b7337bd4e

apparently channels was replaced by ch_layout.nb_channels

and channel_layout
by ch_layout.u.mask

I'll try to put ifdef guards around those changes and make some patches ...
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-05 Thread Andrew Randrianasulu via Cin
пт, 5 апр. 2024 г., 21:58 Andrew Randrianasulu :

>
>
> пт, 29 мар. 2024 г., 16:29 Terje J. Hanssen via Cin <
> cin@lists.cinelerra-gg.org>:
>
>> Good to see DVD is not quite dead yet. I have worked a lot the last
>> months with ffmpeg 6.1 to make various DVD and Blu-ray discs.
>>
>> Terje
>>
>>
>> tor. 28. mars 2024, 05:17 skrev Andrew Randrianasulu via Cin <
>> cin@lists.cinelerra-gg.org>:
>>
>>> It already branched
>>>
>>> changelog says:
>>>
>>> version 7.0:
>>> - DXV DXT1 encoder
>>> - LEAD MCMP decoder
>>> - EVC decoding using external library libxevd- EVC
>>> encoding using external library libxeve
>>> - QOA decoder and demuxer
>>> - aap filter
>>> - demuxing, decoding, filtering, encoding, and muxing
>>> in the ffmpeg CLI now all run in parallel-
>>> enable gdigrab device to grab a window using the hwnd=HANDLER syntax
>>> - IAMF raw demuxer and muxer  -
>>> D3D12VA hardware accelerated H264, HEVC, VP9, AV1, MPEG-2 and VC1 decoding
>>>
>>>  - tiltandshift filter
>>> - qrencode filter and qrencodesrc source
>>> - quirc filter
>>> - lavu/eval: introduce randomi() function in expressions
>>> - VVC decoder
>>> - fsync filter
>>> - Raw Captions with Time (RCWT) closed caption muxer
>>> - ffmpeg CLI -bsf option may now be used for input as well as output
>>> - ffmpeg CLI options may now be used as -/opt , which is equivalent
>>>   to -opt >
>>> - showinfo bitstream filter
>>> - *a C11-compliant compiler is now required; note that this requirement*
>>> *  will be bumped to C17 in the near future, so consider updating your*
>>> *  build environment if it lacks C17 support*
>>> - Change the default bitrate control method from VBR to CQP for QSV
>>> encoders.
>>> - removed deprecated ffmpeg CLI options -psnr and -map_channel
>>> - DVD-Video demuxer, powered by libdvdnav and libdvdread
>>> - ffprobe -show_stream_groups option
>>> - ffprobe (with -export_side_data film_grain) now prints film grain
>>> metadata
>>> - AEA muxer
>>> - ffmpeg CLI loopback decoders
>>> - Support PacketTypeMetadata of PacketType in enhanced flv format
>>> - ffplay with hwaccel decoding support (depends on vulkan renderer via
>>> libplacebo)
>>> - dnn filter libtorch backend
>>> - Android content URIs protocol
>>>
>>> 
>>>
>>> I also smell  more breakage :)
>>>
>>> not sure if I want/will able to catch up with them, may be we should
>>> stick to some branch instead of chasing latest.
>>>
>>
>
> out !
>
> https://ffmpeg.org//download.html#release_7.0
>

and new channel api bites us even w/o any cingg specific patches:


pluginfclient.C:456:7: error: use of undeclared identifier
'AV_OPT_TYPE_CHANNEL_LAYOUT'; did you mean 'AV_OPT_TYPE_CHLAYOUT'?

pluginfclient.C:670:6: error: use of undeclared identifier
'avfilter_pad_count'pluginfclient.C:678:6: error: use
of undeclared identifier 'avfilter_pad_count'
pluginfclient.C:690:6: error: use of undeclared identifier
'avfilter_pad_count'pluginfclient.C:698:6: error: use
of undeclared identifier 'avfilter_pad_count'
pluginfclient.C:995:10: error: no member named 'channel_layout' in
'AVFrame'   fileffmpeg.C:1496:7: error: use of
undeclared identifier 'AV_OPT_TYPE_CHANNEL_LAYOUT'; did you mean
'AV_OPT_TYPE_CHLAYOUT'?

ffmpeg.C:883:21: error: use of undeclared identifier
'av_get_default_channel_layout'   ffmpeg.C:885:21: error: use
of undeclared identifier 'av_get_default_channel_layout'
 ffmpeg.C:887:21: error: use of undeclared identifier 'swr_alloc_set_opts';
did you mean 'swr_alloc_set_opts2'?

ffmpeg.C:888:3: error: cannot initialize a parameter of type 'const
AVChannelLayout *' with an lvalue of type 'uint64_t' (aka 'unsigned long')

ffmpeg.C:966:31: error: no member named 'channels' in 'AVCodecParameters'

ffmpeg.C:986:9: error: no member named 'channel_layout' in 'AVFrame'
   ffmpeg.C:986:33: error: no member named
'channel_layout' in 'AVCodecContext'
 ffmpeg.C:1007:20: error: no member named 'channels' in 'AVFrame'
 ffmpeg.C:2783:15: error: no member named
'channels' in 'AVCodecParameters' ffmpeg.C:2790:27:
error: no member named 'channels' in 'AVCodecParameters'
 ffmpeg.C:2946:9: error: no member named 'channel

Re: [Cin] ffmpeg 7.0 soon to be released

2024-04-05 Thread Andrew Randrianasulu via Cin
пт, 29 мар. 2024 г., 16:29 Terje J. Hanssen via Cin <
cin@lists.cinelerra-gg.org>:

> Good to see DVD is not quite dead yet. I have worked a lot the last months
> with ffmpeg 6.1 to make various DVD and Blu-ray discs.
>
> Terje
>
>
> tor. 28. mars 2024, 05:17 skrev Andrew Randrianasulu via Cin <
> cin@lists.cinelerra-gg.org>:
>
>> It already branched
>>
>> changelog says:
>>
>> version 7.0:
>> - DXV DXT1 encoder
>> - LEAD MCMP decoder
>> - EVC decoding using external library libxevd- EVC
>> encoding using external library libxeve
>> - QOA decoder and demuxer
>> - aap filter
>>   - demuxing, decoding, filtering, encoding, and muxing in
>> the ffmpeg CLI now all run in parallel- enable
>> gdigrab device to grab a window using the hwnd=HANDLER syntax
>> - IAMF raw demuxer and muxer  -
>> D3D12VA hardware accelerated H264, HEVC, VP9, AV1, MPEG-2 and VC1 decoding
>>
>>  - tiltandshift filter
>>   - qrencode filter and qrencodesrc source
>> - quirc filter
>>   - lavu/eval: introduce randomi() function in expressions
>> - VVC decoder
>> - fsync filter
>> - Raw Captions with Time (RCWT) closed caption muxer
>> - ffmpeg CLI -bsf option may now be used for input as well as output
>> - ffmpeg CLI options may now be used as -/opt , which is equivalent
>>   to -opt >
>> - showinfo bitstream filter
>> - *a C11-compliant compiler is now required; note that this requirement*
>> *  will be bumped to C17 in the near future, so consider updating your*
>> *  build environment if it lacks C17 support*
>> - Change the default bitrate control method from VBR to CQP for QSV
>> encoders.
>> - removed deprecated ffmpeg CLI options -psnr and -map_channel
>> - DVD-Video demuxer, powered by libdvdnav and libdvdread
>> - ffprobe -show_stream_groups option
>> - ffprobe (with -export_side_data film_grain) now prints film grain
>> metadata
>> - AEA muxer
>> - ffmpeg CLI loopback decoders
>> - Support PacketTypeMetadata of PacketType in enhanced flv format
>> - ffplay with hwaccel decoding support (depends on vulkan renderer via
>> libplacebo)
>> - dnn filter libtorch backend
>> - Android content URIs protocol
>>
>> 
>>
>> I also smell  more breakage :)
>>
>> not sure if I want/will able to catch up with them, may be we should
>> stick to some branch instead of chasing latest.
>>
>

out !

https://ffmpeg.org//download.html#release_7.0



>>
>>
>> --
>> Cin mailing list
>> Cin@lists.cinelerra-gg.org
>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] The Lady

2024-04-04 Thread Andrew Randrianasulu via Cin
чт, 4 апр. 2024 г., 10:21 Andrea paz via Cin :

> Curious news:
>
> https://arstechnica.com/information-technology/2024/03/playboy-image-from-1972-gets-ban-from-ieee-computer-journals/
>
> We used the Lady in the OpenCV filter section of the manual.
>

Interesting bit of news. (I already knew part of this story, but only
part). I think in our case we can leave decision about what to do to
Phyllis, who was working without any fanfares on this project for like, 8
years at least? I think actual day to day practice is more important than
one-time mostly symbolic gesture, in general. But one truely important
ongoing expirience here for me actually about trying to do something in
more collective setting.



-- 
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] BlueBanana and alpha slider

2024-04-01 Thread Andrew Randrianasulu via Cin
пн, 1 апр. 2024 г., 12:59 Igor BEGHETTO via Cin :

> What I know, "alpha" slider works with both "Filter Active" and "Mask
> Selection" checkboxes checked.
> The "Filter Active" checkbox enables the options: red, green, blue, hue,
> saturation, value, fade, *alpha*.
> If "Mask Selection" is not checked "alpha" will not work.
>

yeah, it seems that "end selection" also must be disabled for this to work
. strange. Need to read documentation :)



> Take a look at the video "Cin_BluBanana-alpha", please:
> https://files.fm/u/d3t4uf3kyc
>
> IgorBeg
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] BlueBanana and alpha slider

2024-04-01 Thread Andrew Randrianasulu via Cin
пн, 1 апр. 2024 г., 12:17 Andrea paz :

> In other emails, Igor Vladimirsky identified the commit after which
> the alpha slider is no longer functional:
>
> https://git.cinelerra-gg.org/git/?p=goodguy/history.git;a=commit;h=259e435484d99cf6517290f530ac2d9d0d86cd16
> If anyone can figure out where the problem lies, they are welcome.
>
> Perhaps in bluebanacolor.c, the line:
>
> float a = 1.f - *S*F;
>
> Which became:
>
> float a = *S*F;
>
> ?
>

I tried to reset this specific file back to git baseline (git checkout
path/bluebananacolor.c ) and problem was still here ...

So, I guess it was big if {} block in bluebananaengine.c

(tried to put some printks there and code execution apparently hit  this
region of code)

>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] BlueBanana and alpha slider

2024-03-30 Thread Andrew Randrianasulu via Cin
On Sat, Mar 30, 2024 at 11:29 AM Andrew Randrianasulu <
randrianas...@gmail.com> wrote:

> IgorV noticed that alpha slider does not appear to work in bluebanana
> since ~april 2017 (?)
>
> I do not have specific files, I just tried to  put jpeg wallpaper  on
> track above video, add BB plugin to track with wallpaper.jpg, and colorpick
> some color there (so selectin will be visible)
>
> sadly moving alpha slider from 100  to 0 in BlueBanana  does not have any
> effect on image in compositor?
>
> tried rgba-8, rgba-float, yuva8 (also plain x11 and opengl x11, with and
> w/o direct method).
>
>
> https://git.cinelerra-gg.org/git/?p=goodguy/history.git;a=history;f=cinelerra-5.1/plugins/bluebanana;hb=HEAD
>
> I do not have pkg from that earlier era, but I'll try to compile sources
> on earlier system snapshot. Might take some time ...
>


I tried to bisect and result was

 git bisect log
git bisect start
# bad: [28600526f736ffd4f104f29495a4bb36497e1ea8] colorpicker cleanup, make
ffmpeg probes early default
git bisect bad 28600526f736ffd4f104f29495a4bb36497e1ea8
# good: [f110e7626d433b4724befe0871a3a35f9f81f264] smooth lines, motion51,
opengl pbuffer bit typo, misc fixes
git bisect good f110e7626d433b4724befe0871a3a35f9f81f264
# good: [e55a625a562bc3ad94deb8008c7ede2bf1768daa] version update
git bisect good e55a625a562bc3ad94deb8008c7ede2bf1768daa
# good: [efa5246e9610548448a6e4d505fdc6bdb5da84eb] enable titler stroker,
rework xlat.sh, disable latex in theora build
git bisect good efa5246e9610548448a6e4d505fdc6bdb5da84eb
# bad: [259e435484d99cf6517290f530ac2d9d0d86cd16] bluebanana fixes and
enhancements
git bisect bad 259e435484d99cf6517290f530ac2d9d0d86cd16
# good: [0cfa31eba0eb21ebc44f42c7ac4bf30b6a7dcfa6] igor ru.po
git bisect good 0cfa31eba0eb21ebc44f42c7ac4bf30b6a7dcfa6
# good: [2494b3319c6ee70279cfe031e110639be3fc2094] version update,
features5 docs
git bisect good 2494b3319c6ee70279cfe031e110639be3fc2094
# first bad commit: [259e435484d99cf6517290f530ac2d9d0d86cd16] bluebanana
fixes and enhancements

using attached project file

Note git log relative to
http://git.cinelerra-gg.org/git/?p=goodguy/history.git;a=summary






































































































































-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] BlueBanana and alpha slider

2024-03-30 Thread Andrew Randrianasulu via Cin
IgorV noticed that alpha slider does not appear to work in bluebanana since
~april 2017 (?)

I do not have specific files, I just tried to  put jpeg wallpaper  on track
above video, add BB plugin to track with wallpaper.jpg, and colorpick some
color there (so selectin will be visible)

sadly moving alpha slider from 100  to 0 in BlueBanana  does not have any
effect on image in compositor?

tried rgba-8, rgba-float, yuva8 (also plain x11 and opengl x11, with and
w/o direct method).

https://git.cinelerra-gg.org/git/?p=goodguy/history.git;a=history;f=cinelerra-5.1/plugins/bluebanana;hb=HEAD

I do not have pkg from that earlier era, but I'll try to compile sources
on earlier system snapshot. Might take some time ...
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Vectras VM

2024-03-29 Thread Andrew Randrianasulu via Cin
пт, 29 мар. 2024 г., 23:58 Andrea paz via Cin :

> This looks more interesting than termux, but I guess it takes Android
> tablets with better hardware:
> https://vectras.netlify.app/


well, I already have qemu, Bochs and 86box for x86 emulation . termux
tries to minimize installed os size by reusing some android libs. So,
natively it only can run binaries compiled for same architecture as
processor. but you can run qemu and other full system emulators in it 



> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] ffmpeg 7.0 soon to be released

2024-03-27 Thread Andrew Randrianasulu via Cin
It already branched

changelog says:

version 7.0:
- DXV DXT1 encoder
- LEAD MCMP decoder
  - EVC decoding using external library libxevd- EVC
encoding using external library libxeve
- QOA decoder and demuxer
- aap filter
- demuxing, decoding, filtering, encoding, and muxing in
the ffmpeg CLI now all run in parallel- enable
gdigrab device to grab a window using the hwnd=HANDLER syntax
- IAMF raw demuxer and muxer  -
D3D12VA hardware accelerated H264, HEVC, VP9, AV1, MPEG-2 and VC1 decoding

 - tiltandshift filter
- qrencode filter and qrencodesrc source
- quirc filter
- lavu/eval: introduce randomi() function in expressions
- VVC decoder
- fsync filter
- Raw Captions with Time (RCWT) closed caption muxer
- ffmpeg CLI -bsf option may now be used for input as well as output
- ffmpeg CLI options may now be used as -/opt , which is equivalent
  to -opt >
- showinfo bitstream filter
- *a C11-compliant compiler is now required; note that this requirement*
*  will be bumped to C17 in the near future, so consider updating your*
*  build environment if it lacks C17 support*
- Change the default bitrate control method from VBR to CQP for QSV
encoders.
- removed deprecated ffmpeg CLI options -psnr and -map_channel
- DVD-Video demuxer, powered by libdvdnav and libdvdread
- ffprobe -show_stream_groups option
- ffprobe (with -export_side_data film_grain) now prints film grain metadata
- AEA muxer
- ffmpeg CLI loopback decoders
- Support PacketTypeMetadata of PacketType in enhanced flv format
- ffplay with hwaccel decoding support (depends on vulkan renderer via
libplacebo)
- dnn filter libtorch backend
- Android content URIs protocol



I also smell  more breakage :)

not sure if I want/will able to catch up with them, may be we should stick
to some branch instead of chasing latest.
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Question from the forum

2024-03-11 Thread Andrew Randrianasulu via Cin
пн, 11 мар. 2024 г., 21:45 Andrea paz via Cin :

> An interesting question from the forum:
>
> https://www.cinelerra-gg.org/forum/everything-else/how-to-automate-the-cutting-of-a-project-by-timecode/#post-2700
> Do you think it is possible to build a script that teaches how to make
> automatic cuts in CinGG?
>



I think this is similar to using externally-produced EDL, but sadly I have
no solution to this ...


> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] removing letter boxing while preserving aspect

2024-03-08 Thread Andrew Randrianasulu via Cin
пт, 8 мар. 2024 г., 20:01 Phyllis Smith via Cin :

> Updated the Manual and checked into GIT, this Tip section after reviewing,
> testing the steps, and minor punctuation changes.   I apologize if I do not
> put the entire "Credits" personnel into the git line, but Andrea adds all
> of the Latex to get it to format correctly and saves me from having to do
> that (which I dislike doing).  Thank you everyone who contributed to
> various ways to remove bands while preserving aspect ratio.
>

Thanks! I wish to have upbeat 'infinity' (8) day of March!

>
> On Wed, Mar 6, 2024 at 5:35 AM Andrea paz via Cin <
> cin@lists.cinelerra-gg.org> wrote:
>
>> I have added the tip to the manual; see if it is okay.
>>
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] New Opus audio codec

2024-03-04 Thread Andrew Randrianasulu via Cin
On Mon, Mar 4, 2024 at 10:49 PM Andrea paz via Cin <
cin@lists.cinelerra-gg.org> wrote:

> AVX2 and Machine Learning in the new release of Opus audio codec:
> https://opus-codec.org/


"Deep learning also often gets associated with powerful GPUs, but in Opus,
we have optimized everything such that it easily runs on most CPUs,
including phones. We have been careful to avoid huge models (unlike LLMs
with their hundreds of billions of parameters!). In the end, most users
should not notice the extra cost, but people using older (5+ years) phones
or microcontrollers might. For that reason, all new ML-based features are
disabled by default in Opus 1.5. They require both a compile-time switch
(for size reasons) and then a run-time switch (for CPU reasons)."

https://opus-codec.org/demo/opus-1.5/

Because I think we use it via libavcodec may be  we  should wait before
relevant switch appear there ?



>
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] ot: intel_pstate

2024-03-01 Thread Andrew Randrianasulu via Cin
My laptop was making noises under load, and sadly trayfreq was unable to
set cpu frequency for some reason. I poked around /sys and found
intel_pstate driver can be configured this way:

echo 25 > /sys/devices/system/cpu/intel_pstate/max_perf_pct

this sets max frequency to 800 mhz instead of 2.5/3.0 ghz as usual.

note that 25 is percentage, and on different core iXXX processors results
can be different.

inxi
CPU: dual core Intel Core i5-2450M (-MT MCP-) speed/min/max: 798/800/3100
MHz  Kernel: 5.6.14-x64 x86_64 Up: 27d 14m
Mem: 2453.5/5887.8 MiB (41.7%)   Storage:
610.63 GiB (76.4% used) Procs: 227 Shell: Bash inxi: 3.3.12

I hope this might help Phyllis with her overheating intel laptop .
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] New release update

2024-02-29 Thread Andrew Randrianasulu via Cin
чт, 29 февр. 2024 г., 22:53 Phyllis Smith via Cin <
cin@lists.cinelerra-gg.org>:

> We have a new release of AppImages for February 29th with only very minor
> changes but was necessary to fix Color 3 Way plugin since that is often
> used.  There are also Manual changes and the excellent Anamorphic.pdf file
> that Andrea created -- this was hours and hours of work with much reviewing
> and input from Terje. A little of Andrew's work was a spillover from
> January when he was working overtime (smiley face) in creating patches and
> improvements. See the latest release notes included below for a little more
> detail.
>
>
> ***
> *GIT for Cinelerra-GG has the following changes from 02/01/2023-02/29/2024*
>
> *Andrea’s contributions:*
> The Anamorphic.pdf document is now easily accessible here:
> *https://cinelerra-gg.org/download/Anamorphic.pdf
> *
> Tooltips were added by Andrew for HiLo and LoHi audio to remind users of
> Big/Little Indian bits.
> LV2 related files had a patch applied due to Python 3.12 deleting use of
> “imp” after it having been
>  deprecated for a long time. 3 of the files already had the workaround in
> so the same workaround was
>  added to the other 3 – sord, suil, and sratom.
> A minor issue in the 01/31/2024 AppImage for Color 3 Way plugin resulted
> in backing that mod out.
> --


As always there is more work ahead.

Thanks for all your effort and time put into our little common project.
Even if I am absent from cingg I still try to keep rest of "reported by me"
bugs elsewhere updated, this provides some change in picture I am focusing
atm. It was said humans work better if we can switch our tasks from time to
time ...



> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] AgingTV plugin issue

2024-02-28 Thread Andrew Randrianasulu via Cin
ср, 28 февр. 2024 г., 20:37 Phyllis Smith via Cin <
cin@lists.cinelerra-gg.org>:

> (ometimes I just can not stop myself and just had to look at AgingTV.)  I
> think I found the problem.  If everything is unchecked and then one of the
> 3 items of Scratch, Pits, or Dust is checked BUT set to zero, you can still
> see that item in the compositor.  Grain is either on or off and works as
> expected.
>


Einar added  few commits to cin-cve version of plugin:

https://github.com/vanakala/cinelerra-cve/commits/master/plugins/aging

"Fixed applying of AgingTV pits"

"New function AgingConfig::boundaries

Checks the limits of configuration parameters
Area_scale and dust_interval can't be zero

"


> The good news is that at least you can designate which type of aging you
> want, be it grain, scratch, pits, dust, or all or none.  I will log a BT on
> this in case anyone wants to look at it in the future.
>
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Fwd: Chromakey + blur testcase from IgorV

2024-02-26 Thread Andrew Randrianasulu via Cin
вт, 27 февр. 2024 г., 00:02 Phyllis Smith via Cin <
cin@lists.cinelerra-gg.org>:

> Not even sure if it makes sense to do release this month? On the other
>>> hand not even sure if we will able to fix more than one problem in next 30
>>> days ...
>>>
>>  I would bring out a new appimage because DeJay needed the appimage with
>> Color 3 Way working...
>
> Yes, I was planning on making new appimages because Color 3 Way is used a
> lot and an error is not good.
>
>> I tried to update the text of Blur plugin in the manual. See if it is okay
>> (to be added at the end):
>>
> Seems reasonable and I edited it some by changing one option to just use
> Reset and re-save the project instead of editing the .xml.  Editing is open
> to mistakes -- I just made one and ended up with an empty .xml file which
> could be disastrous.
>
> No, I would not change the code. I would left as it is. The reasons are
>> multiple, for me:
>>
> Agreed. At least *about 10 years ago* it seems that the A_KEY code was
> commented out in HV (may have been longer but that is as far back as I
> could easily find).  There does not seem to be A_KEY code in cv blur plugin
> which is a lot different then the HV baseline.  This simply does not matter
> because HV code is the baseline for CinGG with some cv mods merged in and
> no serious attempt was ever made to specifically ensure CinGG was
> compatible for a cv project.
>
> some strangeness with AgingTV gui params (they not as interactive as they
>> should?) but I have't looking at this problem yet.
>>
> In looking at Aging plugin, I have seen no problem and am not going to
> waste any more time on it -- already wasted way too much time on Blur when
> for projects that are less than 10 years old, there was not even a problem.
> And the code matches that of HV-8 with the exception of the addition of the
> Reset button which is so valuable.
>

 ... I only wanted to note this somewhere so hopefully *I* will have some
added motivation to look at it! Well, at least in  very "shake a toy and
see if anything comes out" way ...



> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Fwd: Chromakey + blur testcase from IgorV

2024-02-26 Thread Andrew Randrianasulu via Cin
пн, 26 февр. 2024 г., 17:58 Igor BEGHETTO via Cin <
cin@lists.cinelerra-gg.org>:

> No, I would not change the code. I would left as it is. The reasons are
> multiple, for me:
> - if you open an old project, that project works right with A_KEY=1. An
> user could have written, "it doesn't work", at that time. The test case
> shows why it doesn't work.
> - Now, you can change A_KEY value from 0 to 1, if needed, using the
> "Keyframe parameters" window. If you change the code, that will no
> longer be possible.
>

Yea ...

So, for now probably documentation update is needed, and if we completely
figure it out may be gui checkbox will be re-enabled at some point.

IgorV also reported some strangeness with AgingTV gui params (they not as
interactive as they should?) but I have't looking at this problem yet.

Not even sure if it makes sense to do release this month? On the other hand
not even sure if we will able to fix more than one problem in next 30 days





> IgorBeg
>
>
> 26/02/2024 14:34, Andrew Randrianasulu wrote:
> > For now we can try and modify in plugins/blur/blur.C
> >
> > void BlurMain::save_data(KeyFrame *keyframe)
> > output.tag.set_property("A_KEY", config.a_key);
> > replace config.a_key with 0 here ?
> > so it will be always saved as 0
> > void BlurMain::read_data(KeyFrame *keyframe)
> > config.a_key = input.tag.get_property("A_KEY", config.a_key);
> > with config.a_key = 0;
> > so it will ignore saved 1 setting.
> > At least this is my theory/idea for now.
> > If we go with this plan we probably should left original lines
> > commented out with "//" and add line saying why reading/writing forced
> > to 0 for this param (due to disabled gui config in blurwindow.C)
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] disable a_key in blur.C harder

2024-02-26 Thread Andrew Randrianasulu via Cin
At this point I am not sure if best course of action to disable it harder
or restore it ...

but I hope attached patch at least visually restores strange mess we see by
default now in test project.
From 7856a56b6e7fc6ea11e3daac03134d3ef2351584 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Mon, 26 Feb 2024 16:40:31 +0300
Subject: [PATCH] TEST: disable blur alpha determinates radius harder

---
 cinelerra-5.1/plugins/blur/blur.C | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/plugins/blur/blur.C b/cinelerra-5.1/plugins/blur/blur.C
index 896cddbb..dfbf501c 100644
--- a/cinelerra-5.1/plugins/blur/blur.C
+++ b/cinelerra-5.1/plugins/blur/blur.C
@@ -331,7 +331,8 @@ void BlurMain::save_data(KeyFrame *keyframe)
 	output.tag.set_property("G", config.g);
 	output.tag.set_property("B", config.b);
 	output.tag.set_property("A", config.a);
-	output.tag.set_property("A_KEY", config.a_key);
+	//output.tag.set_property("A_KEY", config.a_key);
+	output.tag.set_property("A_KEY", 0); // disabled in gui in dec 2021
 	output.append_tag();
 	output.tag.set_title("/BLUR");
 	output.append_tag();
@@ -363,7 +364,8 @@ void BlurMain::read_data(KeyFrame *keyframe)
 config.g = input.tag.get_property("G", config.g);
 config.b = input.tag.get_property("B", config.b);
 config.a = input.tag.get_property("A", config.a);
-config.a_key = input.tag.get_property("A_KEY", config.a_key);
+config.a_key = 0; // disabled in gui at dec 2021
+//config.a_key = input.tag.get_property("A_KEY", config.a_key);
 			}
 		}
 	}
-- 
2.44.0

-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Fwd: Chromakey + blur testcase from IgorV

2024-02-26 Thread Andrew Randrianasulu via Cin
пн, 26 февр. 2024 г., 12:07 Igor BEGHETTO via Cin <
cin@lists.cinelerra-gg.org>:

> But why?? well, this is question for me, I got some  clues  (disabled
> in gui param "alpha determinated radius" we probably not initialize
> correctly)
>
>
> Like pointed out by Andrew and Phyllis it concerns the "Alpha determines
> radius" checkbox option in the GUI: it was hidden, by the code, in December
> 2021. For compatibility reasons and for future development it has been left
> there.
>

I think IgorV pointed out (to me)  that this checkbox only worked with
horizontal blur, not with both enabled?

For now we can try and modify in plugins/blur/blur.C


void BlurMain::save_data(KeyFrame *keyframe)

output.tag.set_property("A_KEY", config.a_key);

replace config.a_key with 0 here ?

so it will be always saved as 0

void BlurMain::read_data(KeyFrame *keyframe)

config.a_key = input.tag.get_property("A_KEY", config.a_key);

with config.a_key = 0;

so it will ignore saved 1 setting.

At least this is my theory/idea for now.

If we go with this plan we probably should left original lines commented
out with "//" and add line saying why reading/writing forced to 0 for this
param (due to disabled gui config in blurwindow.C)




The parameter about "Alpha determines radius" is A_KEY. A_KEY can be 0 or
> 1. When we press the Reset button in the Blur plugin window the values are:
> Radius=5; Horizontal= Vertical= A= R= G= B= 1; A_KEY= 0.
>
> Old projects may have saved that parameter (A_KEY) to 1 so, in the special
> cases, is needed some workarounds to put it to 0.
> 1. Open the file project (.xml) in a text editor and change the A_KEY
> value of the BLUR from 1 to 0. It can be useful to change ALL these value
> using "Find and replace..." tool.
> 2. In Cinelerra-GG program, open the project. Click on the cog icon
> (Preset edit) of the Blur effect bar and the "Keyframe parameters" window
> is open. There, you can see the A_KEY parameter and change it: select the
> A_KEY parameter and in the "Edit value" change it from 1 to 0,... and press
> OK button.
>
> If you open the "CGG-CHKEY-BLUR-BUG.xml" test file by Igor_V (Igor_ubuntu)
> in a text editor you can see the line number #87.
>  G=1 B=1 A=1 *A_KEY=1*>
> Change the A_KEY from 1 to 0 and save as "CGG-CHKEY-BLUR-BUG_test2.xml".
> Open that Project file in the Cinelerra-GG and we can see that the Blur is
> working right.
> If you want to use the #2 point written above it is the same.
>
> Thank you!
>
> IgorBeg
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Fwd: Chromakey + blur testcase from IgorV

2024-02-25 Thread Andrew Randrianasulu via Cin
вс, 25 февр. 2024 г., 21:46 Andrea paz via Cin :

> NB: Completely agree with Andrew's conclusion about apes! (quote from
> "planet of the apes" trilogy?)
>

no, just me paraphrasing some internet meme:

Ape (chimp) looking at smartphone, where we see prompt: "enter password"
Chimp enters "ape"
Smartphone says "weak password!"
Chimp after some thinking "apeapeape"
Smartphone: "Password accepted"
Line of thought: "Apes together strong!"

-- 
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Fwd: Chromakey + blur testcase from IgorV

2024-02-25 Thread Andrew Randrianasulu via Cin
On Sun, Feb 25, 2024 at 3:47 PM Igor BEGHETTO via Cin <
cin@lists.cinelerra-gg.org> wrote:
>
> By my test, using IgorVlad's test case, Blur plugin works as it is (I am
> using "CinGG-20240131-x86_64-older_distros.AppImage"). Just press the
> Reset button in the Blur plugin and set the desired value.

I think you win The Internet today ... because it works!??? But why??
well, this is question for me, I got some  clues  (disabled in gui
param "alpha determinated radius" we probably not initialize correctly)

So, even if we are not very coherent team - lesson of the day "apes
*together* strong!"





>
> IgorBeg
>
> Andrew Randrianasulu via Cin wrote:
> > even if I disable chromakey - blur behaves strange, like rounding
> > unprocessed (processed as black?) transparency into image ..?
>
> --
> Cin mailing list
> Cin@lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Ghosts from the shell!

2024-02-22 Thread Andrew Randrianasulu via Cin
чт, 22 февр. 2024 г., 22:24 Phyllis Smith :

> small video describing how it worked in  cinelerra-cv 1.2.1 using old
>> dynebolic 1.4 iso
>
> In checking the above, I ended up clicking on:
> http://cinelerra-cv.wikidot.com/cincvdocs:docs-start
> I do not comprehend what the point of providing links to obvious
> documentation for Cin*GG *without including the CinGG manual in full?
> Like the documents by RafaMar and Magyar (Hungarian).
>


I think main idea for this specific video was to highlight that manual (for
both cv and gg versions) got out of sync with real behavior, since probably
cincv 1.2.3 version inclusive. I can't say much about wiki because I rarely
visit it .



> I wonder how "long" must be long distance? offscreen? tried this, also
>> with enlarged projector range  no two boxes! I can't even see this
>> behavior in cincv 2.3.* from 2017, but may be I am doing it wrong for all
>> versions?
>>
>> I finally tried it on a couple of older versions and could never get any
> extra boxes so obviously you were not doing anything wrong.  The second box
> is also documented in the original HV manual - Secrets of Cinelerra (2009
> version).  Portions of the CinGG manual were obtained from that manual when
> I was at a total loss which was quite frequent.
>
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] Fwd: Chromakey + blur testcase from IgorV

2024-02-22 Thread Andrew Randrianasulu via Cin
-- Forwarded message -
From: Andrew Randrianasulu 
Date: Thu, Feb 22, 2024 at 2:19 AM
Subject: Chromakey + blur testcase from IgorV
To: Phyllis Smith 


oh, it weights 1.4 mb, so not for list ...

I think swapping effects relative to cin-cv makes  image in compositor
more like it was supposed to be but still.

even if I disable chromakey - blur behaves strange, like rounding
unprocessed (processed as black?) transparency into image ..?


=

https://drive.google.com/file/d/1kqt4bfy53drwQqOvD5RIJ1E7UWeJNF1A/view?usp=sharing

hopefully uploaded to gdrive for everyone to test/see 
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] Ghosts from the shell!

2024-02-21 Thread Andrew Randrianasulu via Cin
IgorV pointed out that while our manual still describes multiple projector
keyframes/boxes in compositor it doesn't (reliably?) work this way, namely
I think I created second box somehow but can't reproduce :)

https://cinelerra-gg.org/download/CinelerraGG_Manual/Compositor_Keyframes.html

"Move the projector slightly in the compositor window to create a keyframe.
Then go forward several seconds. Move the projector a long distance to
create another keyframe and emphasize motion. This creates a second
projector box in the compositor, with a line joining the two boxes. The
joining line is the motion path. If you create more keyframes, more boxes
are created. Once all the desired keyframes are created, disable automatic
keyframe mode."

small video describing how it worked in  cinelerra-cv 1.2.1 using old
dynebolic 1.4 iso

https://m.youtube.com/watch?v=08UCImr82CE

I wonder how "long" must be long distance? offscreen? tried this, also with
enlarged projector range  no two boxes! I can't even see this behavior
in cincv 2.3.* from 2017, but may be I am doing it wrong for all versions?
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Possibly better conversion quality at 2x speed/ bitrate and 25fps/ 50 fps

2024-02-19 Thread Andrew Randrianasulu via Cin
пн, 19 февр. 2024 г., 20:59 Terje J. Hanssen via Cin <
cin@lists.cinelerra-gg.org>:

> Thirty years ago I tape recordered some hundreds of old genealogy photos,
> which I now plan to convert from SD-DV files to burn on DVD video discs.
> The camcordings were made with fade in/out, zoom closeups and pan
> effects,  which fit well at 2x playback speed and with additional
> pause/play navigation on DVD videos.
>
> Signal/noise at 2x speed with same fps and bitrate (halph of the fps are
> dropped), should result in output with 1/2 playback duration and equivalent
> quality as normal speed.
>
> Yet I wonder if it possible in some way to achieve better quality if also
> 2x bitrate and fps are possible to utilize temporarily as a better quality
> base (downsampling), even if DVD video limits the fps and bitrate?
>


They are progressive (not interlaced) dv files, right? I only can think
about fields-> frames conversion, that changes both frame size and fps.
There might be some movement interpolation algorithms, or even neural nets
nowadays, but I can't see any use of it directly in ffmpeg (for one command
conversion) as long as output remain at 25 fps. But there might be some
sideefects that makes viewing better/worse?

Bitrate for consumer dv is fixed at 25Mbits, dv50 obviously goes above that
*2, but not sure if you  gain anything by transcoding into dv? (it was
important when other hardware worked with those files, or they were
transferred back to tape. But our current case is single Linux workstation
only..?). mpeg2 dvd video yeah, seems to have gard upper cap on how big
bitrate-wise it can go - you can try other stuff like custom matrixes and
see if they improve quality ...

I think there was yuvfps tool in mjpegtools, but I never used it ...

>
>
> Here are my test samples so far:
>
> du -sh dv95*
> 1)2,0Gdv95.dv (input source)
>
> 2) 1,1Gdv95_2x_25fps.dv
> 3) 2,0Gdv95_2x_50fps.dv
>
> 4) 218Mdv95_2x_25fps.mpg
> 5) 218Mdv95_2x_50fps.mpg
>
>
> 1)
> ffprobe -hide_banner dv95.dv (source DV, Duration: 00:09:56.48)
>
> [dv @ 0x55d65d6ca080] Estimating duration from bitrate, this may be
> inaccurate
> Input #0, dv, from 'dv95.dv':
>   Metadata:
> timecode: 00:00:00:00
>   Duration: 00:09:56.48, start: 0.00, bitrate: 28800 kb/s
>   Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 16:15 DAR 4:3], 28800
> kb/s, 60k fps, 25 tbr, 60k tbn
>   Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
>
>
>
> ffmpeg conversions using the FFmpeg setpts filter
>
> http://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video#setptsfilter
>
>
> 2)
> ffmpeg -i dv95.dv -vf "setpts=0.5*PTS" -an dv95_2x_25fps.dv
>
> ffprobe -hide_banner dv95_2x_25fps.dv
>
> [dv @ 0x5582eb685080] Estimating duration from bitrate, this may be
> inaccurate
> Input #0, dv, from 'dv95_2x_25fps.dv':
>   Metadata:
> timecode: 00:00:00:00
>   Duration: 00:04:58.32, start: 0.00, bitrate: 28800 kb/s
>   Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 16:15 DAR 4:3], 28800
> kb/s, 60k fps, 25 tbr, 60k tbn
>
>
> 3) I wonder why the Duration is still 00:09:56.52 here ?
>
> ffmpeg -hide_banner -i dv95.dv -r 50 -vf "setpts=0.5*PTS" -an
> dv95_2x_50fps.dv
>
> ffprobe -hide_banner dv95_2x_50fps.dv
>
> [dv @ 0x55fe0b5bb080] Estimating duration from bitrate, this may be
> inaccurate
> Input #0, dv, from 'dv95_2x_50fps.dv':
>   Metadata:
> timecode: 00:00:00:00
>   Duration: 00:09:56.52, start: 0.00, bitrate: 28800 kb/s
>   Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 16:15 DAR 4:3], 28800
> kb/s, 60k fps, 25 tbr, 60k tbn
>
>
> 4)
> ffmpeg -hide_banner -i dv95.dv -f dvd -target pal-dvd -aspect 4:3 -vf
> "setpts=0.5*PTS" -an dv95_2x_25fps.mpg
>
> ffprobe -hide_banner dv95_2x_25fps.mpg
>
> [mpeg @ 0x55a330208080] start time for stream 0 is not set in
> estimate_timings_from_pts
> Input #0, mpeg, from 'dv95_2x_25fps.mpg':
>   Duration: 00:04:58.32, start: 0.54, bitrate: 6115 kb/s
>   Stream #0:0[0x1bf]: Data: dvd_nav_packet
>   Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive),
> 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn
> Side data:
>   cpb: bitrate max/min/avg: 900/0/0 buffer size: 1835008
> vbv_delay: N/A
> Unsupported codec with id 98312 for input stream 0
>
>
> 5)
> ffmpeg -hide_banner -i dv95.dv -f dvd -target pal-dvd -r 50 -vf
> "setpts=0.5*PTS" -an dv95_2x_50fps.mpg
>
> ffprobe -hide_banner dv95_2x_50fps.mpg
>
> [mpeg @ 0x555e13da2080] start time for stream 0 is not set in
> estimate_timings_from_pts
> Input #0, mpeg, from 'dv95_2x_50fps.mpg':
>   Duration: 00:04:58.26, start: 0.52, bitrate: 6118 kb/s
>   Stream #0:0[0x1bf]: Data: dvd_nav_packet
>   Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive),
> 720x576 [SAR 16:15 DAR 4:3], 50 fps, 50 tbr, 90k tbn
> Side data:
>   cpb: bitrate max/min/avg: 900/0/0 buffer size: 1835008
> vbv_delay: N/A
> Unsupported codec with id 

Re: [Cin] Another attempt at patching cin-hv sources so they build on my system

2024-02-16 Thread Andrew Randrianasulu via Cin
On Fri, Feb 16, 2024 at 1:25 PM Andrew Randrianasulu
 wrote:
>
> On Fri, Feb 16, 2024 at 12:58 PM Andrew Randrianasulu
>  wrote:
> >
> > On Fri, Feb 16, 2024 at 11:37 AM Andrew Randrianasulu
> >  wrote:
> > >
> > > On Fri, Feb 16, 2024 at 9:53 AM Andrew Randrianasulu
> > >  wrote:
> > > >
> > > > On Fri, Feb 16, 2024 at 10:00 AM Adam williams 
> > > >  wrote:
> > > > >
> > > > > Haven't had enough time to finish & integrate your work. Please 
> > > > > submit a working build log on ubuntu 16-22 & explain why you're 
> > > > > trying to build without filefork support.
> > > >
> > > > It was function linker was unable to find (for some reason)
> > > >
> > > > right now after those steps in hvirtual root (on chrooted  Rosa 2016
> > > > system - gcc 5.5.0)
> > > >
> > > > make clean twice
> > > >
> > > > git clean -fdx {removes all untracked  files}
> > > >
> > > > git reset --hard
> > > > HEAD is now at 400dcf62 Greater less typo
> > > >
> > > > configure fails at sndfile step
> > >
> > > ah, probably just artefact of running configure > log > 2>&1
> > >
> > > just running configure is fine. but  pulseaudio still barf
> > >
> >
> >
> > so, with just 4 new patches (attached) I see this linking failure:
> >
> > g++ -o ../bin/cinelerra `cat x86_64/objs`
> > ../thirdparty/libsndfile-1.0.28/src/.libs/libsndfile.a(libsndfile_la-flac.o):
> > In function `flac_close':
> > /root/src/hvirtual/thirdparty/libsndfile-1.0.28/src/flac.c:736:
> > undefined reference to `FLAC__metadata_object_delete'
> > ../thirdparty/libsndfile-1.0.28/src/.libs/libsndfile.a(libsndfile_la-flac.o):
> > In function `flac_write_strings':
> > /root/src/hvirtual/thirdparty/libsndfile-1.0.28/src/flac.c:627:
> > undefined reference to
> > `FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair'
> > /root/src/hvirtual/thirdparty/libsndfile-1.0.28/src/flac.c:628:
> > undefined reference to
> > `FLAC__metadata_object_vorbiscomment_append_comment'
> > /root/src/hvirtual/thirdparty/libsndfile-1.0.28/src/flac.c:582:
> > undefined reference to `FLAC__metadata_object_new'
> > ../thirdparty/libsndfile-1.0.28/src/.libs/libsndfile.a(libsndfile_la-flac.o):
> > In function `sf_flac_meta_get_vorbiscomments':
> > /root/src/hvirtual/thirdparty/libsndfile-1.0.28/src/flac.c:414:
> > undefined reference to
> > `FLAC__metadata_object_vorbiscomment_find_entry_from'
> > ../thirdparty/libsndfile-1.0.28/src/.libs/libsndfile.a(libsndfile_la-ogg_vorbis.o):
> > In function `ogg_vorbis_open':
> > /root/src/hvirtual/thirdparty/libsndfile-1.0.28/src/ogg_vorbis.c:506:
> > undefined reference to `vorbis_version_string'
> > collect2: error: ld returned 1 exit status
> > make[2]: *** [Makefile:545: ../bin/cinelerra] Error 1
> >
> > hm, may be disable flac support in libsndfile if possible?
> >
>
> disabling external programs in libsndfile helps but now I meet failure
> at loading mpg media:
>
> bin/cinelerra
> Cinelerra 8 (C)2022 Adam Williams
>
> Cinelerra is free software, covered by the GNU General Public License,
> and you are welcome to change it and/or distribute copies of it under
> certain conditions. There is absolutely no warranty for Cinelerra.
> BC_DisplayInfo::test_window 158: No window manager
> EditPanel::create_objects: meter_panel == 0
> libancil_get_fd 88 recvmsg failed < here we hang
> ^Csignal_entry: got SIGINT my pid=18201 execution table size=0:
> signal_entry: got SIGINT my pid=18262 execution table size=0:
> signal_entry: got SIGINT my pid=18203 execution table size=0:
> signal_entry: got SIGINT my pid=18232 execution table size=0:
> kill_subs 276: process=18203
> SigHandler::signal_handler total files=0
> SigHandler::signal_handler total files=0
> SigHandler::signal_handler total files=0
> Aborted
> [root@slax hvirtual]# grep libancil_get_fd -r .
> Binary file ./cinelerra/x86_64/forkwrapper.o matches
> Binary file ./cinelerra/x86_64/cfunctions.o matches
> ./cinelerra/cfunctions.c:int libancil_get_fd(int parent_fd)
> ./cinelerra/cfunctions.c:printf("libancil_get_fd %d recvmsg
> failed\n", __LINE__);
> ./cinelerra/forkwrapper.C:  return libancil_get_fd(parent_fd);
> ./cinelerra/cfunctions.h:int libancil_get_fd(int parent_fd);
> Binary file ./bin/cinelerra matches
>
> current set of patches to get to that point attached.

so, I do not know how to debug

[Cin] Another attempt at patching cin-hv sources so they build on my system

2024-02-15 Thread Andrew Randrianasulu via Cin
a bit of mess because I was not sure if lack of .version or
.tarball-version in thirdparty/pulseaudio-13 dir was responsible for
rebuild failure. Probably .tarball-version, because just .version
already in git ...

I was surprised my git add was not working, but it was simply due to
file being already in git, so you probably can ignore patch 0005
From d80fcb830f6ad704a58b43314f73bf0382bd3aa1 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Thu, 15 Feb 2024 15:14:40 +
Subject: [PATCH 7/7] Add .tarball-version to pulseaudio-13.0

---
 thirdparty/pulseaudio-13.0/.tarball-version | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 thirdparty/pulseaudio-13.0/.tarball-version

diff --git a/thirdparty/pulseaudio-13.0/.tarball-version b/thirdparty/pulseaudio-13.0/.tarball-version
new file mode 100644
index ..f0750610
--- /dev/null
+++ b/thirdparty/pulseaudio-13.0/.tarball-version
@@ -0,0 +1 @@
+13.0
-- 
2.29.0

From dd5d741dce6a13e77f42c28aa874cb8107a5b80b Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Thu, 15 Feb 2024 14:16:40 +
Subject: [PATCH 5/7] modify pulseaudio/.gitignore

---
 thirdparty/pulseaudio-13.0/.gitignore | 1 -
 1 file changed, 1 deletion(-)

diff --git a/thirdparty/pulseaudio-13.0/.gitignore b/thirdparty/pulseaudio-13.0/.gitignore
index 82b22e4c..78bee094 100644
--- a/thirdparty/pulseaudio-13.0/.gitignore
+++ b/thirdparty/pulseaudio-13.0/.gitignore
@@ -1,5 +1,4 @@
 .tarball-version
-.version
 .*.swp
 ABOUT-NLS
 build*
-- 
2.29.0

From d461a4491a04f908f5b728035ab9766834efc2e8 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Thu, 15 Feb 2024 14:25:30 +
Subject: [PATCH 6/7] Add .version to fix pulseaudio-13.0 rebuild

---
 configure | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 45de1ec3..f8fa8d6a 100755
--- a/configure
+++ b/configure
@@ -223,6 +223,7 @@ echo CONFIGURING PULSEAUDIO
 cd thirdparty/pulseaudio* && \
 SNDFILE_PATH=`expr $TOPDIR/thirdparty/libsndfile*` && \
 #./bootstrap.sh && \
+echo 13.0 > .version && \
 autoreconf -fi && \
 ./configure --disable-dbus --disable-x11 --without-caps LIBSNDFILE_LIBS="-L$SNDFILE_PATH/src/.libs/ -lsndfile" LIBSNDFILE_CFLAGS="-I$SNDFILE_PATH/src" --enable-static && \
 cd ../..
-- 
2.29.0

From 90472563038781bf859dab8da83d96bef58c76b1 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Thu, 15 Feb 2024 11:09:43 +
Subject: [PATCH 3/7] Hacks in cinelerra/Makefile - more libs to link with

may be reuse at least pulseaudio/flac from tree?
---
 cinelerra/Makefile | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/cinelerra/Makefile b/cinelerra/Makefile
index 0d17ad31..5df75f28 100644
--- a/cinelerra/Makefile
+++ b/cinelerra/Makefile
@@ -436,6 +436,11 @@ LIBS += \
 	-ldl \
 	-lbz2 \
 	-llzma \
+	-lasyncns \
+	-lvorbis \
+	-lFLAC \
+	-lpulse \
+	-lsystemd \
 	-lrt
 
 #	-lfontconfig \
@@ -525,6 +530,7 @@ FFMPEG_CFLAGS := \
 $(FFMPEG_CFLAGS)
 
 FFMPEG_LIBS := -lavformat -lavcodec -lavutil -lswresample
+FFMPEG_LIBS += `pkg-config --libs vdpau` `pkg-config --libs libva-drm` `pkg-config --libs libva-x11`
 
 CFLAGS += -g
 CXXFLAGS := $(CFLAGS) -std=c++11
-- 
2.29.0

From 35859fbf1273826851882edcab934ffbd2aa9740 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Thu, 15 Feb 2024 11:11:15 +
Subject: [PATCH 4/7] Hack: disable filefork

does not link on rosa 2016
---
 cinelerra/file.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cinelerra/file.inc b/cinelerra/file.inc
index e36344a3..ddffa25d 100644
--- a/cinelerra/file.inc
+++ b/cinelerra/file.inc
@@ -23,7 +23,7 @@
 
 #include "language.h"
 
-#define USE_FILEFORK
+//#define USE_FILEFORK
 // support useless text to movie feature
 //#define USE_SCENE
 
-- 
2.29.0

From 7e3099709cfdb8c026b22e484a11ad7a01c8f17a Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Thu, 15 Feb 2024 11:05:48 +
Subject: [PATCH 2/7] Modify configure and quicktime/configure:

add autoreconf -fi to faad/faac, libraw1394,  pulseaudio
disable vaapi/vdpau in ffmpeg
---
 configure   | 4 +++-
 quicktime/configure | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index e5d7a9d5..45de1ec3 100755
--- a/configure
+++ b/configure
@@ -141,7 +141,7 @@ FFMPEG_LFLAGS="-L$FFMPEG_DIR/libavformat -L$FFMPEG_DIR/libavcodec -L$FFMPEG_DIR/
 FFMPEG_LIBS="-lavformat -lavcodec -lavutil -lswresample -ldl -lm -lpthread -lz -lbz2 -llzma"
 
 cd $FFMPEG_DIR
-./configure --enable-pthreads --disable-ffplay --enable-nonfree --disable-doc --enable-gpl --nvccflags=-I$CUDA_DIR/include --extra-cflags=-I$CUDA_DIR/include --extra-ldflags=-L$CUDA_DIR/lib64
+./configure --enable-pthreads --disable-vaapi --disable-vdpau --disable-ffplay --enable-nonfree --disable-doc --enable-gpl --nvccflags=-I$CUDA_DIR/include --extra-cflags=-I$CUDA_DIR/include --extra-ldflags=-L$CUDA_DIR/lib64
 if

Re: [Cin] binary repo for cin-hv

2024-02-15 Thread Andrew Randrianasulu via Cin
пт, 16 февр. 2024 г., 03:26 Phyllis Smith :

> Andrew, I have started comparing CinGG chromakey plugin with HV 8.
>


Thanks! But I think mentioned fixes just went in into hv git  few days ago,
so post HV 8

For some reason I can not translate the url from Russian to English using
> Google Website translate, but it does not matter as I can compare the code
> without understanding the rhetoric.
>
>>  https://www.linux.org.ru/forum/multimedia/17521951
>>
>
>
>> also, previews in file loading dialog!
>>
> What does the above mean?
>


Well, if you use file picker in cin-hv /cv / gg you see some file details
but no picture (like in gimp's file open dialog, or old quicktime for mac).
Now cin-hv git does show preview pictures if you click on filename in open
dialog/window. May be not easy to port if it uses libquicktime internals


>
>
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] binary repo for cin-hv

2024-02-14 Thread Andrew Randrianasulu via Cin
https://github.com/heroineworshiper/hvirtual_bin

supposedly we have some bugs in chromakeyer (or more accurately not all
functionality was implemented correctly) so it might be interesting to see
how it was supposed to work

also, previews in file loading dialog!

reported to work on ubuntu 18.04/x86_64


via https://www.linux.org.ru/forum/multimedia/17521951
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


[Cin] OT: mp3guessenc

2024-02-13 Thread Andrew Randrianasulu via Cin
Was looking for xing media software, found this little open-source utility
printing info on mpeg audio files, including this rare multichannel
extension!

https://mp3guessenc.sourceforge.io/
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin


Re: [Cin] Adding soft subtitles to a DVD video

2024-02-12 Thread Andrew Randrianasulu via Cin
вт, 13 февр. 2024 г., 05:20 Andrew Randrianasulu :

>
>
> вт, 13 февр. 2024 г., 03:42 Terje J. Hanssen :
>
>>
>>
>> Den 12.02.2024 00:07, skrev Andrew Randrianasulu:
>>
>>
>>
>> пн, 12 февр. 2024 г., 02:02 Terje J. Hanssen :
>>
>>>
>>>
>>> Den 11.02.2024 04:36, skrev Terje J. Hanssen:
>>>
>>>
>>>
>>> Den 11.02.2024 00:57, skrev Andrew Randrianasulu:
>>>
>>>
>>>
>>> сб, 10 февр. 2024 г., 21:10 Terje J. Hanssen via Cin <
>>> cin@lists.cinelerra-gg.org>:
>>>
>>>> There are two things I want to add to my current intermediate DVD mpg
>>>> video files created with ffmpeg, and/or to the DVD tree structure created
>>>> with DeVeDeNG:
>>>>
>>>> 1. Create and add a Navigation menu in the beginning
>>>> This will be an upcoming, separate topic
>>>>
>>>> 2. Create and add Soft Subtitles as simple text info commentaries to
>>>> the video content
>>>> This is the topic for this post.
>>>>
>>>>
>>>> The reason that I want *Soft* Subtitles as a separate text file stream
>>>> related to timing, is because this should be possible to *add* or
>>>> import to an existing video file  without the need to re-encode. It should
>>>> also be flexible to display on or off during playback, if I have understood
>>>> this correct so far.
>>>>
>>>
>>>
>>> IIRC you can't add text-based subtitles to DVD video. Blu-ray yes, dvd
>>> no (both can use palletized reduced-color graphical subtitles) ... so at
>>> least rendering text as palletized picture and then muxing it into mpeg
>>> stream is unavoidable step,as far as I understand.
>>>
>>>
>>> I have prepared a new video file and will try to add sub-titles
>>> to-morrow
>>>
>>> http://www.g-raffa.eu/Cinelerra/HOWTO/subtitles.html#_how_to_create_soft_subtitles
>>>
>>>
>>>
>>> There are written several articles and answers to forum topics about
>>> adding soft subtitles to video.
>>> My best but only partly working attempt so far, is by applying this
>>> solution on StackOverflow:
>>>
>>>
>>>
>>>
>>> *Use ffmpeg to add text subtitles: NOTE: This solution adds the
>>> subtitles to the video as a separate optional (and user-controlled)
>>> subtitle track.
>>> https://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles
>>> <https://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles>
>>> *1) First I created a DVD-video compliant MPG file with pcm audio from
>>> DV source (as previously)
>>>
>>> ffmpeg -hide_banner -i DV09-1993.dv -f dvd -target pal-dvd -aspect 4:3
>>> -b:v 8M -maxrate 8M -minrate 8M -bufsize 20M -muxrate 20M -mbd rd -trellis
>>> 1 -cmp 0 -subcmp 2 -c:a pcm_dvd DV09-1993.mpg
>>>
>>>
>>> 2) Created the attached srt subtitle file:
>>>
>>> DVD-09-1993_subtitle.srt
>>>
>>>
>>>
>>> 3) Added (muxed) the soft, external subtitle file (2) as a separate
>>> track to the mpg video file (1)
>>>
>>> ffmpeg -hide_banner -i DV09-1993.mpg -i DVD-09-1993_subtitle.srt -c:v
>>> copy -c:a copy -c:s copy DV09-1993+srt.mpg
>>>
>>> [mpeg @ 0x55aac13139c0] start time for stream 0 is not set in
>>> estimate_timings_from_pts
>>> Input #0, mpeg, from 'DV09-1993.mpg':
>>>   Duration: 00:28:04.44, start: 0.54, bitrate: 9701 kb/s
>>>   Stream #0:0[0x1bf]: Data: dvd_nav_packet
>>>   Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv,
>>> progressive), 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn
>>> Side data:
>>>   cpb: bitrate max/min/avg: 900/0/0 buffer size: 1835008
>>> vbv_delay: N/A
>>>   Stream #0:2[0xa0]: Audio: pcm_dvd, 48000 Hz, stereo, s16, 1536 kb/s
>>> Input #1, srt, from 'DVD-09-1993_subtitle.srt':
>>>   Duration: N/A, bitrate: N/A
>>>   Stream #1:0: Subtitle: subrip
>>>
>>> [mpeg @ 0x55aac134b140] pcm_dvd in MPEG-1 system streams is not widely
>>> supported, consider using the vob or the dvd muxer to force a MPEG-2
>>> program stream.
>>> Output #0, mpeg, to 'DV09-1993+srt.mpg':
>>>   Metadata:
>>> encoder : Lavf60.16.100
>>>   Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, progressive),
>>>

Re: [Cin] Adding soft subtitles to a DVD video

2024-02-12 Thread Andrew Randrianasulu via Cin
вт, 13 февр. 2024 г., 03:42 Terje J. Hanssen :

>
>
> Den 12.02.2024 00:07, skrev Andrew Randrianasulu:
>
>
>
> пн, 12 февр. 2024 г., 02:02 Terje J. Hanssen :
>
>>
>>
>> Den 11.02.2024 04:36, skrev Terje J. Hanssen:
>>
>>
>>
>> Den 11.02.2024 00:57, skrev Andrew Randrianasulu:
>>
>>
>>
>> сб, 10 февр. 2024 г., 21:10 Terje J. Hanssen via Cin <
>> cin@lists.cinelerra-gg.org>:
>>
>>> There are two things I want to add to my current intermediate DVD mpg
>>> video files created with ffmpeg, and/or to the DVD tree structure created
>>> with DeVeDeNG:
>>>
>>> 1. Create and add a Navigation menu in the beginning
>>> This will be an upcoming, separate topic
>>>
>>> 2. Create and add Soft Subtitles as simple text info commentaries to the
>>> video content
>>> This is the topic for this post.
>>>
>>>
>>> The reason that I want *Soft* Subtitles as a separate text file stream
>>> related to timing, is because this should be possible to *add* or
>>> import to an existing video file  without the need to re-encode. It should
>>> also be flexible to display on or off during playback, if I have understood
>>> this correct so far.
>>>
>>
>>
>> IIRC you can't add text-based subtitles to DVD video. Blu-ray yes, dvd no
>> (both can use palletized reduced-color graphical subtitles) ... so at least
>> rendering text as palletized picture and then muxing it into mpeg stream is
>> unavoidable step,as far as I understand.
>>
>>
>> I have prepared a new video file and will try to add sub-titles to-morrow
>>
>> http://www.g-raffa.eu/Cinelerra/HOWTO/subtitles.html#_how_to_create_soft_subtitles
>>
>>
>>
>> There are written several articles and answers to forum topics about
>> adding soft subtitles to video.
>> My best but only partly working attempt so far, is by applying this
>> solution on StackOverflow:
>>
>>
>>
>>
>> *Use ffmpeg to add text subtitles: NOTE: This solution adds the subtitles
>> to the video as a separate optional (and user-controlled) subtitle track.
>> https://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles
>> <https://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles>
>> *1) First I created a DVD-video compliant MPG file with pcm audio from
>> DV source (as previously)
>>
>> ffmpeg -hide_banner -i DV09-1993.dv -f dvd -target pal-dvd -aspect 4:3
>> -b:v 8M -maxrate 8M -minrate 8M -bufsize 20M -muxrate 20M -mbd rd -trellis
>> 1 -cmp 0 -subcmp 2 -c:a pcm_dvd DV09-1993.mpg
>>
>>
>> 2) Created the attached srt subtitle file:
>>
>> DVD-09-1993_subtitle.srt
>>
>>
>>
>> 3) Added (muxed) the soft, external subtitle file (2) as a separate track
>> to the mpg video file (1)
>>
>> ffmpeg -hide_banner -i DV09-1993.mpg -i DVD-09-1993_subtitle.srt -c:v
>> copy -c:a copy -c:s copy DV09-1993+srt.mpg
>>
>> [mpeg @ 0x55aac13139c0] start time for stream 0 is not set in
>> estimate_timings_from_pts
>> Input #0, mpeg, from 'DV09-1993.mpg':
>>   Duration: 00:28:04.44, start: 0.54, bitrate: 9701 kb/s
>>   Stream #0:0[0x1bf]: Data: dvd_nav_packet
>>   Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive),
>> 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn
>> Side data:
>>   cpb: bitrate max/min/avg: 900/0/0 buffer size: 1835008
>> vbv_delay: N/A
>>   Stream #0:2[0xa0]: Audio: pcm_dvd, 48000 Hz, stereo, s16, 1536 kb/s
>> Input #1, srt, from 'DVD-09-1993_subtitle.srt':
>>   Duration: N/A, bitrate: N/A
>>   Stream #1:0: Subtitle: subrip
>>
>> [mpeg @ 0x55aac134b140] pcm_dvd in MPEG-1 system streams is not widely
>> supported, consider using the vob or the dvd muxer to force a MPEG-2
>> program stream.
>> Output #0, mpeg, to 'DV09-1993+srt.mpg':
>>   Metadata:
>> encoder : Lavf60.16.100
>>   Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, progressive),
>> 720x576 [SAR 16:15 DAR 4:3], q=2-31, 25 fps, 25 tbr, 90k tbn
>> Side data:
>>   cpb: bitrate max/min/avg: 900/0/0 buffer size: 1835008
>> vbv_delay: N/A
>>   Stream #0:1: Audio: pcm_dvd, 48000 Hz, stereo, s16, 1536 kb/s
>>   Stream #0:2: Subtitle: subrip
>> Stream mapping:
>>   Stream #0:1 -> #0:0 (copy)
>>   Stream #0:2 -> #0:1 (copy)
>>   Stream #1:0 -> #0:2 (copy)
>> Press [q] to stop, [?] for help
>> [out#0/mpeg @ 0x55aac134af80] vid

Re: [Cin] Adding soft subtitles to a DVD video

2024-02-11 Thread Andrew Randrianasulu via Cin
пн, 12 февр. 2024 г., 02:02 Terje J. Hanssen :

>
>
> Den 11.02.2024 04:36, skrev Terje J. Hanssen:
>
>
>
> Den 11.02.2024 00:57, skrev Andrew Randrianasulu:
>
>
>
> сб, 10 февр. 2024 г., 21:10 Terje J. Hanssen via Cin <
> cin@lists.cinelerra-gg.org>:
>
>> There are two things I want to add to my current intermediate DVD mpg
>> video files created with ffmpeg, and/or to the DVD tree structure created
>> with DeVeDeNG:
>>
>> 1. Create and add a Navigation menu in the beginning
>> This will be an upcoming, separate topic
>>
>> 2. Create and add Soft Subtitles as simple text info commentaries to the
>> video content
>> This is the topic for this post.
>>
>>
>> The reason that I want *Soft* Subtitles as a separate text file stream
>> related to timing, is because this should be possible to *add* or import
>> to an existing video file  without the need to re-encode. It should also be
>> flexible to display on or off during playback, if I have understood this
>> correct so far.
>>
>
>
> IIRC you can't add text-based subtitles to DVD video. Blu-ray yes, dvd no
> (both can use palletized reduced-color graphical subtitles) ... so at least
> rendering text as palletized picture and then muxing it into mpeg stream is
> unavoidable step,as far as I understand.
>
>
> I have prepared a new video file and will try to add sub-titles to-morrow
>
> http://www.g-raffa.eu/Cinelerra/HOWTO/subtitles.html#_how_to_create_soft_subtitles
>
>
>
> There are written several articles and answers to forum topics about
> adding soft subtitles to video.
> My best but only partly working attempt so far, is by applying this
> solution on StackOverflow:
>
>
>
>
> *Use ffmpeg to add text subtitles: NOTE: This solution adds the subtitles
> to the video as a separate optional (and user-controlled) subtitle track.
> https://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles
> <https://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles>
> *1) First I created a DVD-video compliant MPG file with pcm audio from DV
> source (as previously)
>
> ffmpeg -hide_banner -i DV09-1993.dv -f dvd -target pal-dvd -aspect 4:3
> -b:v 8M -maxrate 8M -minrate 8M -bufsize 20M -muxrate 20M -mbd rd -trellis
> 1 -cmp 0 -subcmp 2 -c:a pcm_dvd DV09-1993.mpg
>
>
> 2) Created the attached srt subtitle file:
>
> DVD-09-1993_subtitle.srt
>
>
>
> 3) Added (muxed) the soft, external subtitle file (2) as a separate track
> to the mpg video file (1)
>
> ffmpeg -hide_banner -i DV09-1993.mpg -i DVD-09-1993_subtitle.srt -c:v copy
> -c:a copy -c:s copy DV09-1993+srt.mpg
>
> [mpeg @ 0x55aac13139c0] start time for stream 0 is not set in
> estimate_timings_from_pts
> Input #0, mpeg, from 'DV09-1993.mpg':
>   Duration: 00:28:04.44, start: 0.54, bitrate: 9701 kb/s
>   Stream #0:0[0x1bf]: Data: dvd_nav_packet
>   Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive),
> 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn
> Side data:
>   cpb: bitrate max/min/avg: 900/0/0 buffer size: 1835008
> vbv_delay: N/A
>   Stream #0:2[0xa0]: Audio: pcm_dvd, 48000 Hz, stereo, s16, 1536 kb/s
> Input #1, srt, from 'DVD-09-1993_subtitle.srt':
>   Duration: N/A, bitrate: N/A
>   Stream #1:0: Subtitle: subrip
>
> [mpeg @ 0x55aac134b140] pcm_dvd in MPEG-1 system streams is not widely
> supported, consider using the vob or the dvd muxer to force a MPEG-2
> program stream.
> Output #0, mpeg, to 'DV09-1993+srt.mpg':
>   Metadata:
> encoder : Lavf60.16.100
>   Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x576
> [SAR 16:15 DAR 4:3], q=2-31, 25 fps, 25 tbr, 90k tbn
> Side data:
>   cpb: bitrate max/min/avg: 900/0/0 buffer size: 1835008
> vbv_delay: N/A
>   Stream #0:1: Audio: pcm_dvd, 48000 Hz, stereo, s16, 1536 kb/s
>   Stream #0:2: Subtitle: subrip
> Stream mapping:
>   Stream #0:1 -> #0:0 (copy)
>   Stream #0:2 -> #0:1 (copy)
>   Stream #1:0 -> #0:2 (copy)
> Press [q] to stop, [?] for help
> [out#0/mpeg @ 0x55aac134af80] video:1644910kB audio:316303kB subtitle:0kB
> other streams:0kB global headers:0kB muxing overhead: 0.561824%
> size= 1972232kB time=00:28:04.44 bitrate=9591.6kbits/s speed= 378x
>
>
> 4) Successful Playback of the final video and Audio with subtitles using a
> "reinforced" FFplay command - also found on StackOverflow
> https://stackoverflow.com/questions/50175075/can-ffplay-view-subtitles
>
> ffplay -hide_banner -vf subtitles=DVD-09-1993_subtitle.srt
> DV09-1993+srt.mpg
>

isn't this command just uses external srt and

  1   2   3   4   5   6   7   8   9   10   >