salsaman / LiVES

LiVES is a feature rich application which combines elements of VJ and video editing software. The current version runs on Linux / BSD. Check_out_the_new_discussion_area https://github.com/salsaman/LiVES/discussions
http://lives-video.com
GNU General Public License v3.0
89 stars 11 forks source link

Small video sound works but video scrambled #47

Open bkauler opened 2 years ago

bkauler commented 2 years ago

First, just a note about a message when start lives from a terminal, about an invalid effect:

# lives

LiVES 3.2.1-pre
Copyright 2002 - 2021 Gabriel Finch (salsaman+lives@gmail.com) and others.
LiVES comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details.

LiVES info: Invalid effect farneback_analyserfarneback_analysersalsaman1 found in compound effect image_stabilizer, line 4

LiVES info: Invalid effect farneback_analyserfarneback_analysersalsaman1 found in compound effect motion_analyser, line 4

flv_decoder: info - frame size=198 x 154, pixel size=192 x 154

That last line is after opening the small video. In the File Open dialog window, the video can be previewed, and plays both audio and video correctly. After opening, all the video frames look scrambled like this:

lives-broken-video

The video file is only 127KB, so I should be able to attach it. I don't know whether can attach a .flv file, so have appended a false ".gz" onto the filename:

20051210-w50s_56K.flv.gz

bkauler commented 2 years ago

Note, I am still using the code from Jan 2, haven't tested your latest Jan 4 commits.

salsaman commented 2 years ago

The effect message is just for info. farneback is only built if opencv-dev is found at build time. It's quite an interesting effect, - it divides the frame into a grid and produces a motion vector at the centre of each grid area, using an optical flow method. The output (x,y) vectors are delivered as two float alpha channels The first out channel holds the x values, the second, the y values, with dimensions of both equal to the grid size. These alpha channels can then be chained to other data effects, or used in a compound effect such as image_stabilizer or motion_analyser.

The info message is just informing that this component of the compound effects was not available, thus the compound will not be loaded.

salsaman commented 2 years ago

For the flv issue, can you please confirm something - the values indicated suggest there is a 3 pixel vertical border on the left and a 3 pixel border on the right. Can you confirm whether or no that is the case, e.g. by playing the clip in another player.

salsaman commented 2 years ago

It's possible the calculation is wrong and the 3 pixel border should be inside the 192 pixel frame width, rather than around it.

salsaman commented 2 years ago

You may also try going into Preferences / Decoding and enabling "Ignore Blank Borders when Possible" to see if it makes any difference.

bkauler commented 2 years ago

Yes, enabling "Ignore blank borders when possible" fixes the video.

From the video frames viewed in lives, it looks like vertical borders on both sides, inside the frame.

I also opened the video in Avidemux and it plays perfectly, doesn't show anything about there being vertical borders. This is the info Avidemux shows about the file:

===================================================== Video

Codec 4CC: VP6F Image Size: 192 x 154 Aspect Ratio: 1:1 (1:1) Frame Rate: 10.000 fps Average Bitrate: 41 kbps Total Duration: 00:00:17.000

===================================================== Video Codec Extradata

Size: 0

===================================================== Audio (1 active track)

Codec: MP3 Channels: Mono Bitrate: 8000 Bps / 64 kbps Frequency: 11025 Hz Total Duration: 00:00:16.822

Whereas, lives is showing the frames as 198x154.

salsaman commented 2 years ago

Yes, it seems to be finding a wrong caclulation somewhere, adding offset to pixel size to get frame_size, instead of subtracting offset from frame_size to get the pixel size.

salsaman commented 2 years ago

It would be useful if you can also upload this clip.

bkauler commented 2 years ago

It would be useful if you can also upload this clip.

I did, see above, file 20051210-w50s_56K.flv.

salsaman commented 2 years ago

OK, missed that too. Can confirm what you reported, in this case as with the bigbunny clip, the audio is speeding ahead of the video. In this case it is mono audio up mixed to stereo. Need to figure this one out too.

salsaman commented 2 years ago

Fixed: a0909c5ecc92902d3b7e3682cb64ad0e138fe19e

Related audio issues fixed too: 0fa428e162f388f2b82ca03f2ace73f56191dcc0

salsaman commented 2 years ago

Still needs a minor update, however. If "ignore blank borders" is switched on, then decoded frames will be saved without the borders, however if it is later enabled, they will be saved with the borders, leading to differences in the clip.

I need to figure out how to handle this.

salsaman commented 2 years ago

Ah yes, I see what it is now. In this case for example, the original frame is 186 X 154, however the border is added during encoding to make the width a multiple of 16, (22 * 16 = 192), which seems to be a requirement for the vp6(a) format used by .flv.

Since that is not a general requirement for LiVES, what should actually happen is:

salsaman commented 2 years ago

Done, except for the final point: faa9b2197c7fc9f8facfef506956a0d862a0c813

I think it maybe possible to set the frame size by passing -s option to ffmpeg, will need to test.

bkauler commented 2 years ago

I have included the latest LiVES in EasyOS version 3.2:

https://bkhome.org/news/202201/easyos-version-32-released.html

When I untick "Automatic trimming/padding of audio when possible" and open that flv file, video shows as 17.00 seconds but audio is still shorter, 5.95 seconds. So when play, it only plays until the audio ends, doesn't play the entire video.

When that checkbox is ticked, only get silence. Using your latest source, Jan. 8.

I just tested again in Avidemux, it plays the entire video.

salsaman commented 2 years ago

Are you still using mpv ? Is the audio playing at the correct rate, or does it seem speeded up ? Please try again with setting $DEBUG_OPEN in smogrify, and check the format of the commandline being passed.

salsaman commented 2 years ago

Great that you added it to EasyOS. Just one small favour to ask...would you mind changing the menu description to "Video Editor / VJ tool" ?

bkauler commented 2 years ago

Great that you added it to EasyOS. Just one small favour to ask...would you mind changing the menu description to "Video Editor / VJ tool" ?

OK, done.

bkauler commented 2 years ago

