popcornmix / omxplayer

omxplayer
GNU General Public License v2.0
1.02k stars 334 forks source link

omxplayer.bin: OMXCore.cpp:785 OMX_ERRORTYPE COMXCoreCOmponent:FreeInputBuffers(): Assertion 'm_omx_input_buffers.size() == m_omx_input_available.size()' failed. #451

Closed mensurdurakovic closed 8 years ago

mensurdurakovic commented 8 years ago

Hi! I get error in title when I am trying to loop videos on my Raspberry Pi 3. Command is:

/usr/bin/omxplayer --no-osd --loop myVideo.mp4

It run perfectly for some time (sometimes 20 minutes, sometimes 3 hours, sometimes 5 hours and maybe longer) but then it freezes. CPU and RAM values are normal. OMXPlayer version is the newest one available. So far I tried to install latest Raspbian with Noobs, plain Raspbian image and Raspbian Lite (tried with LXDE and XFCE GUI, still same problem). Funny, I have colleague that works on similar project and he runs his Raspbian in console mode and is playing MP4 videos with same command and doesn't have any problems. I must run Raspbian in Desktop mode, and need to fix this. We both have same version of OMXPlayer (f544084). I google but only advice I found is to increase GPU memory of raspberry pi from 64 to 128. Tried that too, but nothing changed.

I also searched on issues and looks like only solution to this problem is to play videos with hello_video.c, which I don't like because then I have to change my whole project. Is there any way to fix this and to play .MP4 videos in loop without hello_video.c ?

Also some people suggest that OMXPlayer is having trouble playing short videos ? What is short video for OMXPlayer ? I am playing video which duration is around 1 minute and it still freezes ? What is minimal duration for video that guarantees no freezes when playing with --loop param ?

jehutting commented 8 years ago

I would say problem short videos have a duration less than 1 minute :-)

I assume you are running Jessie?

Update your omxplayer from http://omxplayer.sconde.net/.

I am not using the desktop at all. So, after a startx do you run omxplayer within a terminal? If not please show how I should start it than. I have a 1 minute video, so I can give it a try.

If you could use the -g option to generate logging into omxplayer.log would be helpful. Be aware that the log file can be big when you run omxplayer for a long time!

mensurdurakovic commented 8 years ago

Tried with video that is exactly 1 minute and 8 sec long. And it freezes every time. Now I made 5+ minutes video from that video and will see what happens. Yes, I am using latest Raspian Jessie. I am not running it with console command, I have python script that is manipulating with OMXPlayer with help of Pexpect module. But I also tried to run simple console command to loop video with OMXPlayer, and it also freezes. I will try to update OMXPlayer from link that you gave and do some testing. I will update you how things are going.

mensurdurakovic commented 8 years ago

With newest version of OMXPlayer (6c90c75) last 5 seconds from video are not showed. Worse than before... I will try to copy my video multiple times and merge it into one 3-4 minute video to see what happens.

popcornmix commented 8 years ago

There has been a firmware fix for errors like this. You can get it with rpi-update or wait for the next apt-get bump (probably within the next week).

mensurdurakovic commented 8 years ago

Yesterday when I installed 2 SD cards with blank new Raspbian Lite, added on one SD card LXDE GUI on another LXCFE GUI, after that installed OMXPlayer with

apt-get install omxplayer 

and after that I did:

apt-get update
apt-get upgrade

but I still got freezing effect. No longer working, so can't check but maybe you don't get newest (6c90c75) version of OMXPlayer with apt-get. I will try it Monday, hope you are right.

jehutting commented 8 years ago

I looped (within a GUI/terminal) a 1 minute video. After an hour it gave the same faults as the OP mentioned. As popcornmix recommended I did a sudo rpi-update. My RPI3-Jessie has ran almost 7 hours without giving the fault.

Popcornmix also mentioned (in issue 441 #issuecomment-217631874)

...updated the omxplayer in raspberrypi repo, so apt-get upgrade omxplayer should also get the latest version.

(Checked it and indeed...it is now version 6c90c75 :)

popcornmix commented 8 years ago

@mensurdurakovic as I said:

There has been a firmware fix for errors like this. You can get it with rpi-update or wait for the next apt-get bump (probably within the next week).

OMID-313 commented 8 years ago

Thanks @popcornmix for the firmware fix of this freeze bug. I look enthusiastically forward to this upcoming apt-get update.

mensurdurakovic commented 8 years ago

Updated firmware on both devices, and started them with --loop params, also merged videos so that they are at least 2 minutes long. Will update you tommorrow how things are going. Thanks everyone for help! :)

