-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
H264 MMAL encoder stops sending output buffers #1562
Comments
@6by9 Hi again. I brought a strange problem here that looks like #417 from 2015. It looks a little different, but it may be related. I would like to think that the problem is in my code, but it seems that something is wrong with the board. Interestingly, the encoders behave a little differently. The encoder on a "working" board generates a key frame and small frames of only a few bytes. The "faulty" board generates frames each 1 kilobyte in size and then the encoder freezes. See fail.txt and ok.txt. |
Found another two another 1.2 4gb. Can't reproduce. Only one board affected. PS: Kernel params: cma=128, gpu_mem=128M. Tried both to 256 also. No underpower issues. |
My user bought another 4gb rev 1.2 board and this problem does not reproduce on it. Could it be that he just came across a device with a defect? Maybe it's some difference in microcode (I don't know if it's in the RPi), EEPROM? |
Just to confirm, are you using the same sdcard on the two Pi4s? |
There was a new memory card for the new Pi. However, on the old Pi and the old memory card, we completely overwritten the images. Do you think it could be related to a broken card? About the eeprom and power supply: I'll ask him to do a test and let him know. I will also ask you to swap the memory cards and check again. |
If you want to confirm if the problem is a hardware issue in the Pi4 then it's much more conclusive to test with the same sdcard on each. Otherwise there may be some unexpected difference in configuration between the two sdcards that is causing the issue. |
You're right. We'll check it out. |
@popcornmix The user says that he tried 5 different memory cards on the broken board. Not the same as on the working one, but it seems to rule out the problem of a broken memory card. However, he will test this and overvoltage in the coming days. We also checked the eeprom version: there was an older one on the working board. We updated it, but nothing broke, so it's not about the eeprom. |
I wasn't thinking of a broken memory card. More a difference in configuration. You are currently saying That doesn't narrow down the issue. If you can say: it's a lot easier to say the hardware is faulty. Even better if you only swap the Pi board. e.g. leave sdcard, power supply, attached peripherals, display connected, camera etc the same. |
I understand you now. We have already excluded the difference in the software - each time it was the same OS image. Right now we checked Does checking for a raspberry replacement still make sense? If yes, I will ask the user to run the test exactly as you said. |
ok, i'm the user with the somewhat broken pi4. |
i have indeed exactly done this: "it's a lot easier to say the hardware is faulty. Even better if you only swap the Pi board. e.g. leave sdcard, power supply, attached peripherals, display connected, camera etc the same." |
Can you report output of |
You mean
|
Correct. That version is new enough. I think we'd describe that board as an outlier, where one of the blocks is unreliable at default voltage. You could also try with
Up to you if you stick with that setting in config.txt or seek a replacement unit from your seller (which is unlikely to have this issue). |
@popcornmix It looks like |
Describe the bug
The H264 MMAL encoder stops sending output buffers shortly after the process begins. It seems that the problem is somehow related to the hardware and possibly a specific board. Maybe it's a hardware bug or a defect. The problem is reproduced on two boards out of at least several hundred. On my own Pi4 is not reproduced but is reproduced by my user. The problem is not related to any video capture devices, just start the process of encoding the RAW image.
To reproduce
The exact method of reproduction is unknown, it's only known that on two different boards (rev1.2 4gb and rev1.1 1gb) with the same cores and firmware, the results are different.
ustreamer --encoder=noop --device=foo --h264-sink=test
.I've attached two logs: for rev 1.2 where there is a hang and for rev 1.1 where there is no hang. For 1.2, the hang occurs in 100% of cases after startup due to the inability to wait for the output buffer. After killing and restarting the ustreamer, mmal_wrapper_create() freezes as well. I guess the component goes into some kind of dead state. A couple of logs are attached at the bottom: reports from a hung board and one log with a working one.
System
Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:
Linux pikvm 5.10.23-2-ARCH #1 SMP Thu Mar 18 18:33:35 MSK 2021 armv7l GNU/Linux
Logs
Hanging: fail.txt and vcdbg.txt
No hanging:
ok.txt
The text was updated successfully, but these errors were encountered: