motioneye-project / motioneyeos

A Video Surveillance OS For Single-board Computers
Other
7.87k stars 902 forks source link

Camera stops working several times a day #1730

Closed thejoester closed 5 years ago

thejoester commented 5 years ago

Preliminary Docs

I confirm that I have read the CONTRIBUTING guide before opening this issue. Yes

I confirm that I have read the FAQ before opening this issue. Yes

motionEyeOS Version

motionEye Version | 0.39.3 Motion Version | 4.1.1 OS Version | motionEyeOS dev20181126

Board Model

I am using the following board/model: Raspberry Pi 3 B

Camera

I am using the following type of camera: USB Camera

My camera model is: Logitech C920

Network Connection

My motionEyeOS unit is connected to the network via: WiFi

Peripherals

I am using the following peripherals that I consider relevant to this issue: Only USB Camera

Log Files

I consider the following log files relevant to this issue:

boot.log dmesg.log messages.log motion.log motioneye.log

thejoester commented 5 years ago

I have my RPi 3 B Running motionEyeOS dev20181126 / MotionEye 0.39.3 and USB Logitech C920 to monitor my snake. The camera will stop working several times a day to where it shows the broken camera image but the UI still loads. I can get it to restart by rebooting or by turning off/on the video source and applying but it's basically useless at this point is I have to do this as the point is to catch images and videos of my snake who often comes out when nobody is around.

I was previously using this device to run OctoPrint to control and monitor my 3D printer, and it would run for days, even months without issue.

I started off saving motion images and videos to a network share, but have changed it to save local - no effect,

I was getting some errors related to power in my logs so I ordered an official RPi 2.5a power source - the errors in the logs stopped but the camera still stops working.

I disabled the "Connectivity check" option - no effect.

I have read the other similar posts but nothing that has been suggested there has worked.

thejoester commented 5 years ago

So tonight I replaced the older 4GB microSD card that I was using with a newer high speed Samsung 32GB microSD. I did a whole new image and we will see how this goes.

IAmOrion commented 5 years ago

fwiw take a look here, I reported a similar issue back in July:

github.com/ccrisan/motioneyeos/issues/1582

thejoester commented 5 years ago

@IAmOrion - Thanks I did check that. One big difference I noticed is that I do not have to unplug the Pi, and my web GUI is still working, I have a open SSH session that does not end, and I can turn the video device off/on then apply and it starts working again.

thejoester commented 5 years ago

OK I think I may have made some progress.

With the new microSD card I was super hopeful as it went quite a bit longer than it had been. Then this morning it crashed again. I currently have it saving locally and not to SMB.

I also changed the still images to just save every 10 seconds, not on motion detection. One thing I noticed when I found it stopped is that the last image taken was at 09:37:10 local time. Here are the log entries from that time:

messages.log:

Dec 4 09:37:41 Snake-Cam user.err motion: [0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, trying to do a graceful restart Dec 4 09:38:41 Snake-Cam user.err motion: [0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, did NOT restart graceful, killing it! Dec 4 09:38:42 Snake-Cam user.err motion: [0:motion] [ERR] [ALL] main: cleaning Thread 1

motion.log (last written to at 09:38)

[0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, trying to do a graceful restart [0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, did NOT restart graceful, killing it! [0:motion] [ERR] [ALL] main: cleaning Thread 1

motioneye.log

2018-12-04 09:37:29: [sendmail] INFO: sending email 2018-12-04 09:37:35: [sendmail] INFO: email sent

So I have it emailing me when it detects motion, and it seems that either that, or the motion detection is causing an issue. I am disabling the notification now and see how that goes.

I do not believe it is a network issue, as per my above reply to @IAmOrion I have an open SSH session and constant connection monitor running on my desktop and those are not erroring out.

8OND007 commented 5 years ago

I have the same problem as thejoester. Every day, multiple times my Raspberry Pi3B+ loses connection with the attached raspberry pi camera module. Log only shows that thread 1 has a watchdog timeout and could not be restarted.

[0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, trying to do a graceful restart [0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, did NOT restart graceful, killing it! [0:motion] [ERR] [ALL] main: cleaning Thread 1

I got this problem on my 2 rescent upgraded Pi's (refresh installed latest image (20181210) and restored my old config)

The webinterfaces is still running and a simple config change and Save button restarts the thread with again a connected camera image.

thejoester commented 5 years ago

So two weeks later and since disabling the email notification I am not having any issues. Just to fully test this I am going to enable them.

8OND007 commented 5 years ago

I don't use email notification. I do use motion detection (with a fixed grid/raster). Maybe problem is located in the motion detection module ? I will try to disable motion detection and see if camera keeps running then...

thejoester commented 5 years ago

The last two weeks I have had motion detection enabled for movies, but not for images and have had no issues.

davisstu commented 5 years ago

I have the same problem as thejoester. Every day, multiple times my Raspberry Pi3B+ loses connection with the attached raspberry pi camera module. Log only shows that thread 1 has a watchdog timeout and could not be restarted.

[0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, trying to do a graceful restart [0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, did NOT restart graceful, killing it! [0:motion] [ERR] [ALL] main: cleaning Thread 1

I got this problem on my 2 rescent upgraded Pi's (refresh installed latest image (20181210) and restored my old config)

The webinterfaces is still running and a simple config change and Save button restarts the thread with again a connected camera image.

I can confirm that I am having the same issue as listed here. Pi2 with RPi Cam module. Did a fresh install on the latest release (previously had a July dev release which gave me no issues) and have both restored a config and done a fresh setup and I'm having the same issues.

It will run for a few hours, capture and upload to my Google Drive (capture on motion) then lose connection to the camera. A config change or restart brings the camera back.

8OND007 commented 5 years ago

It seems like more and more people have this problem running Raspberry Pi camera. Connection to the camera is lost every time motion is detected and recordings are made. Calin, did you also experience this problem on your devellopment system ? I fully disabled motion recording for now and just use the camera as fast network camera option which still works. If bug can not be found I ll revert back to the working july dev release. Regards.

davisstu commented 5 years ago

Just to confirm, with the exact same hardware and with a restoration of my config, I have rolled back to the June release and everything is working perfectly and as expected. Motion doesn't crash, I don't lose picture and motioned events are successfully uploaded to my Google Drive.

8OND007 commented 5 years ago

motion version in MotionEye is old (4.1), current version is 4.2.1, since 4.1 a lot of bug fixes & enhancements were made. It there any progress or event effort made in this "freeze problem when saving pic/movie on motion alert" ? Problem occurs since dev20181126 (reported 3 december 2018). Now almost a month later : not even a response on the issue. Is this project dead ? As a last effort before switching back to the july2018 release, I'll try to install MotionEye (and current motion 4.2.1) to a fresh Raspbian Stretch running on a Pi3B+. If problem is also there with the latest motionEye, then chances are bug is in MotionEye release and not in the MotionEyeOS / Motion. Would be great to see or hear some response from the project author.

davisstu commented 5 years ago

@ccrisan It's a good point - can you please acknowledge as an issue and we can them await a fix?

8OND007 commented 5 years ago

just FYI: I installed yesterday a brand new Raspbian Stretch onto a USB stick which is booted by a raspberry Pi 3B+ running the latest motion 4.2.1 and the latest MotionEye. Until now everything OK, motion is detected and recorded without interruptions or losing connection to the connected raspberry pi cam. With other words topic problems are located in MotionEyeOS image. Since MotionEye manually installed on Raspbian runs fine (and motion, ... packages are upgradable) I'll abandon the MotionEyeOS path for now. MotionEyeOS also can't boot from USB. So Raspbian installation is the way to go for me. I adapted my MotionEyeOS python script to auto change some motion and motionEye settings according to night / day modus.

jasaw commented 5 years ago

Can you guys please list step by step instructions on how to reproduce the problem? Please include detailed information on your system too, things like how many cameras, what else is attached to the RPi, configuration of your motionEyeOS (motion detection, media storage location, ...).

This may very well be a motion software bug. Try isolating the problem by running motion without motionEye. See https://github.com/ccrisan/motioneyeos/wiki/Report-Motion-Issue

ccrisan commented 5 years ago

Guys, the problem of camera connection loss is something very general and may have many possible causes. Few users care to report the working and non-working versions they've tested. Even fewer of them tried to isolate the problem, as @jasaw indicated. This makes it almost impossible for us to get to the root cause of this problem (or problems).

I personally haven't experienced any similar problems with my setup (10 RPi1 FNCs + one Odroid XU4 hub). I have seen a fair amount of users complaining about this issue happening with mid 2018 versions. Some of them reported that recent prereleases (end of 2018) fixed their problems.

I will try to make some time to add Motion 4.2 support to motionEye but I have my doubts that it would fix these problems for everyone.

8OND007 commented 5 years ago

These issues were reported since beginning december 2018. (Including soft & hardware (Pi) versions, setup, attached devices, motion settings, recording or not to movie/pictures, log files, ...

Jigsaw's and your reponse now is exact 45 days after initial problem reporting began.

We've cleary stated that it is a recording movie problem, since the video stream does not crash when no movies are recorded by motion.

So problem is :

  1. OR MOTION module which is outdated in MotionEyeOS.
  2. OR recording (FFMPEG encoder)
  3. OR used storage (sdcard/usb/...).

Since another user stated problem also occured when recording his movies to dropbox/... option 3 is not likly.

I have tried different setup's and gave feedback here on the issue tracker. Without response.

My last effort was converting 1 of my 2 MotionEyeOS Pi's to a dedicated Raspbian fresh install. This was a success and inspires me to switch all my MotionEyeOS images to Rapsbian installed motionEye's. Movie motion recording worked fine without crash of thread-1 raspberry camera.

I stated indeed that maybe upgrading motion (4.1.1 to 4.2.x) could maybe fix the problem.

Every day new issue topics appear on the issue tracker regarding this problem.

3 days ago this interesting topic appeared: "Camera stop working / stream if save video in HDD" https://github.com/ccrisan/motioneyeos/issues/1770

22 hours ago topic starter "gui59169" gave the correct and final answer/solution:

Tested, last two days with h264 codec and it’s working. No Interrupt.

It’s seems OMX codec is the source of troubles

Indeed not using "H.264/OMX (mp4)", but for ex: "H.264 (mp4)" seems to FIX the problem. Camera motion recording is running for 2 days now without camera connection interruption. (while with OMX, it crashed almost immediately when encoding a recorded movie)

The hardware enabled movie encoding (using GPU power of the Pi) seems to crash the threads.

Problem is located then in "ffmpeg"encoder I presume.

Difference in version of ffmpeg :

MotionEyeOS: ffmpeg version 3.4.4 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7.3.1 (Linaro GCC 7.3-2018.05) 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] configuration: --enable-cross-compile --cross-prefix=/os/output/raspberrypi2/host/bin/arm-linux-gnueabihf- --sysroot=/os/output/raspberrypi2/host/arm-buildroot-linux-gnueabihf/sysroot --host-cc='/os/output/raspberrypi2/host/bin/ccache /usr/bin/gcc' --arch=arm --target-os=linux --disable-stripping --pkg-config=/os/output/raspberrypi2/host/bin/pkg-config --disable-static --enable-shared --prefix=/usr --enable-avfilter --disable-version3 --enable-logging --enable-optimizations --disable-extra-warnings --enable-avdevice --enable-avcodec --enable-avformat --enable-network --disable-gray --enable-swscale-alpha --disable-small --enable-dct --enable-fft --enable-mdct --enable-rdft --disable-crystalhd --disable-dxva2 --enable-runtime-cpudetect --disable-hardcoded-tables --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-hwaccels --disable-cuda --disable-cuvid --disable-nvenc --disable-avisynth --disable-frei0r --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libdc1394 --disable-libgsm --disable-libilbc --disable-libvo-amrwbenc --disable-symver --disable-doc --enable-gpl --enable-nonfree --enable-ffmpeg --disable-ffplay --disable-ffserver --disable-avresample --disable-ffprobe --disable-postproc --enable-swscale --enable-indevs --enable-alsa --enable-outdevs --enable-pthreads --enable-zlib --disable-bzlib --disable-libfdk-aac --disable-libcdio --disable-gnutls --enable-openssl --disable-libdrm --disable-libopenh264 --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis --disable-vaapi --disable-vdpau --enable-mmal --enable-omx --enable-omx-rpi --extra-cflags=-I/os/output/raspberrypi2/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/IL --disable-libopencv --disable-libopus --disable-libvpx --disable-libass --disable-libbluray --disable-librtmp --disable-libmp3lame --disable-libmodplug --disable-libspeex --enable-libtheora --disable-libwavpack --disable-iconv --disable-libfreetype --disable-fontconfig --disable-libopenjpeg --enable-libx264 --enable-libx265 --disable-x86asm --disable-mmx --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-avx2 --enable-armv6 --enable-vfp --enable-neon --disable-altivec --extra-libs=-latomic --enable-pic --cpu=cortex-a7 libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100

Raspbian installed ffmpeg: ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516 configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 / 57. 56.101 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100

Besides ffmpeg version difference I also notice a difference in presence of possible parameter : --enable-omx --enable-omx-rpi (motionEyeOS) against --enable-omx-rpi (Raspbian)

Raspbian uses an older version 3.2.10-1.... while motionEyeOS used 3.4.4 ?

Thanks again to "gui59169" for pointing out the real problem (option 2) . :-)

As for ffmpeg solution :

ccrisan commented 5 years ago

@bertdebondt this is a really interesting finding. I never thought the OMX hardware acceleration could cause these stability issues, but now, if I think about it, it makes sense.

The last Motion update in motionEyeOS was more than 1 year ago so that couldn't really be the problem. FFmpeg on the other hand could be indeed causing the issues. @jasaw do you have any ideas how we could further debug/investigate problems that have their origin in FFmpeg RPi OMX code and result in Motion blocking or crashing?

8OND007 commented 5 years ago

cudo's to gui59169 Further info: on the Raspbian based motionEye ffmpeg works fine also using OMX hardware accelerated MP4 encoding. The Raspbian has 512mb allocated to the GPU (raspi-config memory split). I think I also tried 512mb on the MotionEyeOS and it also crashed then. With previous MotionEyeOS (think release from summer 2018) the OMX encoding still worked fine.

ccrisan commented 5 years ago

@bertdebondt are you sure the Raspbian version of FFmpeg comes with OMX acceleration?

8OND007 commented 5 years ago

yes, version included in latest Raspbian Strech : ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516

I tried sudo apt-get install ffmpeg, but this gave answer that latest version was already installed. (i think)

ccrisan commented 5 years ago

@bertdebondt could you please post the ffmpeg -codecs output from your PI, while you're at it?

jasaw commented 5 years ago

ffmpeg version changes in buildroot:

Version 3.3.5 is good. I've been using this on all my cameras.

Raspbian uses ffmpeg version 3.2.10. This version works fine as reported by users.

I'm not aware of any changes to the OMX code in ffmpeg in those versions, so unlikely to be a bug in ffmpeg's OMX code.

Another possible cause is the GPU firmware, from rpi-firmware package. I know for a fact that rpi-firmware was broken since 1 year ago, and was only fixed in the Oct 2018 version, but we are still on the broken version. The bug in the GPU firmware, when triggered, causes the entire Pi to lock up, requiring a power cycle to recover. Several programs can trigger this bug, but ffmpeg was fine when I tested.

It could still be the way motion uses ffmpeg API that causes the problem. Maybe h264_omx vs libx264 returns slightly different data and motion thread gets a segfault. It could also be the data from both interfaces are aligned slightly differently in memory. This is why I suggested to run motion alone, follow the instructions on https://github.com/ccrisan/motioneyeos/wiki/Report-Motion-Issue. Run motion in the foreground, see what happens. I also can't reproduce the problem at my end, so it would be good if you guys could provide more information on how to reproduce it. From what I've read above, saving movies to local disk using OMX encoder at any resolution should trigger the bug? Does it happen every single time or is it intermittent?

As for turning on OMX on Raspbian, there are a few things that needs to be done to enable OMX.

  1. As @ccrisan pointed out, your ffmpeg needs to have OMX acceleration compiled in.
  2. You need to remove h264_omx from motion's blacklist and recompile motion.
  3. Finally, set h264_omx as the preferred codec in thread-1.conf file.
8OND007 commented 5 years ago

@bertdebondt could you please post the ffmpeg -codecs output from your PI, while you're at it?

codec encoder h264_omx is enabled: DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_mmal h264_vdpau ) (encoders: libx264 libx264rgb h264_omx h264_vaapi )

ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516 configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 / 57. 56.101 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 Codecs: D..... = Decoding supported .E.... = Encoding supported ..V... = Video codec ..A... = Audio codec ..S... = Subtitle codec ...I.. = Intra frame-only codec ....L. = Lossy compression .....S = Lossless compression

D.VI.. 012v Uncompressed 4:2:2 10-bit D.V.L. 4xm 4X Movie D.VI.S 8bps QuickTime 8BPS video .EVIL. a64_multi Multicolor charset for Commodore 64 (encoders: a64multi ) .EVIL. a64_multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (encoders: a64multi5 ) D.V..S aasc Autodesk RLE D.VIL. aic Apple Intermediate Codec DEVI.S alias_pix Alias/Wavefront PIX image DEVIL. amv AMV Video D.V.L. anm Deluxe Paint Animation D.V.L. ansi ASCII/ANSI art DEV..S apng APNG (Animated Portable Network Graphics) image DEVIL. asv1 ASUS V1 DEVIL. asv2 ASUS V2 D.VIL. aura Auravision AURA D.VIL. aura2 Auravision Aura 2 D.V... avrn Avid AVI Codec DEVI.. avrp Avid 1:1 10-bit RGB Packer D.V.L. avs AVS (Audio Video Standard) video DEVI.. avui Avid Meridien Uncompressed DEVI.. ayuv Uncompressed packed MS 4:4:4:4 D.V.L. bethsoftvid Bethesda VID video D.V.L. bfi Brute Force & Ignorance D.V.L. binkvideo Bink video D.VI.. bintext Binary text DEVI.S bmp BMP (Windows and OS/2 bitmap) D.V..S bmv_video Discworld II BMV video D.VI.S brender_pix BRender PIX image D.V.L. c93 Interplay C93 D.V.L. cavs Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile) D.V.L. cdgraphics CD Graphics video D.VIL. cdxl Commodore CDXL video D.V.L. cfhd Cineform HD DEV.L. cinepak Cinepak DEVIL. cljr Cirrus Logic AccuPak D.VI.S cllc Canopus Lossless Codec D.V.L. cmv Electronic Arts CMV video (decoders: eacmv ) D.V... cpia CPiA video format D.V..S cscd CamStudio (decoders: camstudio ) D.VIL. cyuv Creative YUV (CYUV) ..V.LS daala Daala D.VILS dds DirectDraw Surface image decoder D.V.L. dfa Chronomaster DFA DEV.LS dirac Dirac (encoders: vc2 ) DEVIL. dnxhd VC3/DNxHD DEVI.S dpx DPX (Digital Picture Exchange) image D.V.L. dsicinvideo Delphine Software International CIN video DEVIL. dvvideo DV (Digital Video) D.V..S dxa Feeble Files/ScummVM DXA D.VI.S dxtory Dxtory D.VIL. dxv Resolume DXV D.V.L. escape124 Escape 124 D.V.L. escape130 Escape 130 D.VILS exr OpenEXR image DEV..S ffv1 FFmpeg video codec #1 DEVI.S ffvhuff Huffyuv FFmpeg variant D.V.L. fic Mirillis FIC DEV..S flashsv Flash Screen Video v1 DEV.L. flashsv2 Flash Screen Video v2 D.V..S flic Autodesk Animator Flic video DEV.L. flv1 FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (decoders: flv ) (encoders: flv ) D.V..S fraps Fraps D.VI.S frwu Forward Uncompressed D.V.L. g2m Go2Meeting DEV..S gif GIF (Graphics Interchange Format) DEV.L. h261 H.261 DEV.L. h263 H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2 D.V.L. h263i Intel H.263 DEV.L. h263p H.263+ / H.263-1998 / H.263 version 2 DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_mmal h264_vdpau ) (encoders: libx264 libx264rgb h264_omx h264_vaapi ) DEVIL. hap Vidvox Hap decoder DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (encoders: libx265 hevc_vaapi ) D.V.L. hnm4video HNM 4 video D.VIL. hq_hqa Canopus HQ/HQA D.VIL. hqx Canopus HQX DEVI.S huffyuv HuffYUV D.V.L. idcin id Quake II CIN video (decoders: idcinvideo ) D.VI.. idf iCEDraw text D.V.L. iff_ilbm IFF ACBM/ANIM/DEEP/ILBM/PBM/RGB8/RGBN (decoders: iff ) D.V.L. indeo2 Intel Indeo 2 D.V.L. indeo3 Intel Indeo 3 D.V.L. indeo4 Intel Indeo Video Interactive 4 D.V.L. indeo5 Intel Indeo Video Interactive 5 D.V.L. interplayvideo Interplay MVE video DEVILS jpeg2000 JPEG 2000 (decoders: jpeg2000 libopenjpeg ) (encoders: jpeg2000 libopenjpeg ) DEVILS jpegls JPEG-LS D.VIL. jv Bitmap Brothers JV video D.V.L. kgv1 Kega Game Video D.V.L. kmvc Karl Morton's video codec D.VI.S lagarith Lagarith lossless .EVI.S ljpeg Lossless JPEG D.VI.S loco LOCO D.VI.S m101 Matrox Uncompressed SD D.V.L. mad Electronic Arts Madcow Video (decoders: eamad ) D.VI.S magicyuv MagicYUV video D.VIL. mdec Sony PlayStation MDEC (Motion DECoder) D.V.L. mimic Mimic DEVIL. mjpeg Motion JPEG (encoders: mjpeg mjpeg_vaapi ) D.VIL. mjpegb Apple MJPEG-B D.V.L. mmvideo American Laser Games MM Video D.V.L. motionpixels Motion Pixels video DEV.L. mpeg1video MPEG-1 video (decoders: mpeg1video mpeg1video_vdpau ) DEV.L. mpeg2video MPEG-2 video (decoders: mpeg2video mpegvideo mpegvideo_vdpau mpeg2_mmal ) DEV.L. mpeg4 MPEG-4 part 2 (decoders: mpeg4 mpeg4_mmal mpeg4_vdpau ) (encoders: mpeg4 libxvid ) D.V.L. mpegvideo_xvmc MPEG-1/2 video XvMC (X-Video Motion Compensation) D.V.L. msa1 MS ATC Screen D.V.L. msmpeg4v1 MPEG-4 part 2 Microsoft variant version 1 DEV.L. msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2 DEV.L. msmpeg4v3 MPEG-4 part 2 Microsoft variant version 3 (decoders: msmpeg4 ) (encoders: msmpeg4 ) D.V..S msrle Microsoft RLE D.V.L. mss1 MS Screen 1 D.VIL. mss2 MS Windows Media Video V9 Screen DEV.L. msvideo1 Microsoft Video 1 D.VI.S mszh LCL (LossLess Codec Library) MSZH D.V.L. mts2 MS Expression Encoder Screen D.VIL. mvc1 Silicon Graphics Motion Video Compressor 1 D.VIL. mvc2 Silicon Graphics Motion Video Compressor 2 D.V.L. mxpeg Mobotix MxPEG video D.V.L. nuv NuppelVideo/RTJPEG D.V.L. paf_video Amazing Studio Packed Animation File Video DEVI.S pam PAM (Portable AnyMap) image DEVI.S pbm PBM (Portable BitMap) image DEVI.S pcx PC Paintbrush PCX image DEVI.S pgm PGM (Portable GrayMap) image DEVI.S pgmyuv PGMYUV (Portable GrayMap YUV) image D.VIL. pictor Pictor/PC Paint DEV..S png PNG (Portable Network Graphics) image DEVI.S ppm PPM (Portable PixelMap) image DEVIL. prores Apple ProRes (iCodec Pro) (decoders: prores prores_lgpl ) (encoders: prores prores_aw prores_ks ) D.VIL. ptx V.Flash PTX image D.VI.S qdraw Apple QuickDraw D.V.L. qpeg Q-team QPEG DEV..S qtrle QuickTime Animation (RLE) video DEVI.S r10k AJA Kona 10-bit RGB Codec DEVI.S r210 Uncompressed RGB 10-bit DEVI.S rawvideo raw video D.VIL. rl2 RL2 video DEV.L. roq id RoQ video (decoders: roqvideo ) (encoders: roqvideo ) D.V.L. rpza QuickTime video (RPZA) D.V..S rscc innoHeim/Rsupport Screen Capture Codec DEV.L. rv10 RealVideo 1.0 DEV.L. rv20 RealVideo 2.0 D.V.L. rv30 RealVideo 3.0 D.V.L. rv40 RealVideo 4.0 D.V.L. sanm LucasArts SANM/SMUSH video D.V..S screenpresso Screenpresso DEVI.S sgi SGI image D.VI.S sgirle SGI RLE 8-bit D.VI.S sheervideo BitJazz SheerVideo D.V.L. smackvideo Smacker video (decoders: smackvid ) D.V.L. smc QuickTime Graphics (SMC) D.V... smvjpeg Sigmatel Motion Video DEV.LS snow Snow D.VIL. sp5x Sunplus JPEG (SP5X) DEVI.S sunrast Sun Rasterfile image DEV.L. svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1 D.V.L. svq3 Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3 DEVI.S targa Truevision Targa image D.VI.. targa_y216 Pinnacle TARGA CineWave YUV16 D.V.L. tdsc TDSC D.V.L. tgq Electronic Arts TGQ video (decoders: eatgq ) D.V.L. tgv Electronic Arts TGV video (decoders: eatgv ) DEV.L. theora Theora (encoders: libtheora ) D.VIL. thp Nintendo Gamecube THP video D.V.L. tiertexseqvideo Tiertex Limited SEQ video DEVI.S tiff TIFF image D.VIL. tmv 8088flex TMV D.V.L. tqi Electronic Arts TQI video (decoders: eatqi ) D.V.L. truemotion1 Duck TrueMotion 1.0 D.V.L. truemotion2 Duck TrueMotion 2.0 D.V.L. truemotion2rt Duck TrueMotion 2.0 Real Time D.V..S tscc TechSmith Screen Capture Codec (decoders: camtasia ) D.V.L. tscc2 TechSmith Screen Codec 2 D.VIL. txd Renderware TXD (TeXture Dictionary) image D.V.L. ulti IBM UltiMotion (decoders: ultimotion ) DEVI.S utvideo Ut Video DEVI.S v210 Uncompressed 4:2:2 10-bit D.VI.S v210x Uncompressed 4:2:2 10-bit DEVI.. v308 Uncompressed packed 4:4:4 DEVI.. v408 Uncompressed packed QT 4:4:4:4 DEVI.S v410 Uncompressed 4:4:4 10-bit D.V.L. vb Beam Software VB D.VI.S vble VBLE Lossless Codec D.V.L. vc1 SMPTE VC-1 (decoders: vc1 vc1_vdpau vc1_mmal ) D.V.L. vc1image Windows Media Video 9 Image v2 D.VIL. vcr1 ATI VCR1 D.VIL. vixl Miro VideoXL (decoders: xl ) D.V.L. vmdvideo Sierra VMD video D.V..S vmnc VMware Screen Codec / VMware Video D.V.L. vp3 On2 VP3 D.V.L. vp5 On2 VP5 D.V.L. vp6 On2 VP6 D.V.L. vp6a On2 VP6 (Flash version, with alpha channel) D.V.L. vp6f On2 VP6 (Flash version) D.V.L. vp7 On2 VP7 DEV.L. vp8 On2 VP8 (decoders: vp8 libvpx ) (encoders: libvpx ) DEV.L. vp9 Google VP9 (decoders: vp9 libvpx-vp9 ) (encoders: libvpx-vp9 ) DEVILS webp WebP (encoders: libwebp_anim libwebp ) DEV.L. wmv1 Windows Media Video 7 DEV.L. wmv2 Windows Media Video 8 D.V.L. wmv3 Windows Media Video 9 (decoders: wmv3 wmv3_vdpau ) D.V.L. wmv3image Windows Media Video 9 Image D.VIL. wnv1 Winnov WNV1 .EV..S wrapped_avframe AVFrame to AVPacket passthrough D.V.L. ws_vqa Westwood Studios VQA (Vector Quantized Animation) video (decoders: vqavideo ) D.V.L. xan_wc3 Wing Commander III / Xan D.V.L. xan_wc4 Wing Commander IV / Xxan D.VI.. xbin eXtended BINary text DEVI.S xbm XBM (X BitMap) image DEVIL. xface X-face image DEVI.S xwd XWD (X Window Dump) image DEVI.. y41p Uncompressed YUV 4:1:1 12-bit D.VI.S ylc YUY2 Lossless Codec D.V.L. yop Psygnosis YOP Video DEVI.. yuv4 Uncompressed packed 4:2:0 D.V..S zerocodec ZeroCodec Lossless Video DEVI.S zlib LCL (LossLess Codec Library) ZLIB DEV..S zmbv Zip Motion Blocks Video ..A.L. 4gv 4GV (Fourth Generation Vocoder) D.A.L. 8svx_exp 8SVX exponential D.A.L. 8svx_fib 8SVX fibonacci DEA.L. aac AAC (Advanced Audio Coding) (decoders: aac aac_fixed ) D.A.L. aac_latm AAC LATM (Advanced Audio Coding LATM syntax) DEA.L. ac3 ATSC A/52A (AC-3) (decoders: ac3 ac3_fixed ) (encoders: ac3 ac3_fixed ) D.A.L. adpcm_4xm ADPCM 4X Movie DEA.L. adpcm_adx SEGA CRI ADX ADPCM D.A.L. adpcm_afc ADPCM Nintendo Gamecube AFC D.A.L. adpcm_aica ADPCM Yamaha AICA D.A.L. adpcm_ct ADPCM Creative Technology D.A.L. adpcm_dtk ADPCM Nintendo Gamecube DTK D.A.L. adpcm_ea ADPCM Electronic Arts D.A.L. adpcm_ea_maxis_xa ADPCM Electronic Arts Maxis CDROM XA D.A.L. adpcm_ea_r1 ADPCM Electronic Arts R1 D.A.L. adpcm_ea_r2 ADPCM Electronic Arts R2 D.A.L. adpcm_ea_r3 ADPCM Electronic Arts R3 D.A.L. adpcm_ea_xas ADPCM Electronic Arts XAS DEA.L. adpcm_g722 G.722 ADPCM (decoders: g722 ) (encoders: g722 ) DEA.L. adpcm_g726 G.726 ADPCM (decoders: g726 ) (encoders: g726 ) D.A.L. adpcm_g726le G.726 ADPCM little-endian (decoders: g726le ) D.A.L. adpcm_ima_amv ADPCM IMA AMV D.A.L. adpcm_ima_apc ADPCM IMA CRYO APC D.A.L. adpcm_ima_dat4 ADPCM IMA Eurocom DAT4 D.A.L. adpcm_ima_dk3 ADPCM IMA Duck DK3 D.A.L. adpcm_ima_dk4 ADPCM IMA Duck DK4 D.A.L. adpcm_ima_ea_eacs ADPCM IMA Electronic Arts EACS D.A.L. adpcm_ima_ea_sead ADPCM IMA Electronic Arts SEAD D.A.L. adpcm_ima_iss ADPCM IMA Funcom ISS D.A.L. adpcm_ima_oki ADPCM IMA Dialogic OKI DEA.L. adpcm_ima_qt ADPCM IMA QuickTime D.A.L. adpcm_ima_rad ADPCM IMA Radical D.A.L. adpcm_ima_smjpeg ADPCM IMA Loki SDL MJPEG DEA.L. adpcm_ima_wav ADPCM IMA WAV D.A.L. adpcm_ima_ws ADPCM IMA Westwood DEA.L. adpcm_ms ADPCM Microsoft D.A.L. adpcm_mtaf ADPCM MTAF D.A.L. adpcm_psx ADPCM Playstation D.A.L. adpcm_sbpro_2 ADPCM Sound Blaster Pro 2-bit D.A.L. adpcm_sbpro_3 ADPCM Sound Blaster Pro 2.6-bit D.A.L. adpcm_sbpro_4 ADPCM Sound Blaster Pro 4-bit DEA.L. adpcm_swf ADPCM Shockwave Flash D.A.L. adpcm_thp ADPCM Nintendo THP D.A.L. adpcm_thp_le ADPCM Nintendo THP (Little-Endian) D.A.L. adpcm_vima LucasArts VIMA audio D.A.L. adpcm_xa ADPCM CDROM XA DEA.L. adpcm_yamaha ADPCM Yamaha DEA..S alac ALAC (Apple Lossless Audio Codec) D.A.L. amr_nb AMR-NB (Adaptive Multi-Rate NarrowBand) (decoders: amrnb ) D.A.L. amr_wb AMR-WB (Adaptive Multi-Rate WideBand) (decoders: amrwb ) D.A..S ape Monkey's Audio D.A.L. atrac1 ATRAC1 (Adaptive TRansform Acoustic Coding) D.A.L. atrac3 ATRAC3 (Adaptive TRansform Acoustic Coding 3) D.A.L. atrac3p ATRAC3+ (Adaptive TRansform Acoustic Coding 3+) (decoders: atrac3plus ) D.A.L. avc On2 Audio for Video Codec (decoders: on2avc ) D.A.L. binkaudio_dct Bink Audio (DCT) D.A.L. binkaudio_rdft Bink Audio (RDFT) D.A.L. bmv_audio Discworld II BMV audio ..A.L. celt Constrained Energy Lapped Transform (CELT) DEA.L. comfortnoise RFC 3389 Comfort Noise D.A.L. cook Cook / Cooker / Gecko (RealAudio G2) D.A.L. dsd_lsbf DSD (Direct Stream Digital), least significant bit first D.A.L. dsd_lsbf_planar DSD (Direct Stream Digital), least significant bit first, planar D.A.L. dsd_msbf DSD (Direct Stream Digital), most significant bit first D.A.L. dsd_msbf_planar DSD (Direct Stream Digital), most significant bit first, planar D.A.L. dsicinaudio Delphine Software International CIN audio D.A.L. dss_sp Digital Speech Standard - Standard Play mode (DSS SP) D.A..S dst DST (Direct Stream Transfer) DEA.LS dts DCA (DTS Coherent Acoustics) (decoders: dca ) (encoders: dca ) D.A.L. dvaudio DV audio DEA.L. eac3 ATSC A/52B (AC-3, E-AC-3) D.A.L. evrc EVRC (Enhanced Variable Rate Codec) DEA..S flac FLAC (Free Lossless Audio Codec) DEA.L. g723_1 G.723.1 D.A.L. g729 G.729 DEA.L. gsm GSM (decoders: gsm libgsm ) (encoders: libgsm ) DEA.L. gsm_ms GSM Microsoft variant (decoders: gsm_ms libgsm_ms ) (encoders: libgsm_ms ) D.A.L. iac IAC (Indeo Audio Coder) ..A.L. ilbc iLBC (Internet Low Bitrate Codec) D.A.L. imc IMC (Intel Music Coder) D.A.L. interplay_dpcm DPCM Interplay D.A.L. interplayacm Interplay ACM D.A.L. mace3 MACE (Macintosh Audio Compression/Expansion) 3:1 D.A.L. mace6 MACE (Macintosh Audio Compression/Expansion) 6:1 D.A.L. metasound Voxware MetaSound DEA..S mlp MLP (Meridian Lossless Packing) D.A.L. mp1 MP1 (MPEG audio layer 1) (decoders: mp1 mp1float ) DEA.L. mp2 MP2 (MPEG audio layer 2) (decoders: mp2 mp2float ) (encoders: mp2 mp2fixed libtwolame ) DEA.L. mp3 MP3 (MPEG audio layer 3) (decoders: mp3 mp3float ) (encoders: libmp3lame libshine ) D.A.L. mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3) (decoders: mp3adu mp3adufloat ) D.A.L. mp3on4 MP3onMP4 (decoders: mp3on4 mp3on4float ) D.A..S mp4als MPEG-4 Audio Lossless Coding (ALS) (decoders: als ) D.A.L. musepack7 Musepack SV7 (decoders: mpc7 ) D.A.L. musepack8 Musepack SV8 (decoders: mpc8 ) DEA.L. nellymoser Nellymoser Asao DEA.L. opus Opus (Opus Interactive Audio Codec) (decoders: opus libopus ) (encoders: libopus ) D.A.L. paf_audio Amazing Studio Packed Animation File Audio DEA.L. pcm_alaw PCM A-law / G.711 A-law D.A..S pcm_bluray PCM signed 16|20|24-bit big-endian for Blu-ray media D.A..S pcm_dvd PCM signed 20|24-bit big-endian DEA..S pcm_f32be PCM 32-bit floating point big-endian DEA..S pcm_f32le PCM 32-bit floating point little-endian DEA..S pcm_f64be PCM 64-bit floating point big-endian DEA..S pcm_f64le PCM 64-bit floating point little-endian D.A..S pcm_lxf PCM signed 20-bit little-endian planar DEA.L. pcm_mulaw PCM mu-law / G.711 mu-law DEA..S pcm_s16be PCM signed 16-bit big-endian DEA..S pcm_s16be_planar PCM signed 16-bit big-endian planar DEA..S pcm_s16le PCM signed 16-bit little-endian DEA..S pcm_s16le_planar PCM signed 16-bit little-endian planar DEA..S pcm_s24be PCM signed 24-bit big-endian DEA..S pcm_s24daud PCM D-Cinema audio signed 24-bit DEA..S pcm_s24le PCM signed 24-bit little-endian DEA..S pcm_s24le_planar PCM signed 24-bit little-endian planar DEA..S pcm_s32be PCM signed 32-bit big-endian DEA..S pcm_s32le PCM signed 32-bit little-endian DEA..S pcm_s32le_planar PCM signed 32-bit little-endian planar DEA..S pcm_s64be PCM signed 64-bit big-endian DEA..S pcm_s64le PCM signed 64-bit little-endian DEA..S pcm_s8 PCM signed 8-bit DEA..S pcm_s8_planar PCM signed 8-bit planar DEA..S pcm_u16be PCM unsigned 16-bit big-endian DEA..S pcm_u16le PCM unsigned 16-bit little-endian DEA..S pcm_u24be PCM unsigned 24-bit big-endian DEA..S pcm_u24le PCM unsigned 24-bit little-endian DEA..S pcm_u32be PCM unsigned 32-bit big-endian DEA..S pcm_u32le PCM unsigned 32-bit little-endian DEA..S pcm_u8 PCM unsigned 8-bit D.A.L. pcm_zork PCM Zork D.A.L. qcelp QCELP / PureVoice D.A.L. qdm2 QDesign Music Codec 2 ..A.L. qdmc QDesign Music DEA.L. ra_144 RealAudio 1.0 (14.4K) (decoders: real_144 ) (encoders: real_144 ) D.A.L. ra_288 RealAudio 2.0 (28.8K) (decoders: real_288 ) D.A..S ralf RealAudio Lossless DEA.L. roq_dpcm DPCM id RoQ DEA..S s302m SMPTE 302M D.A.L. sdx2_dpcm DPCM Squareroot-Delta-Exact D.A..S shorten Shorten D.A.L. sipr RealAudio SIPR / ACELP.NET D.A.L. smackaudio Smacker audio (decoders: smackaud ) ..A.L. smv SMV (Selectable Mode Vocoder) D.A.L. sol_dpcm DPCM Sol DEA... sonic Sonic .EA... sonicls Sonic lossless DEA.L. speex Speex (decoders: libspeex ) (encoders: libspeex ) D.A..S tak TAK (Tom's lossless Audio Kompressor) DEA..S truehd TrueHD D.A.L. truespeech DSP Group TrueSpeech DEA..S tta TTA (True Audio) D.A.L. twinvq VQF TwinVQ D.A.L. vmdaudio Sierra VMD audio DEA.L. vorbis Vorbis (decoders: vorbis libvorbis ) (encoders: vorbis libvorbis ) ..A.L. voxware Voxware RT29 Metasound D.A... wavesynth Wave synthesis pseudo-codec DEA.LS wavpack WavPack (encoders: wavpack libwavpack ) D.A.L. westwood_snd1 Westwood Audio (SND1) (decoders: ws_snd1 ) D.A..S wmalossless Windows Media Audio Lossless D.A.L. wmapro Windows Media Audio 9 Professional DEA.L. wmav1 Windows Media Audio 1 DEA.L. wmav2 Windows Media Audio 2 D.A.L. wmavoice Windows Media Audio Voice D.A.L. xan_dpcm DPCM Xan D.A.L. xma1 Xbox Media Audio 1 D.A.L. xma2 Xbox Media Audio 2 ..D... bin_data binary data ..D... dvd_nav_packet DVD Nav packet ..D... klv SMPTE 336M Key-Length-Value (KLV) metadata ..D... otf OpenType font ..D... scte_35 SCTE 35 Message Queue ..D... timed_id3 timed ID3 metadata ..D... ttf TrueType font DES... ass ASS (Advanced SSA) subtitle (decoders: ssa ass ) (encoders: ssa ass ) DES... dvb_subtitle DVB subtitles (decoders: dvbsub ) (encoders: dvbsub ) D.S... dvb_teletext DVB teletext (decoders: libzvbi_teletextdec ) DES... dvd_subtitle DVD subtitles (decoders: dvdsub ) (encoders: dvdsub ) D.S... eia_608 EIA-608 closed captions (decoders: cc_dec ) D.S... hdmv_pgs_subtitle HDMV Presentation Graphic Stream subtitles (decoders: pgssub ) ..S... hdmv_text_subtitle HDMV Text subtitle D.S... jacosub JACOsub subtitle D.S... microdvd MicroDVD subtitle DES... mov_text MOV text D.S... mpl2 MPL2 subtitle D.S... pjs PJS (Phoenix Japanimation Society) subtitle D.S... realtext RealText subtitle D.S... sami SAMI subtitle ..S... srt SubRip subtitle with embedded timing ..S... ssa SSA (SubStation Alpha) subtitle D.S... stl Spruce subtitle format DES... subrip SubRip subtitle (decoders: srt subrip ) (encoders: srt subrip ) D.S... subviewer SubViewer subtitle D.S... subviewer1 SubViewer v1 subtitle DES... text raw UTF-8 text D.S... vplayer VPlayer subtitle DES... webvtt WebVTT subtitle DES... xsub XSUB

ccrisan commented 5 years ago

@ccrisan Do you remember when we switch over to buildroot that gives us buildroot change history?

Not sure what you mean, but:

Version 3.3.5 is good. I've been using this on all my cameras.

Maybe we should downgrade ffmpeg to 3.3.x for a dev build and see if the problem still occurs.

I know for a fact that rpi-firmware was broken since 1 year ago, and was only fixed in the Oct 2018 version, but we are still on the broken version.

Are you sure about that? I always update rpi-firmware and rpi-userland to latest versions used in Raspbian, at that moment. This being said, 20181209 and 20181129 should be past Oct 2018. I really hope we're talking about the prereleases here and not the latest stable 20180627.

ccrisan commented 5 years ago

@bertdebondt your ffmpeg indeed has OMX h264 acceleration support, but as far as I know, Motion won't use it on Rasbpian, unless patched; @jasaw may know more about this.

jasaw commented 5 years ago

Our current version of rpi-firmware (5b49caa) is from Sep 25, 2018, which still has the bug. Bug was only fixed on Oct 10, 2018. Anyway, this bug does not affect ffmpeg, so we can rule this out.

Maybe we should downgrade ffmpeg to 3.3.x for a dev build and see if the problem still occurs.

This is exactly what I'm thinking.

As for enabling h264_omx on Raspbian, see this: https://github.com/ccrisan/motioneye/issues/930#issuecomment-402326342

8OND007 commented 5 years ago

So my ffmpeg version was already OMX h264 accelerated. For motion I think I installed : https://github.com/Motion-Project/motion/releases/download/release-4.2.1/pi_stretch_motion_4.2.1-1_armhf.deb Since this is a Raspberry Pi version, I guess OMX support was also activated. My Raspbian motionEye setup keeps on running without any problems for more than a week now.

ccrisan commented 5 years ago

Guys, the latest nightly build (dev20190114) should contain the following fixes:

I haven't managed to test it yet though!

8OND007 commented 5 years ago

Hi Calin,

Just upgraded my version to your latest nightly build and activated h264 OMX movie recording again. First I thought I ran more stable but after increasing recording motion area and more frequent recording the same problem occurs.

Log files:

motion.log: [0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, trying to do a graceful restart

[0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, did NOT restart graceful, killing it!

[0:motion] [ERR] [ALL] main: cleaning Thread 1

motioneye.log: 2019-01-15 12:51:14: [motioneye] INFO: updating to version dev20190114... 2019-01-15 12:51:16: [motioneye] INFO: stopping motioneye watch script 2019-01-15 12:51:17: [motioneye] INFO: stopping netwatch script 2019-01-15 12:51:17: [motioneye] INFO: downloading firmware version dev20190114 2019-01-15 12:51:45: [motioneye] INFO: extracting firmware 2019-01-15 12:52:24: [motioneye] INFO: flashing boot partition 2019-01-15 12:52:38: [motioneye] INFO: rebooting 2019-01-15 12:53:47: [motioneye] INFO: hello! this is motionEye server 0.39.3 2019-01-15 12:53:50: [motioneye] INFO: cleanup started 2019-01-15 12:53:50: [motioneye] INFO: wsswitch started 2019-01-15 12:53:50: [motioneye] INFO: tasks started 2019-01-15 12:53:50: [motioneye] INFO: mjpg client garbage collector started 2019-01-15 12:53:50: [motioneye] INFO: smb mounts started 2019-01-15 12:53:50: [motioneye] INFO: server started 2019-01-15 12:57:02: [motioneye] INFO: interrupt signal received, shutting down... 2019-01-15 12:57:02: [motioneye] INFO: server stopped 2019-01-15 12:57:02: [motioneye] INFO: tasks stopped 2019-01-15 12:57:04: [motioneye] INFO: motion stopped 2019-01-15 12:57:04: [motioneye] INFO: smb mounts stopped 2019-01-15 12:57:04: [motioneye] INFO: bye! 2019-01-15 12:57:06: [motioneye] INFO: hello! this is motionEye server 0.39.3 2019-01-15 12:57:08: [motioneye] INFO: cleanup started 2019-01-15 12:57:08: [motioneye] INFO: wsswitch started 2019-01-15 12:57:09: [motioneye] INFO: tasks started 2019-01-15 12:57:09: [motioneye] INFO: mjpg client garbage collector started 2019-01-15 12:57:09: [motioneye] INFO: smb mounts started 2019-01-15 12:57:09: [motioneye] INFO: server started 2019-01-15 12:58:00: [motioneye] ERROR: failed to create movie preview for /data/media/sda1/2019-01-15/12-57-40.mp4: Command '[u'ffmpeg', u'-i', u'/data/media/sda1/2019-01-15/12-57-40.mp4', u'-f', u'mjpeg', u'-vframes', u'1', u'-ss', u'4', u'-y', u'/data/media/sda1/2019-01-15/12-57-40.mp4.thumb']' returned non-zero exit status 1 2019-01-15 13:02:40: [motioneye] ERROR: mjpg client timed out receiving data for camera 1 on port 8081 2019-01-15 13:02:50: [motioneye] ERROR: mjpg client timed out receiving data for camera 1 on port 8081 2019-01-15 13:03:00: [motioneye] ERROR: mjpg client timed out receiving data for camera 1 on port 8081 2019-01-15 13:03:10: [motioneye] ERROR: mjpg client timed out receiving data for camera 1 on port 8081 2019-01-15 13:03:20: [motioneye] ERROR: mjpg client timed out receiving data for camera 1 on port 8081 2019-01-15 13:03:30: [motioneye] ERROR: mjpg client timed out receiving data for camera 1 on port 8081 2019-01-15 13:03:40: [motioneye] ERROR: mjpg client timed out receiving data for camera 1 on port 8081 2019-01-15 13:03:50: [motioneye] ERROR: mjpg client timed out receiving data for camera 1 on port 8081 2019-01-15 13:03:59: [motioneye] WARNING: Connect error on fd 15: ECONNREFUSED 2019-01-15 13:04:00: [motioneye] WARNING: Connect error on fd 15: ECONNREFUSED 2019-01-15 13:04:00: [motioneye] WARNING: Connect error on fd 15: ECONNREFUSED 2019-01-15 13:04:00: [motioneye] WARNING: Connect error on fd 15: ECONNREFUSED .....................................................

messages.log: Jan 15 12:55:50 motionEye1 user.notice motion: [1994392168:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (WRN) Jan 15 12:56:08 motionEye1 auth.info sshd[3027]: WARNING: could not open /data/etc/moduli (No such file or directory), using fixed modulus Jan 15 12:56:12 motionEye1 auth.info sshd[3027]: Accepted none for admin from 192.168.1.101 port 1559 ssh2 Jan 15 12:57:00 motionEye1 cron.info crond[832]: USER root pid 3960 cmd /usr/bin/python /data/etc/sunriseset.py >> /var/log/daynight.log Jan 15 12:57:06 motionEye1 user.notice motion: [1994281576:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /data/etc/motion.conf Jan 15 12:57:06 motionEye1 user.alert motion: [1994281576:motion] [ALR] [ALL] conf_cmdparse: Deprecated config option "thread" since after version 3.4.1: Jan 15 12:57:06 motionEye1 user.alert motion: [1994281576:motion] [ALR] [ALL] conf_cmdparse: The "thread" option has been replaced by the "camera" option. Jan 15 12:57:06 motionEye1 user.notice motion: [1994281576:motion] [NTC] [ALL] config_camera: Processing camera config file thread-1.conf Jan 15 12:57:06 motionEye1 user.notice motion: [1994281576:motion] [NTC] [ALL] motion_startup: Motion 4.1.1 Started Jan 15 12:57:06 motionEye1 user.notice motion: [1994281576:motion] [NTC] [ALL] motion_startup: Logging to syslog Jan 15 12:57:06 motionEye1 user.notice motion: [1994281576:motion] [NTC] [ALL] motion_startup: Using default log type (ALL) Jan 15 12:57:06 motionEye1 user.notice motion: [1994281576:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (WRN) Jan 15 12:58:16 motionEye1 auth.info sshd[5171]: WARNING: could not open /data/etc/moduli (No such file or directory), using fixed modulus Jan 15 12:58:23 motionEye1 auth.info sshd[5171]: Accepted none for admin from 192.168.1.101 port 1597 ssh2 Jan 15 13:00:04 motionEye1 user.notice motion: [1995055720:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /data/etc/motion.conf Jan 15 13:00:04 motionEye1 user.alert motion: [1995055720:motion] [ALR] [ALL] conf_cmdparse: Deprecated config option "thread" since after version 3.4.1: Jan 15 13:00:04 motionEye1 user.alert motion: [1995055720:motion] [ALR] [ALL] conf_cmdparse: The "thread" option has been replaced by the "camera" option. Jan 15 13:00:04 motionEye1 user.notice motion: [1995055720:motion] [NTC] [ALL] config_camera: Processing camera config file thread-1.conf Jan 15 13:00:04 motionEye1 user.notice motion: [1995055720:motion] [NTC] [ALL] motion_startup: Motion 4.1.1 Started Jan 15 13:00:04 motionEye1 user.notice motion: [1995055720:motion] [NTC] [ALL] motion_startup: Logging to syslog Jan 15 13:00:04 motionEye1 user.notice motion: [1995055720:motion] [NTC] [ALL] motion_startup: Using default log type (ALL) Jan 15 13:00:04 motionEye1 user.notice motion: [1995055720:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (WRN) Jan 15 13:01:18 motionEye1 user.notice motion: [1994441320:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /data/etc/motion.conf Jan 15 13:01:18 motionEye1 user.alert motion: [1994441320:motion] [ALR] [ALL] conf_cmdparse: Deprecated config option "thread" since after version 3.4.1: Jan 15 13:01:18 motionEye1 user.alert motion: [1994441320:motion] [ALR] [ALL] conf_cmdparse: The "thread" option has been replaced by the "camera" option. Jan 15 13:01:18 motionEye1 user.notice motion: [1994441320:motion] [NTC] [ALL] config_camera: Processing camera config file thread-1.conf Jan 15 13:01:18 motionEye1 user.notice motion: [1994441320:motion] [NTC] [ALL] motion_startup: Motion 4.1.1 Started Jan 15 13:01:18 motionEye1 user.notice motion: [1994441320:motion] [NTC] [ALL] motion_startup: Logging to syslog Jan 15 13:01:18 motionEye1 user.notice motion: [1994441320:motion] [NTC] [ALL] motion_startup: Using default log type (ALL) Jan 15 13:01:18 motionEye1 user.notice motion: [1994441320:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (WRN) Jan 15 13:02:00 motionEye1 cron.info crond[832]: USER root pid 9024 cmd /usr/bin/python /data/etc/sunriseset.py >> /var/log/daynight.log Jan 15 13:02:58 motionEye1 user.err motion: [0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, trying to do a graceful restart Jan 15 13:03:58 motionEye1 user.err motion: [0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, did NOT restart graceful, killing it! Jan 15 13:03:59 motionEye1 user.err motion: [0:motion] [ERR] [ALL] main: cleaning Thread 1 Jan 15 13:07:00 motionEye1 cron.info crond[832]: USER root pid 11977 cmd /usr/bin/python /data/etc/sunriseset.py >> /var/log/daynight.log Jan 15 13:12:00 motionEye1 cron.info crond[832]: USER root pid 13348 cmd /usr/bin/python /data/etc/sunriseset.py >> /var/log/daynight.log

dmesg.log: ---- booting motionEyeOS dev20190114 ---- [Thu Jan 1 00:59:59 1970] Booting Linux on physical CPU 0xf00 [Thu Jan 1 00:59:59 1970] Linux version 4.14.79-v7 (root@504081ea6a57) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05)) #1 SMP Mon Jan 14 23:54:42 UTC 2019 [Thu Jan 1 00:59:59 1970] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [Thu Jan 1 00:59:59 1970] CPU: div instructions available: patching division code [Thu Jan 1 00:59:59 1970] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [Thu Jan 1 00:59:59 1970] OF: fdt: Machine model: Raspberry Pi 2 Model B Rev 1.1 [Thu Jan 1 00:59:59 1970] Memory policy: Data cache writealloc [Thu Jan 1 00:59:59 1970] cma: Reserved 8 MiB at 0x1f400000 [Thu Jan 1 00:59:59 1970] On node 0 totalpages: 131072 [Thu Jan 1 00:59:59 1970] free_area_init_node: node 0, pgdat 80c85480, node_mem_map 9ef80000 [Thu Jan 1 00:59:59 1970] Normal zone: 1152 pages used for memmap [Thu Jan 1 00:59:59 1970] Normal zone: 0 pages reserved [Thu Jan 1 00:59:59 1970] Normal zone: 131072 pages, LIFO batch:31 [Thu Jan 1 00:59:59 1970] percpu: Embedded 17 pages/cpu @9ff96000 s38668 r8192 d22772 u69632 [Thu Jan 1 00:59:59 1970] pcpu-alloc: s38668 r8192 d22772 u69632 alloc=17*4096 [Thu Jan 1 00:59:59 1970] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [Thu Jan 1 00:59:59 1970] Built 1 zonelists, mobility grouping on. Total pages: 129920 [Thu Jan 1 00:59:59 1970] Kernel command line: bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.fiq_fix_enable=1 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait ro rootflags=noload panic=10 quiet loglevel=1 ipv6.disable=1 [Thu Jan 1 00:59:59 1970] PID hash table entries: 2048 (order: 1, 8192 bytes) [Thu Jan 1 00:59:59 1970] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) [Thu Jan 1 00:59:59 1970] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) [Thu Jan 1 00:59:59 1970] Memory: 498092K/524288K available (7168K kernel code, 576K rwdata, 2084K rodata, 1024K init, 698K bss, 18004K reserved, 8192K cma-reserved) [Thu Jan 1 00:59:59 1970] Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xa0800000 - 0xff800000 (1520 MB) lowmem : 0x80000000 - 0xa0000000 ( 512 MB) modules : 0x7f000000 - 0x80000000 ( 16 MB) .text : 0x80008000 - 0x80800000 (8160 kB) .init : 0x80b00000 - 0x80c00000 (1024 kB) .data : 0x80c00000 - 0x80c903f4 ( 577 kB) .bss : 0x80c98054 - 0x80d468e0 ( 699 kB) [Thu Jan 1 00:59:59 1970] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [Thu Jan 1 00:59:59 1970] ftrace: allocating 25322 entries in 75 pages [Thu Jan 1 00:59:59 1970] Hierarchical RCU implementation. [Thu Jan 1 00:59:59 1970] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [Thu Jan 1 00:59:59 1970] arch_timer: cp15 timer(s) running at 19.20MHz (phys). [Thu Jan 1 00:59:59 1970] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns [Thu Jan 1 00:59:59 1970] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns [Thu Jan 1 00:59:59 1970] Switching to timer-based delay loop, resolution 52ns [Thu Jan 1 00:59:59 1970] Console: colour dummy device 80x30 [Thu Jan 1 00:59:59 1970] console [tty1] enabled [Thu Jan 1 00:59:59 1970] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000) [Thu Jan 1 00:59:59 1970] pid_max: default: 32768 minimum: 301 [Thu Jan 1 00:59:59 1970] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [Thu Jan 1 00:59:59 1970] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [Thu Jan 1 00:59:59 1970] Disabling memory control group subsystem [Thu Jan 1 00:59:59 1970] CPU: Testing write buffer coherency: ok [Thu Jan 1 00:59:59 1970] CPU0: update cpu_capacity 1024 [Thu Jan 1 00:59:59 1970] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00 [Thu Jan 1 00:59:59 1970] Setting up static identity map for 0x100000 - 0x10003c [Thu Jan 1 00:59:59 1970] Hierarchical SRCU implementation. [Thu Jan 1 00:59:59 1970] smp: Bringing up secondary CPUs ... [Thu Jan 1 00:59:59 1970] CPU1: update cpu_capacity 1024 [Thu Jan 1 00:59:59 1970] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01 [Thu Jan 1 00:59:59 1970] CPU2: update cpu_capacity 1024 [Thu Jan 1 00:59:59 1970] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02 [Thu Jan 1 00:59:59 1970] CPU3: update cpu_capacity 1024 [Thu Jan 1 00:59:59 1970] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03 [Thu Jan 1 00:59:59 1970] smp: Brought up 1 node, 4 CPUs [Thu Jan 1 00:59:59 1970] SMP: Total of 4 processors activated (153.60 BogoMIPS). [Thu Jan 1 00:59:59 1970] CPU: All CPU(s) started in HYP mode. [Thu Jan 1 00:59:59 1970] CPU: Virtualization extensions available. [Thu Jan 1 00:59:59 1970] devtmpfs: initialized [Thu Jan 1 00:59:59 1970] random: get_random_u32 called from bucket_table_alloc+0x108/0x234 with crng_init=0 [Thu Jan 1 00:59:59 1970] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [Thu Jan 1 00:59:59 1970] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [Thu Jan 1 00:59:59 1970] futex hash table entries: 1024 (order: 4, 65536 bytes) [Thu Jan 1 00:59:59 1970] pinctrl core: initialized pinctrl subsystem [Thu Jan 1 00:59:59 1970] NET: Registered protocol family 16 [Thu Jan 1 00:59:59 1970] DMA: preallocated 1024 KiB pool for atomic coherent allocations [Thu Jan 1 00:59:59 1970] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [Thu Jan 1 00:59:59 1970] hw-breakpoint: maximum watchpoint size is 8 bytes. [Thu Jan 1 00:59:59 1970] Serial: AMBA PL011 UART driver [Thu Jan 1 00:59:59 1970] bcm2835-mbox 3f00b880.mailbox: mailbox enabled [Thu Jan 1 00:59:59 1970] bcm2835-dma 3f007000.dma: DMA legacy API manager at a0813000, dmachans=0x1 [Thu Jan 1 00:59:59 1970] SCSI subsystem initialized [Thu Jan 1 00:59:59 1970] usbcore: registered new interface driver usbfs [Thu Jan 1 00:59:59 1970] usbcore: registered new interface driver hub [Thu Jan 1 00:59:59 1970] usbcore: registered new device driver usb [Thu Jan 1 00:59:59 1970] raspberrypi-firmware soc:firmware: Attached to firmware from 2018-11-04 16:35 [Thu Jan 1 00:59:59 1970] clocksource: Switched to clocksource arch_sys_counter [Thu Jan 1 00:59:59 1970] VFS: Disk quotas dquot_6.6.0 [Thu Jan 1 00:59:59 1970] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [Thu Jan 1 00:59:59 1970] FS-Cache: Loaded [Thu Jan 1 00:59:59 1970] CacheFiles: Loaded [Thu Jan 1 00:59:59 1970] NET: Registered protocol family 2 [Thu Jan 1 00:59:59 1970] TCP established hash table entries: 4096 (order: 2, 16384 bytes) [Thu Jan 1 00:59:59 1970] TCP bind hash table entries: 4096 (order: 3, 32768 bytes) [Thu Jan 1 00:59:59 1970] TCP: Hash tables configured (established 4096 bind 4096) [Thu Jan 1 00:59:59 1970] UDP hash table entries: 256 (order: 1, 8192 bytes) [Thu Jan 1 00:59:59 1970] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [Thu Jan 1 00:59:59 1970] NET: Registered protocol family 1 [Thu Jan 1 00:59:59 1970] RPC: Registered named UNIX socket transport module. [Thu Jan 1 00:59:59 1970] RPC: Registered udp transport module. [Thu Jan 1 00:59:59 1970] RPC: Registered tcp transport module. [Thu Jan 1 00:59:59 1970] RPC: Registered tcp NFSv4.1 backchannel transport module. [Thu Jan 1 00:59:59 1970] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available [Thu Jan 1 00:59:59 1970] workingset: timestamp_bits=14 max_order=17 bucket_order=3 [Thu Jan 1 00:59:59 1970] FS-Cache: Netfs 'nfs' registered for caching [Thu Jan 1 00:59:59 1970] NFS: Registering the id_resolver key type [Thu Jan 1 00:59:59 1970] Key type id_resolver registered [Thu Jan 1 00:59:59 1970] Key type id_legacy registered [Thu Jan 1 00:59:59 1970] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [Thu Jan 1 00:59:59 1970] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251) [Thu Jan 1 00:59:59 1970] io scheduler noop registered [Thu Jan 1 00:59:59 1970] io scheduler deadline registered [Thu Jan 1 00:59:59 1970] io scheduler cfq registered (default) [Thu Jan 1 00:59:59 1970] io scheduler mq-deadline registered [Thu Jan 1 00:59:59 1970] io scheduler kyber registered [Thu Jan 1 00:59:59 1970] BCM2708FB: allocated DMA memory df500000 [Thu Jan 1 00:59:59 1970] BCM2708FB: allocated DMA channel 0 @ a0813000 [Thu Jan 1 00:59:59 1970] Console: switching to colour frame buffer device 82x26 [Thu Jan 1 00:59:59 1970] bcm2835-rng 3f104000.rng: hwrng registered [Thu Jan 1 00:59:59 1970] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB) [Thu Jan 1 00:59:59 1970] vc-sm: Videocore shared memory driver [Thu Jan 1 00:59:59 1970] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000 [Thu Jan 1 00:59:59 1970] brd: module loaded [Thu Jan 1 00:59:59 1970] loop: module loaded [Thu Jan 1 00:59:59 1970] Loading iSCSI transport class v2.0-870. [Thu Jan 1 00:59:59 1970] libphy: Fixed MDIO Bus: probed [Thu Jan 1 00:59:59 1970] usbcore: registered new interface driver lan78xx [Thu Jan 1 00:59:59 1970] usbcore: registered new interface driver smsc95xx [Thu Jan 1 00:59:59 1970] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [Thu Jan 1 00:59:59 1970] dwc_otg 3f980000.usb: base=0xf0980000 [Thu Jan 1 00:59:59 1970] Core Release: 2.80a [Thu Jan 1 00:59:59 1970] Setting default values for core params [Thu Jan 1 00:59:59 1970] Finished setting default values for core params [Thu Jan 1 00:59:59 1970] Using Buffer DMA mode [Thu Jan 1 00:59:59 1970] Periodic Transfer Interrupt Enhancement - disabled [Thu Jan 1 00:59:59 1970] Multiprocessor Interrupt Enhancement - disabled [Thu Jan 1 00:59:59 1970] OTG VER PARAM: 0, OTG VER FLAG: 0 [Thu Jan 1 00:59:59 1970] Dedicated Tx FIFOs mode [Thu Jan 1 00:59:59 1970] WARN::dwc_otg_hcd_init:1046: FIQ DMA bounce buffers: virt = 0x9f514000 dma = 0xdf514000 len=9024 [Thu Jan 1 00:59:59 1970] FIQ FSM acceleration enabled for : Non-periodic Split Transactions Periodic Split Transactions High-Speed Isochronous Endpoints Interrupt/Control Split Transaction hack enabled [Thu Jan 1 00:59:59 1970] dwc_otg: Microframe scheduler enabled [Thu Jan 1 00:59:59 1970] WARN::hcd_init_fiq:459: FIQ on core 1 at 0x805f094c [Thu Jan 1 00:59:59 1970] WARN::hcd_init_fiq:460: FIQ ASM at 0x805f0cac length 36 [Thu Jan 1 00:59:59 1970] WARN::hcd_init_fiq:486: MPHI regs_base at 0xf0006000 [Thu Jan 1 00:59:59 1970] dwc_otg 3f980000.usb: DWC OTG Controller [Thu Jan 1 00:59:59 1970] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1 [Thu Jan 1 00:59:59 1970] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000 [Thu Jan 1 00:59:59 1970] Init: Port Power? op_state=1 [Thu Jan 1 00:59:59 1970] Init: Power Port (0) [Thu Jan 1 00:59:59 1970] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [Thu Jan 1 00:59:59 1970] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [Thu Jan 1 00:59:59 1970] usb usb1: Product: DWC OTG Controller [Thu Jan 1 00:59:59 1970] usb usb1: Manufacturer: Linux 4.14.79-v7 dwc_otg_hcd [Thu Jan 1 00:59:59 1970] usb usb1: SerialNumber: 3f980000.usb [Thu Jan 1 00:59:59 1970] hub 1-0:1.0: USB hub found [Thu Jan 1 00:59:59 1970] hub 1-0:1.0: 1 port detected [Thu Jan 1 00:59:59 1970] dwc_otg: FIQ enabled [Thu Jan 1 00:59:59 1970] dwc_otg: NAK holdoff enabled [Thu Jan 1 00:59:59 1970] dwc_otg: FIQ split-transaction FSM enabled [Thu Jan 1 00:59:59 1970] Module dwc_common_port init [Thu Jan 1 00:59:59 1970] usbcore: registered new interface driver usb-storage [Thu Jan 1 00:59:59 1970] mousedev: PS/2 mouse device common for all mice [Thu Jan 1 00:59:59 1970] IR NEC protocol handler initialized [Thu Jan 1 00:59:59 1970] IR RC5(x/sz) protocol handler initialized [Thu Jan 1 00:59:59 1970] IR RC6 protocol handler initialized [Thu Jan 1 00:59:59 1970] IR JVC protocol handler initialized [Thu Jan 1 00:59:59 1970] IR Sony protocol handler initialized [Thu Jan 1 00:59:59 1970] IR SANYO protocol handler initialized [Thu Jan 1 00:59:59 1970] IR Sharp protocol handler initialized [Thu Jan 1 00:59:59 1970] IR MCE Keyboard/mouse protocol handler initialized [Thu Jan 1 00:59:59 1970] IR XMP protocol handler initialized [Thu Jan 1 00:59:59 1970] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer [Thu Jan 1 00:59:59 1970] bcm2835-cpufreq: min=600000 max=800000 [Thu Jan 1 00:59:59 1970] sdhci: Secure Digital Host Controller Interface driver [Thu Jan 1 00:59:59 1970] sdhci: Copyright(c) Pierre Ossman [Thu Jan 1 00:59:59 1970] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe [Thu Jan 1 00:59:59 1970] sdhci-pltfm: SDHCI platform and OF driver helper [Thu Jan 1 00:59:59 1970] ledtrig-cpu: registered to indicate activity on CPUs [Thu Jan 1 00:59:59 1970] hidraw: raw HID events driver (C) Jiri Kosina [Thu Jan 1 00:59:59 1970] usbcore: registered new interface driver usbhid [Thu Jan 1 00:59:59 1970] usbhid: USB HID core driver [Thu Jan 1 00:59:59 1970] vchiq: vchiq_init_state: slot_zero = 9f580000, is_master = 0

[Thu Jan 1 00:59:59 1970] [vc_sm_connected_init]: end - returning 0 [Thu Jan 1 00:59:59 1970] ip_tables: (C) 2000-2006 Netfilter Core Team [Thu Jan 1 00:59:59 1970] Initializing XFRM netlink socket [Thu Jan 1 00:59:59 1970] NET: Registered protocol family 17 [Thu Jan 1 00:59:59 1970] Key type dns_resolver registered [Thu Jan 1 00:59:59 1970] Registering SWP/SWPB emulation handler [Thu Jan 1 00:59:59 1970] registered taskstats version 1 [Thu Jan 1 00:59:59 1970] uart-pl011 3f201000.serial: cts_event_workaround enabled [Thu Jan 1 00:59:59 1970] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2 [Thu Jan 1 00:59:59 1970] sdhost: log_buf @ 9f513000 (df513000) [Thu Jan 1 00:59:59 1970] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1) [Thu Jan 1 00:59:59 1970] of_cfs_init [Thu Jan 1 00:59:59 1970] of_cfs_init: OK [Thu Jan 1 00:59:59 1970] Waiting for root device /dev/mmcblk0p2... [Thu Jan 1 00:59:59 1970] mmc0: host does not support reading read-only switch, assuming write-enable [Thu Jan 1 00:59:59 1970] mmc0: new high speed SDHC card at address 1234 [Thu Jan 1 00:59:59 1970] mmcblk0: mmc0:1234 SA16G 14.5 GiB [Thu Jan 1 00:59:59 1970] mmcblk0: p1 p2 p3 [Thu Jan 1 00:59:59 1970] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: noload [Thu Jan 1 00:59:59 1970] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. [Thu Jan 1 00:59:59 1970] devtmpfs: mounted [Thu Jan 1 00:59:59 1970] Freeing unused kernel memory: 1024K [Thu Jan 1 00:59:59 1970] Indeed it is in host mode hprt0 = 00021501 [Thu Jan 1 00:59:59 1970] random: fast init done [Thu Jan 1 01:00:00 1970] usb 1-1: new high-speed USB device number 2 using dwc_otg [Thu Jan 1 01:00:00 1970] Indeed it is in host mode hprt0 = 00001101 [Thu Jan 1 01:00:00 1970] usb 1-1: New USB device found, idVendor=0424, idProduct=9514 [Thu Jan 1 01:00:00 1970] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [Thu Jan 1 01:00:00 1970] hub 1-1:1.0: USB hub found [Thu Jan 1 01:00:00 1970] hub 1-1:1.0: 5 ports detected [Thu Jan 1 01:00:00 1970] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null) [Thu Jan 1 01:00:00 1970] media: Linux media interface: v0.10 [Thu Jan 1 01:00:00 1970] usb 1-1.1: new high-speed USB device number 3 using dwc_otg [Thu Jan 1 01:00:00 1970] Linux video capture interface: v2.00 [Thu Jan 1 01:00:00 1970] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned. [Thu Jan 1 01:00:00 1970] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00 [Thu Jan 1 01:00:00 1970] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [Thu Jan 1 01:00:00 1970] smsc95xx v1.0.6 [Thu Jan 1 01:00:00 1970] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:e8:8d:8c [Thu Jan 1 01:00:01 1970] bcm2835-v4l2: scene mode selected 0, was 0 [Thu Jan 1 01:00:01 1970] bcm2835-v4l2: V4L2 device registered as video0 - stills mode > 1920x1200 [Thu Jan 1 01:00:01 1970] bcm2835-v4l2: Broadcom 2835 MMAL video capture ver 0.0.2 loaded. [Thu Jan 1 01:00:01 1970] usb 1-1.4: new high-speed USB device number 4 using dwc_otg [Thu Jan 1 01:00:01 1970] i2c /dev entries driver [Thu Jan 1 01:00:01 1970] usb 1-1.4: New USB device found, idVendor=0781, idProduct=5583 [Thu Jan 1 01:00:01 1970] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [Thu Jan 1 01:00:01 1970] usb 1-1.4: Product: Ultra Fit [Thu Jan 1 01:00:01 1970] usb 1-1.4: Manufacturer: SanDisk [Thu Jan 1 01:00:01 1970] usb 1-1.4: SerialNumber: 4C530001230713110484 [Thu Jan 1 01:00:01 1970] usb-storage 1-1.4:1.0: USB Mass Storage device detected [Thu Jan 1 01:00:01 1970] scsi host0: usb-storage 1-1.4:1.0 [Thu Jan 1 01:00:01 1970] udevd[219]: starting version 3.2.5 [Thu Jan 1 01:00:01 1970] random: udevd: uninitialized urandom read (16 bytes read) [Thu Jan 1 01:00:01 1970] random: udevd: uninitialized urandom read (16 bytes read) [Thu Jan 1 01:00:01 1970] random: udevd: uninitialized urandom read (16 bytes read) [Thu Jan 1 01:00:02 1970] udevd[220]: starting eudev-3.2.5 [Thu Jan 1 01:00:02 1970] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned. [Thu Jan 1 01:00:02 1970] bcm2835_alsa bcm2835_alsa: card created with 8 channels [Thu Jan 1 01:00:02 1970] scsi 0:0:0:0: Direct-Access SanDisk Ultra Fit 1.00 PQ: 0 ANSI: 6 [Thu Jan 1 01:00:02 1970] sd 0:0:0:0: [sda] 30031250 512-byte logical blocks: (15.4 GB/14.3 GiB) [Thu Jan 1 01:00:02 1970] sd 0:0:0:0: [sda] Write Protect is off [Thu Jan 1 01:00:02 1970] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00 [Thu Jan 1 01:00:02 1970] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [Thu Jan 1 01:00:02 1970] sda: sda1 [Thu Jan 1 01:00:02 1970] sd 0:0:0:0: [sda] Attached SCSI removable disk [Thu Jan 1 01:00:02 1970] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. [Thu Jan 1 01:00:03 1970] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup [Thu Jan 1 01:00:04 1970] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xDDE1 [Thu Jan 1 01:00:05 1970] IPv6: Loaded, but administratively disabled, reboot required to enable [Thu Jan 1 01:00:06 1970] system date is 2019-01-15 12:53:43 [Thu Jan 1 01:00:06 1970] urandom_read: 2 callbacks suppressed [Thu Jan 1 01:00:06 1970] random: ssh-keygen: uninitialized urandom read (32 bytes read) [Thu Jan 1 01:00:08 1970] random: sshd: uninitialized urandom read (32 bytes read) [Thu Jan 1 01:00:08 1970] random: python: uninitialized urandom read (2500 bytes read) [Thu Jan 1 01:00:09 1970] random: python: uninitialized urandom read (32 bytes read) [Thu Jan 1 01:00:09 1970] random: python: uninitialized urandom read (32 bytes read) [Thu Jan 1 01:00:22 1970] random: crng init done

ccrisan commented 5 years ago

@bertdebondt that's a bummer. So ffmpeg and rpi-firmware are not to blame here. Guys, any more ideas?

davisstu commented 5 years ago

What was the reason for not upgrading to the latest version of Motion? It looks like MotionEye uses an old version of Motion, surely that's the next obvious step - to upgrade to the latest version?

ccrisan commented 5 years ago

@davisstu motionEye doesn't work well with Motion 4.2.

jasaw commented 5 years ago

@ccrisan @bertdebondt I managed to reproduce the problem at my end thanks to another user who is experiencing the same problem and documented steps to trigger the bug. The issue comes from either rpi-firmware or rpi-userland. This bug only shows up when the GPU is unable to cope with the data and motion starts reporting timeout on the camera thread (thread-1 in our case) and starts killing the thread. The logs below is what motion reports when we encounter this problem. Users who encountered this issue have loaded up the GPU either by pushing high resolution, or by pushing multiple camera streams to the GPU to encode.

[1:ml1] [INF] [EVT] event_new_video: Source FPS 2 [1:ml1] [NTC] [ENC] ffmpeg_set_codec: Using codec h264_omx [1:ml1] [INF] [ENC] ffmpeg_set_quality: h264_omx codec vbr/crf/bit_rate: 2250000 [1:ml1] [NTC] [EVT] event_newfile: File of type 8 saved to: /data/output/TestCam/2019-01-16/12-00-31.mp4 [1:ml1] [NTC] [ALL] motion_detected: Motion detected - starting event 1 [1:ml1] [DBG] [ENC] ffmpeg_encode_video: Receive packet threw EAGAIN returning -2 code :Resource temporarily unavailable [1:ml1] [DBG] [ENC] ffmpeg_put_image: Buffered packet [1:ml1] [DBG] [ENC] ffmpeg_encode_video: Receive packet threw EAGAIN returning -2 code :Resource temporarily unavailable [1:ml1] [DBG] [ENC] ffmpeg_put_image: Buffered packet [1:ml1] [DBG] [ENC] ffmpeg_encode_video: Receive packet threw EAGAIN returning -2 code :Resource temporarily unavailable [1:ml1] [DBG] [ENC] ffmpeg_put_image: Buffered packet [1:ml1] [DBG] [ENC] ffmpeg_encode_video: Receive packet threw EAGAIN returning -2 code :Resource temporarily unavailable [1:ml1] [DBG] [ENC] ffmpeg_put_image: Buffered packet [1:ml1] [DBG] [ENC] ffmpeg_encode_video: Receive packet threw EAGAIN returning -2 code :Resource temporarily unavailable [1:ml1] [DBG] [ENC] ffmpeg_put_image: Buffered packet [0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, trying to do a graceful restart [0:motion] [ERR] [ALL] main: Thread 1 - Watchdog timeout, did NOT restart graceful, killing it! [0:motion] [ERR] [ALL] main: cleaning Thread 1

I rolled the rpi-firmware and rpi-userland back to the version used in 20180627, and this problem disappeared. I don't know what change triggered this bug in the rpi-firmware/userland. https://github.com/raspberrypi/firmware/issues/1051#issuecomment-426232817 might have something to do with it?

What can we do to address this issue? I don't know yet...

ccrisan commented 5 years ago

@jasaw that's a very good finding. For now, I'll downgrade the rpi-firmware and userland and hope they work well with the latest kernel & everything.

In the meantime, since the issue you referenced in rpi-firmware seems to have been fixed for everyone, I believe it's not our issue. Nevertheless, it may be worth reporting our problem to them.

Do you think Motion-4.2 has a chance to fix/workaround this problem?

jasaw commented 5 years ago

@ccrisan After a bit more testing, I'm starting to think this is a motion software problem. When motion prints "Buffered packet" and EAGAIN, it is still recording the video just fine. After 30 seconds of EAGAIN messages, motion decided that watchdog has timed out and kills the camera thread even though the camera thread is still doing its job. I'm marking this as a motion bug for now. I've reported this to motion project too: https://github.com/Motion-Project/motion/issues/888

I don't know what the side effects are for using old rpi-firmware/userland with new kernel, but we should still roll back as a temporary workaround until we can fix it in motion.

Regarding motion 4.2, I highly doubt that 4.2 is going to fix this problem.

jasaw commented 5 years ago

@ccrisan I'm pretty sure what we have is this bug: https://github.com/raspberrypi/firmware/issues/1087 I've applied this patch and seems to have fixed the problem. I've renamed it to txt for attaching patch here. Sorry I haven't got time to create a PR. If you want, you can give this patch a try. omx-handle-endofframe.patch.txt

ccrisan commented 5 years ago

@jasaw I will happily apply the patch myself but I'm a bit lost here. The rpi-firmware bug 1087 you mention, is that the bug? So you're not suspecting Motion anymore?

A new nightly build will be soon available with rpi-firmware and rpi-userland from summer 2018, hoping it'll make this problem go away.

Again, if you think or know that the patch solves this problem entirely, even for recent rpi-firmware variants, do let me know so I can upgrade the packages back again and get this fixed for once and for always.

6by9 commented 5 years ago

(Pi firmware developer here) I can't say whether raspberrypi/firmware#1087 is your actual bug, but to give some history.

FFmpeg appears to have always had an issue in how it handles OMX components. IL allows you to split encoded frames over multiple buffers if required. FFmpeg attempts to handle this by checking for the OMX_BUFFERFLAG_ENDOFFRAME flag, but it then doesn't wait for a buffer to be returned. The default configuration is for only a single output buffer, so the likelihood of having just returned that one buffer to the GPU and expecting it to be filled and returned by a dozen lines later is incredibly low. The default buffer size is 64kB, so handles the majority of frames except at very high bitrates.

In the firmware release of 9th July we changed the video_encode component to use a hardware block in the input stage as it gives a significant performance advantage. This tweaks the timing slightly, and FFmpeg's flawed output buffer handling starts failing to collect all the buffers in a frame. The codec output FIFO (2MB) isn't being drained correctly, and eventually the codec stalls due to having no space remaining. edit: With the output FIFO full, the codec won't return the input buffer until it can process it, and FFmpeg actually ends up waiting for an input buffer.

The diff to FFmpeg corrects the behaviour so that it collects all the data in each frame, and therefore the codec won't stall.

jasaw commented 5 years ago

@6by9 Thank you for the detailed explanation. Your ffmpeg OMX_BUFFERFLAG_ENDOFFRAME patch has been working well for me.

@ccrisan The bug appears to be in ffmpeg and not motion software. I've created a PR that adds this OMX_BUFFERFLAG_ENDOFFRAME patch, and we should be able to revert back to latest rpi-firmware. I think we should put this into a nightly build and put it out for testing.

ccrisan commented 5 years ago

Guys, that's great news. I'll make sure to prepare the next nightly build according to all these, but unfortunately my CI machine just crashed and I need to see what's going on. I'll keep you posted, here.

ccrisan commented 5 years ago

dev20190118 should contain the ffmpeg patch added by @jasaw. Please test it and let us know if the problem is fixed.

rullywowr commented 5 years ago

Thank you all. I installed the new dev20190118 build at 1:30 UTC (8:30AM EST). Will report back in 24h to provide an update on the status. Glad to provide any additional info you may like to see.

8OND007 commented 5 years ago

I also installed it and it looks like the problem is fixed. Raspberry Pi OMX MP4 h264 encoding is working now without losing Pi camera connection. Will also report back in full 24h for final update. But it lookd good. Made already motion recording where in previous situation, recording already crashed.

ccrisan commented 5 years ago

Closed via b80aedfeaaa421ba4fbfea4afdc8ae4a4fd1f11a.

rullywowr commented 5 years ago

Fixed for me too! Thank you all.

IAmOrion commented 5 years ago

If I set up the new nightly build, can subsequent versions be updated ok? (I'm assuming the warning about not updating is only if you're coming from 20180627 or earlier?)

davisstu commented 5 years ago

If I set up the new nightly build, can subsequent versions be updated ok? (I'm assuming the warning about not updating is only if you're coming from 20180627 or earlier?)

Worst case scenario would be to backup your config file, fresh install and reapply config. I tend to do this on major releases anyway, as the inbuilt upgrade tends to be unreliable.

ccrisan commented 5 years ago

@IAmOrion yes, you will be able to upgrade seamlessly afterwards. Nevertheless I recommend using the latest pre-release (instead of nightly). No significant difference, just the fact that it's a proper release with version & everything.