play a video file(with audio) on LCD stored in SDcard

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

play a video file(with audio) on LCD stored in SDcard

1,215 Views
mohammadfaizan
Contributor III

Hi,

I am curious to know how I can play a video stored in  sdcard on a LCD. I am concern with the source code, what exactly the header, and app files will be, should I need to control the RGB for every pixels. Does the display size matter,

what if I change the resolution, please assist me how to get started. (controller LPC1788)  

0 Kudos
9 Replies

770 Views
carstengroen
Senior Contributor II

Much too little info to tell if this is possible at all ?

Is the resolution 64 x 64 pixels or is it 4K video at 60 fps ?

There is no way one can say if the 1788 can do it (I doubt) if you don't tell us more.

0 Kudos

770 Views
bernhardfink
NXP Employee
NXP Employee

We can't run staqndard video decoders on the LPC microcontrollers, in general these architectures are not suitable for such a task. But there is an alternative to decoders:

  • On a PC you create snapshots of your video and store them as BMP files.
  • You store all these picture frames on the SD card. For example a frame with 480 x 272 pixels with RGB565 leads to a BMP file with 261.120 bytes. With 15fps you get 3.916.800 bytes for 1s. For a 5 minute video you get ~1.2GB of data. No problem for an SD card.
  • For playing the video you need to load the BMPs one-by-one into SDRAM and let the LCD DMA catch it from there. Depending on the software implementation and the BMP size you can achieve a video-like performance on the LCD.
  • We did something like this on a LPC1788 and on LPC1800/4300 for demo purposes
  • With an LPC4088 or LPC1800/4300 you could use the QSPI flash for storing the picture frames, then you can catch them directly with the LCD DMA from this memory, without the intermediate copy to SDRAM
  • Syncing audio to this stream is tricky, but it is possible. We used the DAC for this, based on 16kHz PCM signal. An external CODEC, connected to I2S, would work as well of course.
  • ... and no, I can't provide you with a running demo  :-)

Regards,

Bernhard.

0 Kudos

770 Views
mohammadfaizan
Contributor III

Thanks Bernhard,

That's what I am looking for, when I google I found someone done with atmega32 microcontroller and nokia color LCD. with 65K color LCD from an old nokia 6030 mobile phone, which is more tricky to merge the video and audio. Lot's of processing is required over the file which is going to be played. It become difficult to process all the video file which we want to play. We need a best solution so that one can easily play a video just by replacing a sd card (video file). First I will try what you have suggest, or indeed I have to replace the processor  with i.MX processor as suggested by Jeremyzhou,

warm regards

0 Kudos

770 Views
bernhardfink
NXP Employee
NXP Employee
0 Kudos

770 Views
jeremyzhou
NXP Employee
NXP Employee

Hi  Mohammad Faizan,

Thank you for your interest in NXP Semiconductor products and 
for the opportunity to serve you.
I'd recommend you to select the processor such as i.MX processor instead of LPC1788, as I'm afraid that LPC1788 is incapable of achieving this implementation.
Have a great day.
TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
0 Kudos

770 Views
mohammadfaizan
Contributor III

Thanks Jeremyzhou,

I will try with what you have suggested, but at a moment custom board is ready with the lpc1788, by which tcp client has been created, I just want to add one more module of playing a video on LCD screen. I am keener to know about the code, can you suggest is their any demo code for LPC1788 or same series for the reference, its better to refer demo project before starting from the scratch.I would be glad if you could suggest for the code (header and source file)

warm regards

Mohammad Faizan

0 Kudos

770 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Mohammad Faizan,

There's a CMSIS software library for LPC177x and LPC1778x series, and hope it have reference value for your design.

lpc407x_8x_177x_8x.zip - Google Drive 

Have a great day.
TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

770 Views
mohammadfaizan
Contributor III

Thanks Jeremyzhou,

I  explore the demo project files, thank you so much for your support, I need one more help, while playing a audio we need to use a codec as it is in analog form, suppose a  video file is stored in a sdcard which must be digital, so I  just need to fetch the video file from sdcard  or some kind of processing will be required.   

warm regards

0 Kudos

770 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Mohammad Faizan,

Thank for your reply.

I'd highly recommend you to search some MP3 or MP4 solutions by Google, in my opinion, the LPC1788 is not a good choice to play the audio and display video simultaneously, you may need to consider a replacement of it.

The application AN10583 describes how to design an MP3 player using the LPC2148, hope it's helpful to your design.

https://www.nxp.com/docs/en/application-note/AN10583.pdf?fsrch=1&sr=6&pageNum=1 

Have a great day.
TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
0 Kudos