Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera stops working several times a day #1730

Closed
thejoester opened this issue Dec 3, 2018 · 53 comments
Closed

Camera stops working several times a day #1730

thejoester opened this issue Dec 3, 2018 · 53 comments
Labels

Comments

@thejoester
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link

IAmOrion commented Dec 4, 2018

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

github.com//issues/1582

@thejoester
Copy link
Author

@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
Copy link
Author

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
Copy link

8OND007 commented Dec 16, 2018

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
Copy link
Author

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
Copy link

8OND007 commented Dec 17, 2018

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
Copy link
Author

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

@davisstu
Copy link

davisstu commented Jan 2, 2019

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
Copy link

8OND007 commented Jan 2, 2019

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
Copy link

davisstu commented Jan 4, 2019

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
Copy link

8OND007 commented Jan 5, 2019

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
Copy link

davisstu commented Jan 5, 2019

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

@8OND007
Copy link

8OND007 commented Jan 6, 2019

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
Copy link
Collaborator

jasaw commented Jan 6, 2019

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
Copy link
Collaborator

ccrisan commented Jan 11, 2019

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
Copy link

8OND007 commented Jan 11, 2019

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" #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-1deb9u1+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 :

  • bug in included ffmpeg ?
  • configured GPU memory (256 mb) too small for 1600x1200 resolution encoding ?

@ccrisan
Copy link
Collaborator

ccrisan commented Jan 11, 2019

@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
Copy link

8OND007 commented Jan 11, 2019

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
Copy link
Collaborator

ccrisan commented Jan 11, 2019

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

@8OND007
Copy link

8OND007 commented Jan 11, 2019

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
Copy link
Collaborator

ccrisan commented Jan 11, 2019

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

@jasaw
Copy link
Collaborator

jasaw commented Jan 12, 2019

ffmpeg version changes in buildroot:

  • version 3.4.3 - Jul 15, 2018
  • version 3.4.2 - Feb 16, 2018 (but we were still using version 3.3.4 at that time)
    @ccrisan Do you remember when we switch over to buildroot that gives us buildroot change history?

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.

  • May 20, 2018 - buildroot's rpi-firmware got bumped to a version that is likely to contain this bug.
    From what you guys are saying, it is unlikely to be this bug either, because you guys are only seeing motion thread-1 crashing, and not the entire Pi locking up.

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
Copy link

8OND007 commented Jan 12, 2019

@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-1deb9u1+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
Copy link
Collaborator

ccrisan commented Jan 13, 2019

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

Not sure what you mean, but:

  • 20181129 is the first version built from the git repo that has common history with BuildRoot.
  • motionEyeOS often has newer versions than BuildRoot for some important packages, such as rpi-firmware or ffmpeg

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
Copy link
Collaborator

ccrisan commented Jan 13, 2019

@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
Copy link
Collaborator

jasaw commented Jan 13, 2019

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: motioneye-project/motioneye#930 (comment)

@8OND007
Copy link

8OND007 commented Jan 14, 2019

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
Copy link
Collaborator

ccrisan commented Jan 15, 2019

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

@davisstu
Copy link

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
Copy link
Collaborator

ccrisan commented Jan 15, 2019

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

@jasaw
Copy link
Collaborator

jasaw commented Jan 16, 2019

@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. raspberrypi/firmware#1051 (comment) might have something to do with it?

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

@jasaw jasaw added the bug label Jan 16, 2019
@ccrisan
Copy link
Collaborator

ccrisan commented Jan 16, 2019

@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 jasaw added the motion label Jan 16, 2019
@jasaw
Copy link
Collaborator

jasaw commented Jan 17, 2019

@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: Motion-Project/motion#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
Copy link
Collaborator

jasaw commented Jan 17, 2019

@ccrisan I'm pretty sure what we have is this bug: raspberrypi/firmware#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
Copy link
Collaborator

ccrisan commented Jan 17, 2019

@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
Copy link

6by9 commented Jan 17, 2019

(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
Copy link
Collaborator

jasaw commented Jan 17, 2019

@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
Copy link
Collaborator

ccrisan commented Jan 17, 2019

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 ccrisan removed the motion label Jan 17, 2019
@ccrisan
Copy link
Collaborator

ccrisan commented Jan 18, 2019

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

@rullywowr
Copy link

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
Copy link

8OND007 commented Jan 18, 2019

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
Copy link
Collaborator

ccrisan commented Jan 19, 2019

Closed via b80aedf.

@ccrisan ccrisan closed this as completed Jan 19, 2019
@rullywowr
Copy link

Fixed for me too! Thank you all.

@IAmOrion
Copy link

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
Copy link

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
Copy link
Collaborator

ccrisan commented Jan 23, 2019

@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.

@IAmOrion
Copy link

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.

The problem with that, is in my usage case, my Pi's are all remote and a royal pain the behind to get to.

@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.

Great, thanks. I did actually mean the pre-release (20190119) and not nightly, but thanks for the info.

I'm hoping this will also fix my issues from here #1582

@functionalprototype
Copy link

I'm seeing this problem on a Raspberry Pi 3 Model B Plus Rev 1.3, motionEye Version | 0.42.1, Motion Version | 4.2.2+gitUNKNOWN, OS Version | motionEyeOS 20200606

Should I open a new issue or ask that this one be re-opened?

@starbasessd
Copy link

Open a new on if 20190911, 20200203, or dev20201026 do not resolve it. There are many known issues with 20200606.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

10 participants