Are you still using mpv ? Is the audio playing at the correct rate, or does it seem speeded up ? Please try again with setting $DEBUG_OPEN in smogrify, and check the format of the commandline being passed.

No, it is not speeded up, the audio is truncated to 5.96 seconds, and that's where it stops playing.

EasyOS tries to be the smallest possible download, currently 581MB, so cannot have both mpv and mplayer builtin, too much bloat. If I have to use lives with mplayer, then will not be able to include it builtin, it will have to be installable via the package manager.

I'm not sure if the source I downloaded has your very last commit yesterday. Perhaps that is important.

bkauler commented 2 years ago

Here is the result opening that flv with $DEBUG_OPEN=1:

onMetaData:mixedarray
duration:16.900000
width:192.000000
height:154.000000
videodatarate:40.000000
framerate:10.000000
videocodecid:4.000000
audiodatarate:16.000000
audiodelay:0.000000
audiocodecid:2.000000
canSeekToEnd:1.000000
creationdate:Fri Feb 03 12:25:53 2006

:video type is vp6f 192 x 154 (0 x 0 +3 +0)
using palette 512, size 186 x 154
fps is 10.0000 170
flv_decoder: info - frame size=192 x 154, pixel size=186 x 154
vid open command for 685640289 is: 
aud open command for 685640289 is: LANGUAGE=en LANG=en /usr/bin/mpv --no-config --quiet --no-video --vd-lavc-threads=4   --frames=171   --ao=pcm --ao-pcm-waveheader=no --audio-format=s16 --audio-channels=1 "/mnt/sda1/temp8/20051210-w50s_56K.flv" 

Have still got "Automatic trimming/padding of audio when possible" unchecked. Also "ignore blank borders when possible" is unchecked, but video looks ok now.

bkauler commented 2 years ago

And attached is the audiodump.pcm, with false ".gz" appended: audiodump.pcm.gz

salsaman commented 2 years ago

I would be quite interested to see what dependencies you have for the package. For reference:

1) Mandatory dependencies include at least: Build

GTK+ (>=3.0.0) + development libs [>= 3.24.0 preferred] gdk-pixbuf-loaders + development libs gettext + development libs

Runtime

mplayer (preferred), mplayer2, or mpv with jpeg/png output support ffmpeg with jpeg/png input support (preferably with x264 support) imageMagick perl sox (with libsox-fmt-all if applicable !)*

2) Highly Recommended build-dependencies include (devel versions of): libpulse, libjack, ffmpeg, mjpegtools, libogg, libtheora, libdv, libraw1394, libavc1394, libunicap, (libavcodec, libavformat, libavutils, libswscale) or (ffmpeg-libs), libpng, libasound2, libX11, libXrender, libGL, libfftwf3.

(For compiling you should have development versions of these libraries installed. Check the output of ./configure carefully for missing optional dependencies.)

Optional: openCV, LADSPA headers, frei0r-devel, projectM.

3) Highly Recommended runtime dependencies include: python, libtheora-bin, ffprobe, xwininfo, wmctrl, mkvtoolnix, vorbis-tools, libmatroska, ogmtools, dvgrab, frei0r-plugins, libdv2-apps/libdv-bin, cdda2wav/icedax, lame, ffmpeg, x264.

If you like I can add you to the packagers list, so you will receive an email whenever a new version is released. Just let me know what email address you prefer.It's also a good means to communicate critical packages following each release.

salsaman commented 2 years ago

If you still have an option "Ignore blank borders..." in prefs, then you are not using the latest code. Please update and test again.

bkauler commented 2 years ago

If you still have an option "Ignore blank borders..." in prefs, then you are not using the latest code. Please update and test again.

Oh, OK, will update tonight.

These are dependencies of ffmpeg, lives and mpv, from the package database. They are all there, with development libs at compile-time, and run-time component at run-time:

ffmpeg-4.3.1-r6
+alsa-lib,+bzip2,+faac,+faad2,+fontconfig,+freetype,+gcc-runtime,+glibc,+jack,
+lame,+liba52,+libbluray,+libcdio,+libcdio-paranoia,+libdc1394,+libdrm,
+libmad,+libmng,+libmodplug,+libogg,+libsdl,+libsdl-image,+libsdl-mixer,
+libsndfile1,+libtheora,+libva,+libvdpau,+libvorbis,+libvpx,+libwebp,
+libxcb,+libxv,+mesa,+mpeg2dec,+opencore-amr,+openjpeg,+openssl,+orc
,+schroedinger,+speex,+taglib,+unzip,+v4l-utils,+wavpack,+x264,+x265,
+xvidcore,+xz,+zip,+zlib

lives-20220108-r6
+alsa-lib,+bzip2,+cups,+cups-filters,+ffmpeg,+fftw,+gcc-runtime,+ghostscript,+glib-2,
+glibc,+gtk+3,+imagemagick,+libdv,+libebml,+libjpeg-turbo,+libmatroska,+libogg,
+libpng,+libsdl,+libsdl-gfx,+libsdl-mixer,+libsdl-ttf,+libtheora,+libtirpc,+libx11,
+libxrender,+mesa,+mjpegtools,+mpv,+orc,+pulseaudio,+schroedinger,+sox,
+unicap,+v4l-utils,+zlib

mpv-0.34.1-r6
+alsa-lib,+desktop-file-utils,+faac,+faad2,+ffmpeg,+flac,+fontconfig,+freetype,+gcc-runtime,
+gdk-pixbuf,+glibc,+jack,+lame,+lcms,+liba52,+libarchive,+libass,+libavc1394,
+libbluray,+libcddb,+libcdio,+libcdio-paranoia,+libdc1394,+libdrm,+libdvdcss,
+libdvdnav,+libdvdread,+libglu,+libjpeg-turbo,+libmad,+libmng,+libmodplug,
+libogg,+libpng,+libraw1394,+librsvg,+libsamplerate0,+libsdl,+libsdl-image,
+libsdl-mixer,+libsdl-ttf,+libtheora,+libva,+libvdpau,+libvorbis,+libvpx,+libwebp
,+libx11,+libxcb,+libxext,+libxinerama,+libxscrnsaver,+libxv,+libxvmc,+lua,
+luajit,+mesa,+mpeg2dec,+mpg123,+openssl,+pulseaudio,+schroedinger,
+speex,+taglib,+v4l-utils,+vcdimager,+wavpack,+x264,+x265,+xvidcore,+zlib
bkauler commented 2 years ago

