jliljebl / flowblade

Video Editor for Linux
GNU General Public License v3.0
2.68k stars 181 forks source link

Some "clicks" rendering video #1088

Open danjde opened 1 year ago

danjde commented 1 year ago

Please include the following information. 1) Flowblade version (Help->About):

2.8.0-2

2) MLT version (Help->Runtime Environment):

6.20.0-2

3) Your distribution (Ubuntu, Debian, Mint etc.):

Ubuntu 20.04

4) If possible, try to provide step-by-step instructions on how to reproduce the issue. From developer point of view this is the easieast way to understand what is happening:

Rendering a video, I get an output video with some "clicks" that are not present in the source video, could it depend by the hardware with which the machine works (I've try from upper level machine but the problem seems the same)?

uname -a
Linux cosmogoniA 5.4.0-109-lowlatency #123-Ubuntu SMP PREEMPT Fri Apr 8 09:52:18 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 23
model name  : Intel(R) Core(TM)2 Quad CPU    Q9550  @ 2.83GHz
stepping    : 10
microcode   : 0xa0b
cpu MHz     : 1999.802
cache size  : 6144 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 4
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm pti tpr_shadow vnmi flexpriority dtherm
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips    : 5665.98
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 23
model name  : Intel(R) Core(TM)2 Quad CPU    Q9550  @ 2.83GHz
stepping    : 10
microcode   : 0xa0b
cpu MHz     : 1999.760
cache size  : 6144 KB
physical id : 0
siblings    : 4
core id     : 1
cpu cores   : 4
apicid      : 1
initial apicid  : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm pti tpr_shadow vnmi flexpriority dtherm
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips    : 5665.98
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 2
vendor_id   : GenuineIntel
cpu family  : 6
model       : 23
model name  : Intel(R) Core(TM)2 Quad CPU    Q9550  @ 2.83GHz
stepping    : 10
microcode   : 0xa0b
cpu MHz     : 1999.762
cache size  : 6144 KB
physical id : 0
siblings    : 4
core id     : 2
cpu cores   : 4
apicid      : 2
initial apicid  : 2
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm pti tpr_shadow vnmi flexpriority dtherm
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips    : 5665.98
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 3
vendor_id   : GenuineIntel
cpu family  : 6
model       : 23
model name  : Intel(R) Core(TM)2 Quad CPU    Q9550  @ 2.83GHz
stepping    : 10
microcode   : 0xa0b
cpu MHz     : 1999.760
cache size  : 6144 KB
physical id : 0
siblings    : 4
core id     : 3
cpu cores   : 4
apicid      : 3
initial apicid  : 3
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm pti tpr_shadow vnmi flexpriority dtherm
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips    : 5665.98
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:
cat /proc/meminfo
MemTotal:        4025160 kB
MemFree:          301016 kB
MemAvailable:     826960 kB
Buffers:           87344 kB
Cached:           656588 kB
SwapCached:        17588 kB
Active:          2368600 kB
Inactive:         941976 kB
Active(anon):    1963980 kB
Inactive(anon):   661724 kB
Active(file):     404620 kB
Inactive(file):   280252 kB
Unevictable:         100 kB
Mlocked:             100 kB
SwapTotal:      25599996 kB
SwapFree:       25328380 kB
Dirty:                24 kB
Writeback:             0 kB
AnonPages:       2553860 kB
Mapped:           474508 kB
Shmem:             59924 kB
KReclaimable:      87912 kB
Slab:             255816 kB
SReclaimable:      87912 kB
SUnreclaim:       167904 kB
KernelStack:       19008 kB
PageTables:        35520 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    27612576 kB
Committed_AS:   10054120 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       52884 kB
VmallocChunk:          0 kB
Percpu:             3984 kB
HardwareCorrupted:     0 kB
AnonHugePages:     18432 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      403008 kB
DirectMap2M:     3790848 kB
hdparm -i /dev/sda

/dev/sda:

 Model=SanDisk SD8SN8U-256G-1006, FwRev=X4120006, SerialNo=172230804051
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=unknown, MaxMultSect=1, MultSect=off
 (maybe): CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=500118192
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=yes: unknown setting WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-4,5,6,7

 * signifies the current active mode
lspci
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 10)
00:01.0 PCI bridge: Intel Corporation 82G33/G31/P35/P31 Express PCI Express Root Port (rev 10)
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 01)
00:1c.3 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 4 (rev 01)
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 01)
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 01)
00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 01)
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 01)
00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] (rev 01)
00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 01)
01:00.0 VGA compatible controller: NVIDIA Corporation G98 [GeForce 8400 GS Rev. 2] (rev a1)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 02)
04:00.0 Multimedia audio controller: Creative Labs EMU10k1 [Sound Blaster Live! Series] (rev 04)
04:00.1 Input device controller: Creative Labs SB Live! Game Port (rev 01)
04:01.0 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 61)
04:01.1 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 61)
04:01.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 63)

