Migrating to new LXD container

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
homeuser123
Posts: 2
Joined: Fri Nov 29, 2024 5:25 pm

Migrating to new LXD container

Post by homeuser123 »

I'm migrating my Zoneminder 1.36.35 instance from a Ubuntu 20.10 LXD container to a Ubuntu 24.04 container, also LXD.
I followed this this person's advice - viewtopic.php?t=28392 and it's not quite working properly.
Storage is showing as 21% full, instead of about 80% as it should be. All of the events look like they are there but clicking on them gives an error about them not existing.
Also seeing alot of these in the log files:

Code: Select all

Can't create frame images from video for this event 1581161-video.mp4 Command was: /usr/bin/ffmpeg -ss 0.00 -i /Zoneminder/6/2024-11-03/1581161/1581161-video.mp4 -frames:v 1 /Zoneminder/6/2024-11-03/1581161/snapshot.jpg 2>&1 Output was: ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 13 (Ubuntu 13.2.0-23ubuntu3) configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared libavutil 58. 29.100 / 58. 29.100 libavcodec 60. 31.102 / 60. 31.102 libavformat 60. 16.100 / 60. 16.100 libavdevice 60. 3.100 / 60. 3.100 libavfilter 9. 12.100 / 9. 12.100 libswscale 7. 5.100 / 7. 5.100 libswresample 4. 12.100 / 4. 12.100 libpostproc 57. 3.100 / 57. 3.100[in#0 @ 0x561c5d447380] Error opening input: No such file or directoryError opening input file /Zoneminder/6/2024-11-03/1581161/1581161-video.mp4.Error opening input files: No such file or directory
I've checked and these files do exist.
Here's an ls of the file this error is referring to:

Code: Select all

ls -lah /Zoneminder/6/2024-11-03/1581161/1581161-video.mp4-rw-r--r--. 1 www-data www-data 133M Nov  3 01:15 /Zoneminder/6/2024-11-03/1581161/1581161-video.mp4
I think the permissions are correct. Any idea what I did wrong?
mikb
Posts: 702
Joined: Mon Mar 25, 2013 12:34 pm

Re: Migrating to new LXD container

Post by mikb »

As a sanity check ...

Just testing ffmpeg with "-i doesntexist.mp4" gets me a "No such file or directory". Good.

Whereas ffmpeg "-i ownedbyrootandnotreadable.mp4" gets me a "Permission denied". Also good.

So I'd agree it doesn't look like a permissions problem, and that ffmpeg isn't reporting a misleading error, it can tell the difference.

Whereever/whenever ffmpeg is running it appears to be saying it cannot see the file there, then.

You say you _can_ see the file there when you look. My only thoughts are that the problem is with :-

When: The file wasn't there when ffmpeg was called, but it is _now_ when you look. Nov 3 01:15 is date on the file, but what was the time of the error message? Could ffmpeg have been accessing a file that had not yet been created/flushed?

Where: FFMPEG is operating in a different environment to where you are, and your "/Zoneminder..." file exists but ffmpeg doesn't see it.
homeuser123
Posts: 2
Joined: Fri Nov 29, 2024 5:25 pm

Re: Migrating to new LXD container

Post by homeuser123 »

This particular example was from a capture done weeks before I tested it. It definitely existed long before ffmpeg tried to access it.
I don't have the datetime of the log message now but it would have been only a few hours before I posted the question here.

And I'm not sure what you mean by different environment; everything I'm doing is in same container.
Post Reply