Here is a list of every run-time package in latest EasyOS:

915resolution|0.5.3-patched_20120521-pyro64 Dropbox_GUI|0.3.1-1 EasyApps|3.1.1 Pup-SysInfo|2.8.6 PupControl|3.2.1 UrxvtControl|1.3 acl|2.2.53-r6 acpid|2.0.32-r6 adbfs|20180720+gitAUTOINC+a8e1c7f4b5-r6 align|1.7.5 alsa-lib|1.2.1.2-r6 alsa-plugins|1.2.1-r6 alsa-utils|1.2.1-r6 android-tools|5.1.1.r37-r6 appstream-glib|0.5.13-r6 apr|1.7.0-r6 apr-util|1.6.1-r6 arp-scan|1.9-r6 aspell|0.60.8-r6 at-spi2-atk|2.34.1-r6 at-spi2-core|2.34.0-r6 atk|2.34.1-r6 atkmm|2.28.0-r6 attr|2.4.48-r6 audacious|3.10.1-r6 audacious-plugins|3.10.1-r6 aufs-util|4.9+gitAUTOINC+8f35db59ef-r6 babl|0.1.74-r6 bacon-hug|0.109-r6 bash|5.0-r6 bbc-provided|2003-r6 bbe|0.2.2-r6 bc|1.07.1-r6 bdftopcf|1.1-r6 bdwgc|8.0.4-r6 bluepup-tray|20160922-r6 bluez-tools|2.0-20170911-r6 bluez5|5.62-r6 bones|0.3.1 boost|1.72.0-r6 brlaser|7-pre-r6 busybox|1.32.0-static-amd64 bzip2|1.0.8-r6 ca-certificates|20211016-r6 cairo|1.16.0-r6 cairomm|1.12.0-r6 ccrypt|1.11-r6 cddetect|2.1-1-r6 cddetect-quick|2008-1-r6 cdrkit|1.1.11-r6 celluloid|0.21-r6 cgtkcalc|2.2.4-r6 chrpath|0.16-r6 cifs-utils|6.14-r7 coreutils|8.31-r6 cpio|2.13-r6 cppunit|1.15.1-r6 cryptodev-linux|1.10-r6 ctorrent|3.3.2-r6 cups|2.3.1-r7 cups-filters|1.28.3-1-dunfell64 cups-filters_DEV|1.28.3-1-dunfell64 cups_pdf|0.8-2 curl|7.69.1-r6 curlftpfs|0.9.2-r6 db|1_5.3.28-r1 dbus|1.12.20-r6 dbus-glib|0.110-r6 debianutils|4.9.1-r6 defaults-chooser|0.9.2-1 desk_background_deepblueband|20190118 desk_background_easyblue|20180430 desk_background_easyos_darkblue|20211022 desk_background_nighticemoon|20211023 desk_icon_theme_easyblue|20180430 desk_icon_theme_lagabluenight2|20190119 desk_icon_theme_multicolor_marble|2 desk_icon_theme_quirky72green|20171205 desktop-file-utils|0.24-r6 dhcpcd|8.1.6-r6 dia|0.97.3-r6 dialog|1.3-20190808-r7 dictd_client|1.12.1-april64 didiwiki|0.8-r6 diffstat|1.63-r6 diffutils|3.7-r6 disktype|9-patched-ext4-f2fs-exfat-r6 dmidecode|3.2-r6 dnsmasq|2.81-r6 dosfstools|4.1-r6 double-conversion|3.1.5-r6 dpkg|1.19.7-r6 dvd+rw-tools|7.1-r6 dvd-close|7.1-2014-r6 dvdauthor|0.7.2-r6 e2fsprogs|1.45.7-r6 ed|1.15-r6 elfutils|0.178-r6 ell|0.33-r6 empty|0.6.20b-r6 enca|1.9-r6 enchant2|2.2.8-r6 encodings|1_1.0.5-r2.1 ethtool|5.4-r6 eudev|3.2.9-r6 evince|2.32.0-p20161004-r6 exfat-utils|1.3.0-r6 exiv2|0.27.3-r6 expat|2.2.9-r6 f2fs-tools|1.13.0-r6 faac|1.29.9.2-r6 faad2|2.8.8-r6 ffconvert|1.4.2-1 ffmpeg|4.3.1-r6 fftw|3.3.8-r6 file|5.39-r6 findutils|4.7.0-r6 firefox-skel-ask|20220107 firmware_asus_e200ha|20160324-k4.4.6 firmware_linux_acer_aspire1|5.2-20190813 firmware_linux_all_k5p10|20201223 firmware_linux_base|4.13 firmware_linux_mele_pcg35|20170927 flac|1.3.3-r6 floppy-format-noarch|20190203 flsynclient|0.6-patched3-r6 fltk|1.3.5-r6 font-util|1.3.2-r6 font_opensans_semibold_bold|20131214-1 fontconfig|2.13.1-r6 foomatic-db-compressed-ppds|20200820-debian-noarch formfactor|0.0-r45 fpm2|0.79-r6 freememapplet-tray|2.6-r6 freetype|2.10.1-r6 fribidi|1.0.9-r6 fuse|2.9.9-r6 galculator|2.1.4-r6 gawk|5.0.1-r6 gcc-runtime|9.3.0-r6 gcolorsel|1.0.0-r6 gconf|3.2.6-r6 gcr|3.34.0-r6 gdbm|1.18.1-r6 gdk-pixbuf|2.40.0-r6 gdl|3.34.0-r6 gdmap|0.8.1-r6 geany|1.36-r6 gegl|0.4.22-r6 gexiv2|0.12.1-r6 gfnrename|0.6-pi18n-r6 gfontsel|1.0.0-r6 gftp|20210407-r7 ghostscript|9.20-r6 gif2lss|0.4-r6 giflib|5.1.4-r6 gifsicle|1.88-r6 gimp|2.10.18-r6 glew|2.2.0-r6 glib-2.0|1_2.62.6-r6 glib-networking|2.62.4-r6 glibc|2.33-r6 glibc-locale|2.33-r6 glibmm|2.62.0-r6 glipper-lite|2013-technosaurus-r6 glm|0.9.9.6-r6 gmeasures|0.7-pi18n-r6 gmp|6.2.0-r6 gnet|2.0.8-r6 gnome-bluetooth|3.34.1-r6 gnome-doc-utils-stub|1.0-r6 gnome-keyring|3.34.0-r6 gnome-menus|2.14.3-r6 gnupg|2.2.27-r6 gnutls|3.6.14-r6 gobject-introspection|1.62.0-r6 gpart|0.1h-r6 gparted|1.1.0-r6 gpgme|1.13.1-r7 gphoto2|2.5.23-r6 gphotofs|0.5-r6 gpicview|0.2.5-r6 gpptp|2.0-jafadmin-r6 gpptp-noarch|2.0-jafadmin-20210615 gptfdisk|1.0.4-r6 graphite2|1.3.14-r6 grep|3.4-r6 grub|2.04-r6 grub-efi|2.04-r6 grub4dos|0.4.4.v1.9.3-easy2 gsettings-desktop-schemas|3.36.0-r6 gsl|2.6-r6 gspell|1.8.3-r6 gtk+|2.24.32-r9 gtk+3|3.24.14-r6 gtk-chtheme|0.3.1-r6 gtk_theme_citrus_cut|1.2 gtk_theme_easyblue|20180430 gtk_theme_flatbluecontrast|2 gtk_theme_flatbluetinge|20170710 gtk_theme_gradient_grey|1.2 gtk_theme_quirky72green|1 gtkdialog|0.8.4pre-svn514-r8 gtkhash|1.2-r6 gtklp|1.3.3-r6 gtkmm3|3.24.2-r6 gtksourceview2|2.10.5-r6 gummiboot|20150311-1-xerus64 gutenprint|5.3.3-r6 gview|0.9.1a-r6 gwhere|20210113-r6 gxlat|0.4 gxmessage|2.20.4-r6 gzip|1.10-r6 hardinfo|20150425-fd-r6 harfbuzz|2.6.4-r6 hdparm|9.58-r6 helpsurfer|0.6-r6 hiawatha|10.10-r6 hicolor-icon-theme|0.17-r6 homebank|5.5.3-r6 hostname|3.21-r6 hotplug2stdout|1.2.1-r6 hplip|3.19.12-r6 hunspell|1.7.0-r6 hunspell-en-au|3 hunspell-en-gb|3 hunspell-en-us|3 hyphen|2.8.8-r6 iceauth|1.0.8-r6 iconfinder|1.4 icu|66.1-r6 ifplugd|0.25-r6 ifplugd-old|0.18-r6 ijs|0.35-r6 imagemagick|7.0.9_13-r6 inkscape|1.1.1-r6 inotify-tools|3.20.2.2-r6 installwatch|0.7.0beta7-p1-r6 intltool|0.51.0-r6 iotop|0.6+gitAUTOINC+1bfb3bc70f-r6 iproute2|5.5.0-r6 iptables|1.8.4-r6 iso-codes|4.4-r6 isomaster|1.3.13-r6 iw|5.4-r6 jansson|2.13.1-r6 jasper|2.0.16-r6 jimtcl|0.77-r6 json-c|0.13.1-r6 json-glib|1.4.4-r6 jwm|2.4.0-r7 jwm3_theme_brightdeepblue|20170710-2 jwm3_theme_deepbluebold|20190123 jwm3_theme_easyblue|20180501 jwm3_theme_quirky72green|20171027 jwm3_theme_slate|20171027 keyutils|1.6.1-r6 kmod|26-r6 ktsuss|20140304-r6 lame|3.100-r6 lcms|2.9-r6 leafpad|0.8.15-r7 less|551-r6 liba52|0.7.4-r4 libabw|0.1.3-r6 libaio|0.3.111-r6 libao|1.2.0-r6 libarchive|3.4.2-r6 libart-lgpl|2.3.21-r8 libass|0.14.0-r6 libassuan|2.5.3-r6 libatomic-ops|7.6.10-r6 libavc1394|0.5.4-r6 libbluray|1.0.2-r6 libbsd|0.10.0-r6 libcamera|20211028-dunfell64 libcamera_DEV|20211028-dunfell64 libcanberra|0.30-r6 libcap|2.45-r6 libcap-ng|0.8.1-r6 libcddb|1.3.2-r6 libcdio|2.1.0-r6 libcdio-paranoia|10.2+0.93+1-r6 libcdr|0.1.7-r6 libcec|5.0.0-r6 libcgi-perl|4.46-r6 libcmis|0.5.2-r6 libcroco|0.6.13-r6 libdaemon|0.14-r6 libdbd-mysql-perl|4.050-r6 libdbi-perl|1.643-r6 libdc1394|2.2.6-r6 libdigest-sha1-perl|2.13-r6 libdmx|1_1.1.4-r6 libdrm|2.4.107-r6 libdv|1.0.0-r6 libdvdcss|1.4.0-r6 libdvdnav|5.0.3-r6 libdvdread|6.1.1-r6 libe-book|0.1.3-r6 libebml|1.3.0-r6 libedit|20191231-3.1-r6 libepoxy|1.5.4-r6 libetonyek|0.1.9-r6 libevdev|1.8.0-r6 libevent|2.1.11-r6 libexif|0.6.22-r6 libexif-gtk|0.4.0-r6 libexttextcat|3.4.5-r6 libexttextcat-data|3.4.4-all libffi|3.3-r6 libfontenc|1_1.1.4-r6 libfreehand|0.1.2-r6 libgcc|9.3.0-r6 libgcrypt|1.8.5-r6 libgd|2.2.4-r6 libgee|1_0.20.3-r6 libglade|2.6.4-r6 libgltf|0.0.2-r6 libglu|2_9.0.1-0 libgnomecanvas|2.30.3-r6 libgnomekbd|3.26.1-r6 libgpg-error|1.37-r6 libgphoto2|2.5.25-r6 libgsf|1.14.47-r6 libgtkhtml|2.12-r7 libgtop|2.40.0-r6 libgudev|233-r6 libhtml-parser-perl|3.72-r6 libical|3.0.11-r6 libice|1_1.0.10-r6 libid3tag|0.15.1b-r7 libidl|0.8.14-r6 libidn|1.35-r6 libidn2|2.3.0-r6 libjpeg-turbo|1_2.0.4-r6 libksba|1.3.5-r6 liblangtag|0.6.3-r6 libmaa|1.3.2-r6 libmad|0.15.1b-r3 libmatroska|1.4.1-r6 libmikmod|3.3.11.1-r6 libmng|2.0.3-r6 libmnl|1.0.4-r6 libmodplug|0.8.9.0-r6 libmpc|1.1.0-r6 libmspub|0.1.4-r6 libmtp|1.1.17-r6 libmwaw|0.3.17-r6 libmypaint|1.4.0-r6 libndp|1.7-r6 libnewt|0.52.21-r6 libnl|1_3.5.0-r6 libnotify|0.7.8-r6 libnsl2|1.2.0+gitAUTOINC+4a062cf418-r6 libodfgen|0.1.7-r6 libofx|0.10.3-r6 libogg|1.3.4-r6 libpagemaker|0.0.4-r6 libpcap|1.9.1-r6 libpciaccess|0.16-r6 libpcre|8.44-r6 libpcre2|10.34-r6 libpipeline|1.5.2-r6 libpng|1.6.37-r6 libpng12|1.2.57-r6 libproxy|0.4.15-r6 libpsl|0.21.0-r6 libpthread-stubs|0.4-r6 libraw1394|2.1.2-r6 libreoffice|7.1.3.2-r6 librevenge|0.0.4-r6 librsvg|2.40.21-r6 libsamplerate0|0.1.9-r1 libsdl|1.2.15-r3 libsdl-gfx|2.0.25-r6 libsdl-image|1.2.12-r6 libsdl-mixer|1.2.12-r6 libsdl-ttf|2.0.11-r6 libsdl2|2.0.12-r6 libseccomp|2.3.3-r6 libsecret|0.20.1-r6 libsigc++-2.0|2.10.3-r6 libsm|1_1.2.3-r6 libsndfile1|1.0.28-r6 libsoup-2.4|2.68.4-r6 libssh2|1.9.0-r6 libsystem|0.3.1-r6 libtalloc|2.3.0-r6 libtasn1|4.16.0-r6 libtdb|1.4.3-r6 libtevent|0.10.1-r6 libtheora|1.1.1-r1 libtirpc|1.2.6-r6 libtool|2.4.6-r6 libtubo|4.5.2-r6 libunistring|0.9.10-r6 liburcu|0.11.1-r6 liburi-perl|1.74-r6 libusb-compat|1_0.1.5-r6 libusb1|1.0.22-r6 libva|2.6.1-r6 libvdpau|1.3-r6 libvdpau-va-gl|0.4.2-r6 libvisio|0.1.7-r6 libvorbis|1.3.6-r6 libvpx|1.8.2-r6 libwebp|1.1.0-r6 libwpd|0.10.3-r6 libwpg|0.3.3-r6 libwps|0.4.9-r6 libx11|1_1.6.9-r6 libxau|1_1.0.9-r6 libxaw|1_1.0.13-r2 libxcb|1.13.1-r6 libxcomposite|1_0.4.5-r6 libxcrypt|4.4.15-r6 libxcursor|1_1.2.0-r6 libxdamage|1_1.1.5-r6 libxdmcp|1_1.1.3-r6 libxext|1_1.3.4-r6 libxfixes|1_5.0.3-r6 libxfont|1_1.5.4-r6 libxfont2|2.0.4-r6 libxft|1_2.3.3-r6 libxi|1_1.7.10-r6 libxinerama|1_1.1.4-r6 libxkbcommon|0.10.0-r6 libxkbfile|1_1.1.0-r6 libxklavier|5.4-r6 libxml-parser-perl|2.46-r6 libxml-simple-perl|2.25-r6 libxml2|2.9.10-r6 libxmu|1_1.1.3-r6 libxpm|1_3.5.13-r6 libxrandr|1_1.5.2-r6 libxrender|1_0.9.10-r6 libxscrnsaver|1_1.2.3-r6 libxshmfence|1.3-r6 libxslt|1.1.34-r6 libxt|1_1.2.0-r6 libxtst|1_1.2.3-r6 libxv|1.0.11-r6 libxvmc|1_1.0.12-r6 libxxf86vm|1_1.1.4-r6 linux_kernel|5.10.90-dunfell64 litehtml|20211117-r6 lives|20220108-r6 lmarbles|1.0.8-1-pyro64 lockdev|1_1.0.3-r6 lpsolve|5.5.2.5-r6 lrzsz|0.12.20-r6 lttng-ust|2_2.11.2-r6 lua|5.3.6-r6 luajit|2.1.0~beta3-r6 lz4|1_1.9.2-r6 lzo|2.10-r6 maag|1.6-1 makedepend|1_1.0.6-r6 man-db|2.9.0-r1 mbedtls|2.16.6-r6 mdds-1.2|1.3.1-r6 mdds-1.5|1.5.0-r6 mdview|20160622-r6 memtester|4.3.0-r6 mesa|2_20.0.2-r8 mesa-demos|8.4.0-r6 metamail|2.7-p54-r6 mhwaveedit|1.4.23-r6 mingetty|1.08-r3 minibase-net|20190218-p1-amd64 minicom|2.7.1-r6 minixcal|1.1.1-r6 mirdir|2.1-r7 mjpegtools|2.2.1-r6 mkfontscale|1.2.1-r6 mobile-broadband-provider-info|1_20201225-r6 modem-stats|1.0.1-r6 mped|3.3.17-r6 mpeg2dec|0.5.1-r6 mpfr|4.0.2-r6 mpg123|1.25.13-r6 mplayer_codecs_basic|20071007-oe-x86_64 mpscan|0.1.0-r6 mpv|0.34.1-r6 mtdev|1.1.6-r6 mtools|4.0.23-r6 mtpaint|3.49.12-r6 mtr|0.92-pyro64 mythes|1.2.4-r6 nbtscan|1.0.35-r6 ncurses|6.2-r6 nenscript|1.13.3-r6 neon|0.31.2-r6 netpbm|10.73.33-r7 nettle|3.5.1-r6 network-manager-applet|1.8.20-r6 network-tray|3.4-r7 networkmanager|1.22.10-r10 nmap|7.80-r6 normalize|0.7.7-r7 notecase|1.9.8-p1-r7 notification-daemon|3.20.0-r6 npth|1.6-r6 nspr|4.29-r6 nss|3.60-r6 ntfs-3g-ntfsprogs|2017.3.23-r6 ntp|4.2.8p15-r6 numlockx|1.2-r6 obexfs|0.12-r6 obexftp|0.24.2-r6 obs|26.1.2-r6 ofono|1.31-r6 opencore-amr|0.1.3-r6 openjpeg|2.3.1-r6 openldap|2.4.57-r6 openobex|1.7.2-r6 opensp|1.5.2-r6 openssh|8.2p1-r6 openssl|1.1.1l-r6 opkg-utils|0.4.2-r6 orc|0.4.31-r6 osmo|0.2.10-r6 p11-kit|0.23.22-r6 p8platform|2.1.0.1-r6 pa-applet|20211106-p2-dunfell64 pango|1.42.4-r6 pangomm|2.42.1-r6 parted|3.3-r6 patch|2.7.6-r6 pavucontrol|4.0-r6 pbackup|3.1.9-1 pburn3|3.7.18 pcd|1.5 pcdripper|3.9.4-1 pciutils|3.6.4-r6 pclock|0.8.2-1 pctorrent|1.7a-1 pdvdrip|1.0.0-1 peasydisc|3.7 peasyglue|1.9 peasypdf|4.1 peasyport-noarch|2.2 peasyprint|2.8 peasyscale-exec|1.4-r6 peasyscale-noarch|1.8 peasyscan-exec|1.0.14-r7 peasyscan-noarch|2.12-1 perl|5.30.1-r6 perl-net-ident|1.24-perl5.24.1 pfilesearch|2.2 pfind|6.3-1 pflask|20180925-r6 phash|2 picpuz|2.4-pyro64 picscale|0.1c-pyro64 pidgin|2.13.0-r6 pinentry|1.1.0-r6 pipewire|0.3.39-dunfell64 pipewire_DEV|0.3.39-dunfell64 pixman|1_0.38.4-r6 pkgconfig|0.29.2+gitAUTOINC+edf8e6f0ea-r6 planner|0.14.6-r7 pm-utils|1.4.1-r1 pmcputemp|1.2-dunfell64 pmetatagger|2.1 pmirror|0.6.2-1 pmirrorget|0.2.1-1 pngoverlay-cairo|20190623-r6 pnscan|1.11-r6 pointercal-xinput|0.0-r7 poppler|0.88.0-r6 popt|1.16-r3 potrace|1.16-r6 powerapplet-tray|3.0-r6 pplog|1.1.3-2 ppp|2.4.7-r6 pprocess|2.3.2 pptp-linux|1.10.0-r6 precord|9.0.3-1 prename|0.7a printer-driver-samsung|1.00.39-1-amd64 procps|3.3.16-r6 programchooser|0.3 prun|1.3-1 pschedule|1.1.6-3 psmisc|23.3-r6 ptooltips|0.2-1 pulseaudio|13.0-r6 pup-tools|20211013-r6 puppy-podcast-grabber|1.3 puppyinputdetect|1.1i-r6 puppyserialdetect|1.1h-r6 pupradio|0.23-1 pupx|0.4 pure-ftpd|1.0.49-r6 pwsget|0.1-1 python3-dbus|1.2.16-r6 python3-prctl|1.7+gitAUTOINC+57cd0a7cad-r6 python3-pycairo|1.19.0-r6 python3-pygobject|3.34.0-r6 qpdf|10.0.1-r6 qt5-styleplugins|20170311-r6 qtbase|5.14.2+gitAUTOINC+3a6d8df521-r6 qtdeclarative|5.14.2+gitAUTOINC+23a000f9a1-r6 qtscript|5.14.2+gitAUTOINC+bdf42faf19-r6 qtsvg|5.14.2+gitAUTOINC+63961dd0c7-r6 qttools|5.14.2+gitAUTOINC+9d5d92a492-r6 qtx11extras|5.14.2+gitAUTOINC+fbed3bc300-r6 qtxmlpatterns|5.14.2+gitAUTOINC+45bf71199c-r6 quota|4.05-r6 raptor2|2.0.15-r6 rasqal|0.9.33-r6 read-edid|3.0.2-r6 readline|8.0-r6 redland|1.0.17-r6 redshift|1.11-dunfell64 refind|0.12.0-r6 restarter|20190208-r6 rgb|1_1.0.6-r6 rox-filer|20181104-r7 rp-pppoe|3.13-r10 rpcbind|1.2.5-r6 rpcsvc-proto|1.4+gitAUTOINC+9bc3b5b785-r6 rpm|1_4.14.2.1-r6 rshift_tray|20220102 rsync|3.1.3-r6 rubix|1.0.6-r6 rxvt-unicode|9.22-r8 sakura|2.4.2-r7 samba|4.10.18-r8 sane-backends|1.0.27-r6 sbc|1.4-r6 scale2x|4.0-r6 schroedinger|1.0.11-r6 scribus|1.5.7-r6 seamonkey|2.53.10.2 seamonkey_addon_github-wc-polyfill|1.2.9 sed|4.8-r6 serf|1.3.9-r6 setcolortemperature|20210313-r6 setserial|2.17-r3 setvol|1.1-r6 setxkbmap|1_1.3.2-r6 sgml-common|0.6.3-r6 shared-mime-info|1.15-r7 simple-mtpfs|0.4.0-buster64 slang|2.3.2-r6 smbnetfs|0.6.1+gitAUTOINC+a117eec8de-r6 socat|1.7.3.4-r6 solvespace|3.0full-r6 sox|14.4.2-r6 speex|1.2.0-r6 speexdsp|1.2.0-r6 sqlite3|3_3.31.1-r6 squashfs-tools|4.4-r6 ssh-gui|0.7.1-r6 sshfs-fuse|2.10-r6 sshpass|1.06-r6 startup-notification|0.12-r2 stat|3.3-r6 streamripper|1.64.6-r6 sudo|1.8.32-r6 swig|3.0.12-r6 sysfsutils|2.1.0-r5 syslinux|6.04-pre2-r1 syslinux6_modules_efi|6.0.3 sysvinit|2.96-r6 taglib|1.11.1-r6 tar|1.32-r6 tas|1.13 tcp-wrappers|7.6-r10 tiff|4.1.0-r6 tzdata|2021e-r6 ufiformat|0.9.9-r6 uget|1.8.2-r6 unclutter|8-r6 unicap|0.9.12-r6 unifont|11.0.03 unrar|3.9.9-r6 unzip|1_6.0-r5 usb-modeswitch|2.6.0-r6 usb-modeswitch-data|20191128-r6 usbutils|012-r6 usbview|2.0-r6 util-linux|2.35.1-r6 util-macros|1_1.19.2-r6 v4l-utils|1.18.1-r6 vamps|0.99.2-r6 vcdimager|2.0.1-r6 vigra|1.10.0-r6 vobcopy|1.2.0-r6 vorbis-tools|1.4.0-r6 vte|0.28.2-r7 wag_profiles|20131225 wavpack|4.60.1-r6 wavplay|2.0-r6 wcpufreq|0.8.4 wget|1.17.1-r6 whois|5.5.6-r6 wireguard-tools|20211022-dunfell64 wireless-regdb|20190301 wireless-tools|29-april64 wmctrl|1.07-r6 wpa-supplicant|2.9-r6 wvdial|1.61-r6 wvstreams|4.6.1-r6 x264|r2991+gitAUTOINC+1771b556ee-r6 x265|3.2.1-r6 xarchive|0.2.8-6-i18n-r6 xauth|1_1.1-r6 xbitmaps|1.1.2-r6 xcalc|1.0.6-r6 xcb-util|0.4.0-r6 xcb-util-image|0.4.0-r6 xcb-util-keysyms|0.4.0-r6 xcb-util-renderutil|0.3.9-r6 xcb-util-wm|0.4.1-r6 xclip|0.12-r6 xclipboard|1.1.3-r6 xconsole|1.0.7-r6 xcur2png|0.7.0-r6 xcursorgen|1.0.7-r6 xdelta3|3.1.0-r6 xdg-puppy|0.7.8-r6 xdialog|2.3.1-r7 xdotool|1.20100416.2809-r1 xdpyinfo|1_1.3.2-r6 xev|1_1.2.3-r6 xf86-input-evdev|2_2.10.6-r6 xf86-input-keyboard|2_1.9.0-r6 xf86-input-mouse|2_1.9.3-r6 xf86-input-synaptics|2_1.9.1-r6 xf86-input-wacom|0.39.0-r6 xf86-video-amdgpu|2_19.0.1-r6 xf86-video-apm|2_1.3.0-r6 xf86-video-ark|2_0.7.5-r6 xf86-video-ast|2_1.1.5-r6 xf86-video-ati|2_19.0.1-r6 xf86-video-chips|2_1.4.0-r6 xf86-video-cirrus|2_1.5.3-r6 xf86-video-fbdev|0.4.4-r6 xf86-video-glint|2_1.2.9-r6 xf86-video-i128|2_1.4.0-r6 xf86-video-i740|2_1.4.0-r6 xf86-video-intel|2_2.99.917+gitAUTOINC+f66d39544b-r6 xf86-video-mach64|2_6.9.6-r6 xf86-video-mga|2_2.0.0-r6 xf86-video-neomagic|2_1.3.0-r6 xf86-video-nouveau|2_1.0.16-r6 xf86-video-nv|2_2.1.21-r6 xf86-video-r128|2_6.12.0-r6 xf86-video-rendition|2_4.2.7-r6 xf86-video-s3|2_0.6.5-r6 xf86-video-tdfx|2_1.5.0-r6 xf86-video-tga|2_1.2.2-r6 xf86-video-trident|2_1.3.8-r6 xf86-video-vesa|2_2.4.0-r6 xfdiff-cut|4.5.0-r7 xfontsel|1.0.6-r6 xgamma|1.0.6-r6 xhost|1_1.0.8-r6 xinit|1_1.4.1-r6 xinput|1.6.3-r6 xinput-calibrator|0.7.5+gitAUTOINC+18ec53f1ca-r6 xkbcomp|1.4.3-r6 xkeyboard-config|2.28-r6 xload|1.1.2-r6 xlockmore|5.31-p1-r6 xmessage|1.0.5-r6 xmodmap|1_1.0.10-r6 xorriso|1.5.3-r6 xprop|1_1.2.4-r6 xrandr|1_1.5.1-r6 xrdb|1.2.0-r6 xresprobe|0.4.25-r6 xsane|0.999-patched1-pyro64 xserver-xf86-config|0.1-r33 xserver-xorg|2_1.20.8-r6 xset|1_1.2.4-r6 xsetmode|1.0.0-r6 xsetroot|1.1.2-r6 xsoldier|1.8-r6 xvidcore|1.3.5-r6 xvidtune|1.0.3-r6 xvinfo|1_1.1.4-r6 xvkbd|3.8-r6 xwd|1.0.7-r6 xwininfo|1.1.5-r6 xz|5.2.4-r6 yad0|0.42.39-r6 yaf-splash|1.02-r6 yajl|2.1.0-r6 ycalc|1.09.1-1-pyro64 youtube-dl|20210930 youtubedl-gui|0.4.1-2 z2_geany_bacon_hack|1.7 zarfy|0.1.0-r6 zip|3.0-r2 zlib|1.2.11-r6 zstd|1.4.5-r6