Thanks!!!

Davide

jliljebl commented 1 year ago

A few questions:

1) Are clicks at the starts of clips or during playback of a clip?

2) Is there any particular type of (audio) encoding or container format that makes this is happen ,or is the issue unrelated to encoding?

Note that any large enough step like change in audio level is audible as a "click". You can fix those by adding short audio fade ins and/or adding some additional audio to try to make the step like change disappear.

danjde commented 1 year ago
  1. during playback of a clip
  2. the issue is unrelated to encoding (normally several video files of different formats, or audio mp3 of its

Note that any large enough step like change in audio level is audible as a "click". You can fix those by adding short audio fade ins and/or adding some additional audio to try to make the step like change disappear.

Ok, good to know!

Another thing, the clicks were heard even running the video preview before adding it to the timeline, but if the same video was listened by an external player the click was not present.

Many thanks!

jliljebl commented 1 year ago

Ok, I'll this open and look for test cases myself, and see if I can create a reproducible test case for the issue.

danjde commented 1 year ago

If you like I could send you the entire project, via some web transfer services. Eventually, is it possible to export media and project from Flowblade?

NB I point out that the "clicks" problem seems to occur when using large media, in my case just over 2GB, These are present on the monitor side too, while if listened with an external player they are not.

Thanks!

jliljebl commented 1 year ago

If you like I could send you the entire project, via some web transfer services. Eventually, is it possible to export media and project from Flowblade?

We had a feature for this, but that was never 100% reliable in my view so I dropped it.

There is going to be new approach to saving rendered data, we'll be saving data per project, not all data for all projects in same place like currently. After that lands, we can very likely make projects movable with all their data again, and with much better changes of getting the feature absolutely right.

NB I point out that the "clicks" problem seems to occur when using large media, in my case just over 2GB, These are present on the monitor side too, while if listened with an external player they are not.

2 GB is about largest amount I'd like to download, so if the project file with all its files that size I can download that, otherwise I can download just the file, and you could give so additional info that would help reproducing the issue (Project Profile, where in the file the issue was, etc.).

danjde commented 1 year ago

Hi jliljebl and thanks for your help, I've upload a single 2.2GB video (.ts) and you can simply import it into an empty project, then play it from media monitor from 00:47:50:14 to 00:49:56:03 (for example). I have observed same behaviour inserting it into timeline, separating audio tracks, muting primary video audio, and leaving active only separate audio, the problem is the same.

Here the media: https://www.transfernow.net/dl/20230615t9ZtlEsV

jliljebl commented 1 year ago

Ok, Thanks, I got the file, and there are additional clicks appearing.

I looked at the audio in Audacity trying to find the artifacts in the waveforms, but I was unable to find anything different between the original and rendered audio waveforms in visual inspection.

This could be relatively difficult to get fixed, but it does reproduce, we'll keep at it and hopefully get it done.

danjde commented 1 year ago

Well, as workaround I've exported from "video ts" audio stream and import it into Flowblade (muting corresponding video/audio part), this works fine. I've seen that Pitivi video editor suffers from the same problem. Thanks!