Video Playback

Post here first, or if you can't find a relevant section!
Post Reply
Jrsi01
Posts: 3
Joined: Mon Dec 30, 2019 7:38 pm

Video Playback

Post by Jrsi01 »

Hello,
Great to have this forum back :D
Thanks to all who support this community. ;)

I've been working on a blue pill project using roger's core together with some lcd and an sd card module.

Trying to achieve watchable video playback on 240x320 ILI9341.

With dma buffering and sdfat library and overclocking to 128mhz,
The best I currently get is 24 FPS raw video playback from an SD card, 3785 KB/sec.

What i'm trying to figure out is,

how faster can we go from here, when considering the hardware limitations of the Blue Pill?

Thank in advance.
.rpv
Posts: 43
Joined: Wed Dec 18, 2019 10:19 pm

Re: Video Playback

Post by .rpv »

Hi, there is a guy who goes by the "cbm80amiga" nickname who has some amazing libraries and a yt channel showcase them:

https://www.youtube.com/user/cbm80amiga/videos

https://github.com/cbm80amiga?tab=repositories

I think he uses dma and the spi at 36mb on the bluepill, no overclock needed.
Jrsi01
Posts: 3
Joined: Mon Dec 30, 2019 7:38 pm

Re: Video Playback

Post by Jrsi01 »

Hi,

Looked at his yt channel, really nice videos,
also some really useful libraries, too.

He did a good job,
but with overclocking and efficient dma buffer,
I can actually get >87 FPS on the screen resolution he uses, 160*128, more than twice of his 34FPS.
About 41ms per 240x320 frame, 24.2 FPS is my current cofiguration.

I noticed stevestrong posted a benchmark results for sdfat, 4.7MB/sec reading speed, but I think its an F4 board.
The best I get when overclocking is 3.7MB/sec.

What is the best benchmark we can get on the blue pill?
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: Video Playback

Post by Pito »

The max speed of Bpill's SPI1 is 36MHz clock. For a single byte you need "best case" 36/8=4.5MB/sec.
There is an overhead of course, thus the speed will be lower.

The F407 uses SDIO with SDcard for higher speeds.
Pukao Hats Cleaning Services Ltd.
ag123
Posts: 1657
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Video Playback

Post by ag123 »

besides there is 20k sram it is pretty cram to work in.
try a stm32f4 discovery or f407 it seemed someone has been there done that
this is 'prehistoric' it is achieved even before arduino and stm32duino become a new fad
https://www.youtube.com/watch?v=0ETyFmAMFjY
https://www.youtube.com/watch?v=bRNcfsDIc2A
i think the f429 discovery board has got 8 MB dram, it is a luxury as compared to all the current single chip boards
https://www.st.com/en/evaluation-tools/ ... overy.html

there used to be this stm32 circle
http://www.stm32circle.com/hom/ndex.php
and evo primer, apparently from www.raisonance.com, but it seemed it is no longer supported
https://www.newark.com/stmicroelectroni ... dp/06X3690
https://www.youtube.com/watch?v=TJWeVvicvZk
https://www.youtube.com/watch?v=dHwGkAA9ewM

32f429idiscovery is nearly as capable as the evo primer just less that nice casing and buttons

i think even with stm32f4(07 or 29) it won't be easy to do full mp4 decode and play, the hard part is the software aspects
Jrsi01
Posts: 3
Joined: Mon Dec 30, 2019 7:38 pm

Re: Video Playback

Post by Jrsi01 »

Hi,
Decoding videos and graphics is way beyond my project needs,
Although DMA2D is very cool feature, really liked the f429 doom video :)

I would prefer for my application small low cost dev boards,
So I recently ordered black pill F411,
Which seems a nice upgrade over the blue pill's sram and flash,
In addition, according to datasheet it has 50MHz SPI, and sdio at 48MHz,
Which hopelfully would get the job done faster.

I saw that steve just added f401 black pill variant to his core, these F4 boards seem to get better support now
ag123
Posts: 1657
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Video Playback

Post by ag123 »

what is interesting is that the doom port for f429 discovery is after all real :)
https://github.com/floppes/stm32doom

i ordered a few pieces of f401 as i noted they reached 'break even' with the f103 maple mini clones
https://mcu.selfip.com/viewtopic.php?f=25&p=1641
both f411 and f401 are faster than the stm32f103 at the same clocks as f41* has the ART accelerator which is a zero wait cache.
my guess is codes that branch a lot won't benefit from it, but if a section of codes fit in a cache line it would run as if it runs from sram
and in addition f411 and f401 has the fpu (32bits only though)
f411 has more mhz, more ram and more hw vs f401, priced at a slight premium. i went for the f401 to save a few cents and as i feel for a 48 pin mcu, it might get 'a little cram' to pack too much hardware in it (e.g. that some ports may be aliased)
f401 can't do h/w sdio in 48pins, i think f411 has it even with the same set of pins
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: Video Playback

Post by stevestrong »

ag123 wrote: Tue Dec 31, 2019 12:56 pm f401 can't do h/w sdio in 48pins, i think f411 has it even with the same set of pins
That's true!
timoteicab
Posts: 1
Joined: Fri Oct 14, 2022 12:28 pm

Re: Video Playback

Post by timoteicab »

that's cool!
Avery78
Posts: 1
Joined: Mon Feb 05, 2024 1:28 pm

Re: Video Playback

Post by Avery78 »

The video plays back smoothly and with excellent clarity! The immersive experience is enhanced by the high definition visuals and seamless streaming. Bravo to the IT whizzes in the background—you guys are the true stars of this project!
Post Reply

Return to “General discussion”