bkauler commented 2 years ago

And sox:

sox-14.4.2-r6
+ffmpeg,+flac,+gcc-runtime,+glibc,+lame,+libao,+libid3tag,+libmad,+libpng,
+libsndfile1,+libvorbis,+opencore-amr,+wavpack
bkauler commented 2 years ago

Now using the latest lives.

With "Automatic trimming/padding of audio when possible" checked, that 2005*.flv file now shows video 17.00sec and audio 11.04sec, and only plays the first 11.04 sec of the video, so truncated, completely silent.

With that setting unchecked, it behaves as before, 17.00 sec video, 5.96sec audio, and only plays 5.96sec of the video, so truncated, this time with sound. Sound is not compressed, it is truncated.

salsaman commented 2 years ago

Must be an mpv issue. With mplayer it works as expected. I just installed mpv to test and it is hanging, not producing any audio output at all. I'll have to dig a bit further and figure out what is going wrong. Last time I tested with mpv, probably about 1 year ago, it worked with no issues, so something must have changed since then.

salsaman commented 2 years ago

Yep, seems to be a bug in mpv. If I try the following: /usr/bin/mpv --no-video --ao=pcm "/home/salsaman/Downloads/20051210-w50s_56K.flv"

I get the following error: mpv: ../ta/ta.c:335: ta_dbg_check_header: Assertion `h->canary == CANARY' failed. Aborted (core dumped)

Closing the issue as it is an mpv problem, nothing to do with LiVES.

bkauler commented 2 years ago

Earlier on in one of these issues, I reported that same "canary" fail, which was solved by updating mpv to the latest version, 0.34.1. Trying same test as you did above:

# mpv --no-video --ao=pcm 20051210-w50s_56K.flv 
     Video --vid=1 (vp6f 192x154 10.000fps)
 (+) Audio --aid=1 (mp3 1ch 11025Hz)
[ao/pcm] File: audiodump.wav (WAVE)
[ao/pcm] PCM: Samplerate: 11025 Hz Channels: 1 Format: float
AO: [pcm] 11025Hz mono 1ch float

Exiting... (End of file)
# 

I played the file 'audiodump.wav' in mhwaveedit, it is 16.8 sec long.

Well, if you really want to chase down what is going on, why not bootup EasyOS?

  1. Download the image file easy-3.2-amd64.img.gz from: https://distro.ibiblio.org/easyos/amd64/releases/dunfell/3.2/easy-3.2-amd64.img.gz

  2. Expand and write it to a usb-stick. Need a usb stick at least 8GB, good quality (for example Sandisk Ultra or Sandisk Extreme), say it is /dev/sdb, do as root:

    # gunzip easy-3.2-amd64.img.gz
    # dd if=easy-3.2-amd64.img of=/dev/sdb bs=1M
    # sync
  3. Boot from the usb-stick

  4. Install dev pkgs: Click "sfsget' on the desktop, choose file 'devx_3.2_amd64.sfs' Install it to main desktop, not in a container. Reboot.

  5. You are now ready to compile. Absolutely every dev pkg is installed and all tools such as autotools, git, etc. There is even nemiver gui debugger.

salsaman commented 2 years ago

Apologies then. When I have some time I will for sure give Easy a try out. Thanks for confirming that the audio file is actually being generated correctly. That makes it far easier to track down, as it must be a communication error between the front end and the back end.

salsaman commented 2 years ago

Apologies, still very busy with my home move. but I just had another look at this. I am pretty convinced the bug is outside of LiVES. If I switch off "automatic trim / pad", then open the file, the final size of the "audio" file is 744192, which is correct. The audio is mono in the original but forced to 2 channels. Sample size is 16 bit, and rate is 11025, so this is correct: 744192 / (2 2 11025) = 16.8751, which is more or less the correct time.

In the file you uploaded, the size is 131328, which turns out be EXACTLY 744192 / 17 * 3

so it is as if somewhere in mplayer / mpv, the time is being rounded up to 17 seconds (or maybe the faulty calculation is done using video length), and then only the first 6 seconds are written out (the number here is 6 rather than 3, because your file must be mono, hence the time is doubled). If this is then adjusted to scale back from 17.0 to 16.8751, then the result is the 5.96 which you see there.

I can see absolutely no reason in LiVES why we should be getting just the first 6 or so seconds, nor why seconds appears to be calculated from video length, rather than audio length.

salsaman commented 2 years ago

Just to be sure can you try: LANGUAGE=en LANG=en /usr/bin/mplayer -quiet -noconfig all -novideo -lavdopts o=threads=8 -fps 1000000. -frames 170 -alang eng -ao pcm:fast:nowaveheader -format s16le -channels 1 "/20051210-w50s_56K.flv" </dev/null

then check size of audiodump.pcm

bkauler commented 2 years ago

Sorry for slow response, have been busy elsewhere. I tried the above test, mhwaveedit reports that audiodump.pcm is 13.5 seconds. The sound is completely distorted.

Interesting, can open the 2005*flv file in mhwaveedit, and the sound is 16.8 seconds and plays perfectly. Ditto for Celluloid (which is a frontend to mpv).

salsaman commented 2 years ago

Strange indeed. Maybe you can try changing the options passed to mplayer. Try first with just: /usr/bin/mplayer -ao pcm "/20051210-w50s_56K.flv" , which I am pretty sure will work, then try putting the other options back in one by one and see at what point it breaks. Once that is established, it should be possible to come up with a workaround which produces the correct audio file.