mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
393 stars 115 forks source link

error decoding video (receiving frame): End of file #709

Closed sergiohinniger closed 2 years ago

sergiohinniger commented 2 years ago

I have a RPi4 and use attract with X11 on top of Raspian Lite. Recently i've updated attract mode to 2.6.2 and apparently everything was fine, the videos are playing fine, but in the console appears endless error messages: "error decoding video (receiving frame): End of file"

I have reinstalled all packages and dependencies (using apt --reinstall install) and recompiled attract without luck. I dont know what could it be.

meliton commented 2 years ago

I compiled attract for Pi 3 and for a standard x86 PC and get the same errors during the screensaver when it's playing mp4's (snaps). It happens randomly on version 2.6.2, but not on 2.6.1. It's similar to issue #699 (locks up on Pi 3 during screensaver), and on x86 computers, it exits attract with "error decoding video" messages in the log.

sergiohinniger commented 2 years ago

In my case, i have snaps running, and they are working fine, but i dont know why, the console keeps showing that error

meliton commented 2 years ago

The error put in the log file is generated by the src\media.cpp file (line 789). It looks like an issue with avcodec_send_packet or the associated codec.

sergiohinniger commented 2 years ago

I installed attract using this tutorial: https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-4-(Raspbian-Buster) The ffmpeg library is old, so i compiled ffmpeg, but the error persists

meliton commented 2 years ago

I've got Pi 2's, 3's and 4's. I'll try this on the Pi 4 and see what happens. I suspect the problem is a mismatch between the libavcodec that's supported by the OS. According to https://packages.debian.org/search?suite=buster&searchon=names&keywords=libavcodec Buster is using libavcodec58. Are you using the Buster or Bullseye RaspiOS? What output do you get from attract --version ?

sergiohinniger commented 2 years ago

i have compiled ffmpeg and didnt solve, but i think i solved the issue. I compiled ffmpeg with mmal, and compiled attract with xinerama and mmal, without drm, like this.:

mkdir ~/build
cd ~/build
git clone --depth 1 https://github.com/mickelson/attract attract
cd ~/build/attract
make -j5 USE_XINERAMA=1 USE_LIBCURL=1 USE_MMAL=1 EXTRA_CFLAGS="-w -Wno-psabi -Wno-deprecated -Wno-deprecated-declarations -Wno-narrowing"
sudo make install USE_XINERAMA=1 USE_LIBCURL=1 USE_MMAL=1
cd ~
rm -rf ~/build

I need Xinerama to use a second monitor as marquee, and with only mmal and DRM its not possible. Now is working. Tks for the help

OzFalcon commented 2 years ago

710 is the same as this prior issue.