OMID-313 commented 8 years ago

New news on the update via apt-get !? @popcornmix

mensurdurakovic commented 8 years ago

Can confirm that OMXPlayer now works without any problems (after rpi-update and newest version) , was running almost 24 hours without any problems.

OMID-313 commented 8 years ago

Thanks @mensurdurakovic for your info. Would you please provide the following information of your successful test?

  1. RPi 2 or RPi 3 !?
  2. Raspbian wheezy or jessie !?
  3. Which version of omxplayer ? Thanks.
mensurdurakovic commented 8 years ago

RPI3, Raspbian Jessie, OMXPlayer version is 6c90c75

OMID-313 commented 8 years ago

Thanks again @mensurdurakovic for provided info. I'm currently Using RPi 2 B+, Raspbian Wheezy, and older version of omxplayer. If I want to solve this problem, how can I update the whole system!?

mensurdurakovic commented 8 years ago

try with apt-get update and apt-get upgrade, also my friend is using wheezy and he has no problems with omxplayer, but he is running his python scripts in console mode and is using omxplayer version f544084

OMID-313 commented 8 years ago

Thanks again @mensurdurakovic for your help. But I think the update of omxplayer is not ready yet to get via apt-get, as @popcornmix mentioned a few posts above. Am I wrong?

mensurdurakovic commented 8 years ago

then download .deb file from this url and install it manualy: http://omxplayer.sconde.net/

popcornmix commented 8 years ago

Note this bug is not fixed by updating omxplayer. It is fixed by updating firmware. I'd suggest you wait a few days for the new raspbian release (there will be be a blog post about it). Then run sudo apt-get update && sudo apt-get dist-upgrade

OMID-313 commented 8 years ago

Thanks @popcornmix for your updated news. So you mean, in order to fix this bug, we have to upgrade to Jessie; right? Is there any way to remain in wheezy and fix this bug !?

popcornmix commented 8 years ago

Wheezy is no longer support so I'd recommend upgrading. I suspect that running rpi-update will get you the latest firmware, and installing the deb file from http://omxplayer.sconde.net/ will get you the latest omxplayer which may fix this bug, but that wouldn't be a configuration we are supporting.

OMID-313 commented 8 years ago

Thanks @popcornmix for your detailed help. So, I think I'd better wait for a few days until the official update is released. It's safer :D

popcornmix commented 8 years ago

I think you misunderstand. Wheezy is unsupported. You will never get this update however long you wait.

The fixes are currently present for users of Jessie.

You just either upgrade to Jessie, or do the hacky, unsupported manual update (using rpi-update and installing the omxplayer deb file).

OMID-313 commented 8 years ago

Thanks again @popcornmix . I mean I'll wait for upgrading to Jessie, via official release ;)

popcornmix commented 8 years ago

But updated Jessie is here now. I'm not sure what you waiting for. https://www.raspberrypi.org/blog/another-update-raspbian/

OMID-313 commented 8 years ago

@popcornmix You mentioned a few posts above :

I'd suggest you wait a few days for the new raspbian release (there will be be a blog post about it). Then run sudo apt-get update && sudo apt-get dist-upgrade

The new update is what you meant a few days ago; right !?

One more question: I have one RPi 2 B+ with wheezy, and one RPi 3 with jessie. If I want to upgrade both of them to the latest jessie framework, does the following method work for both of them?

sudo apt-get update
sudo apt-get dist-upgrade
popcornmix commented 8 years ago

Instructions for updating the jessie image are in the linked blog post. Updating from wheezy is unsupported, but there are instructions linked from here: https://www.raspberrypi.org/blog/raspbian-jessie-is-here/

OMID-313 commented 8 years ago

Thanks @popcornmix for your time and detailed help (and also patience with me being newbie to linux!!).

One last question: Does this upgrade instructions work with other raspbian-jessie based OSs too? For example, minibian is a very minimal version of raspbian jessie. If I follow the above upgrade instructions, will it work for minibian framework update too !?

popcornmix commented 8 years ago

The instructions are for raspbian. I can't answer for variants I haven't tested - you would need to ask the minibian devs.

subogero commented 8 years ago

BTW, I have added the latest build from http://omxplayer.sconde.net to my deb package repo. Add this the /etc/apt/sources.list or a file under /etc/apt/sources.list.d to use:

deb http://linux.subogero.com/deb/ /
subogero commented 8 years ago

Version omxplayer_0.3.7~git20160506~6c90c75_armhf.deb seems to run OK under omxd on a RPi2 with Minibian Jessie.

popcornmix commented 8 years ago

Original issue reported is confirmed as fixed so closing.