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

Support for non-IT8951 displays #3

Open
apvlv opened this issue Apr 26, 2021 · 8 comments
Open

Support for non-IT8951 displays #3

apvlv opened this issue Apr 26, 2021 · 8 comments

Comments

@apvlv
Copy link

apvlv commented Apr 26, 2021

Hello,

thank you for sharing this project. I have a problem with this project though and don't know where to start searching.

Hardware: Raspberry Pi Zero WH, Waveshare 7,5" 800x480 V2 screen. (https://www.waveshare.com/wiki/7.5inch_e-Paper_HAT)
Software: I built ffmpeg from source on raspbian, installed the bcm2835 library and then compiled vsmp without problems.

ffmpeg output:

ffmpeg version N-102011-g098314e1e5 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --extra-ldflags=-latomic --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree --extra-libs=-latomic
  libavutil      56. 73.100 / 56. 73.100
  libavcodec     58.136.101 / 58.136.101
  libavformat    58. 78.100 / 58. 78.100
  libavdevice    58. 14.100 / 58. 14.100
  libavfilter     7.111.100 /  7.111.100
  libswscale      5. 10.100 /  5. 10.100
  libswresample   3. 10.100 /  3. 10.100
  libpostproc    55. 10.100 / 55. 10.100
Hyper fast Audio and Video encoder

And i encoded a sample movie file using your ffmpeg settings, only changed the width to 800px. SPI is enabled and GPU memory raised to 128MB.

When i start vsmp, I get no further output besides this:

pi@vsmp:~/vsmp-zero $ sudo ./vsmp out.mkv
Attempting to read vsmp-index file
Resuming playback at frame 0

and then nothing. I don't get IT8951 initialized string in the output like i saw in other issues. If there is no vsmp-index file present, i get "Segmentation fault" output from vsmp. This is the same if I connect or disconnect the display, enable or disable hw acceleration or use the packaged ffmpeg from the official repo instead of custom built one.

Any help appreciated, thank you!

UPDATE I don't know if it's relevant but I get this when I build vsmp with DRYRUN 1:

sudo ./vsmp out.mkv
Attempting to read vsmp-index file
Resuming playback at frame 0
[NULL @ 0x3295080] No codec provided to avcodec_open2()
@rec0de
Copy link
Owner

rec0de commented Apr 26, 2021

Huh, that's interesting. From your info, I would have guessed an issue with the physical connection to the display since the regular execution does not show an ffmpeg error. But it's really weird that the dryrun does show one...

I'll dig into the code and see if I can find any leads. In the meantime, would you mind sharing your vsmp.h config?

@rec0de
Copy link
Owner

rec0de commented Apr 26, 2021

Ah, nevermind - your display doesn't use the IT8951 controller that mine uses. That still doesn't fully explain the (lack of) console output and the ffmpeg codec error in dryrun mode, but it means that the code definitely won't work as-is.

If you're comfortable digging into the code yourself, you can try to replace the processFrame method with something that works for your display (basically all that method has to do is push a pixel buffer to the display). If not, I might have a look at supporting your display controller sometime in the future™ - but I don't have a matching display to test, so I'm not sure how well that would go.

@rec0de rec0de changed the title can't get it to work Support for non-IT8951 displays Apr 26, 2021
@apvlv
Copy link
Author

apvlv commented Apr 26, 2021

thank you @rec0de! I wasn't aware of that the 800px version is using another controller, so I will look at the documentation and the internals of your project in detail and get back to you if there are some questions. Alright!

@rec0de
Copy link
Owner

rec0de commented Apr 26, 2021

I'm working on improving where display-specific functions are located to better isolate them from the rest of the code right now - so you'll probably want to wait a few more hours before studying that - might make your task a little easier

@apvlv
Copy link
Author

apvlv commented Apr 26, 2021

👍 ❤️

@rec0de
Copy link
Owner

rec0de commented Apr 26, 2021

Alright, done! Check the readme again for some instructions on how to support a custom display.
Let me know if you have any questions, I'll leave this issue open for now

@apvlv
Copy link
Author

apvlv commented Apr 26, 2021

Thank you for updating the README and isolating the display methods! It makes it in fact a lot easier to understand. The methods in the examples for my type of display are somewhat different from your controller (https://github.com/waveshare/e-Paper/blob/master/RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_7in5_V2.c and https://github.com/waveshare/e-Paper/blob/master/RaspberryPi_JetsonNano/c/examples/EPD_7in5_V2_test.c), but i hope I will get it all together soon with my mediocre C skills. 👍 If successful i will make a PR.

@rileyjshaw
Copy link

@apvlv did you have any luck with the 800x480 display? I’m about to start setting one up, would love to hear if you got it working or have any tips.

If not I’ll see if I can make a PR :)

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

No branches or pull requests

3 participants