Panel Cookies
Nextion Play Video
27/03/2021 | Views: 9351 | Arduino | by: ELECTRONOOBS      

Below you have the full tutorial where I go through each step. But in this post we will see just how convert videos and play those on the Nextion display. Make sure you go to and download their editor because we will work with that software. In this psot you will also have the TFT files I've created and the pictures, videos or anything else that you need, ready for download.

Part 1 - Create new project

Let’s start with something easy. First go to this link and download NEXTION editor software. Once downloaded and installed, run this software. Go to file and select new and give this new project a name. Next it will ask you what model of display you have. In this case, mine is this one (NX1060P101-011C-I) of 10 inches. Then select the orientation. In my case I leave it at 0 in horizontal mode. Click OK and start the project.

  • Nextion display 3.5": LINK
  • Nextion display 7": LINK
  • Nextion display 10": LINK
Create new NEXTION project

Part 2 - Convert videos

Let’s now see how to play videos with sound, because this screen also accepts that. I create a new project. We need videos in a dot video format. For that we use the video box tool. Go to tools and select video box. Here, select your video in mp4 format for example. Select the resolution that you want. I will make mine 900 by 506 but have in mind the maximum screen resolution is 1024 by 600. Select frame rate of 24 and click convert. Once finished, go to the videos tab. Here click the plus icon and select the new converted dot video file.

Tutorial play video on Nextion screen mp4

Part 3 - Add the Video

Now on an empty page I add a video tool from the toolbox. In attributes, for vid select browse and select the imported video. Now we have our video. For loop I select no, so it will only play once. For EN I select "0" so it will start in pause mode. If we set EN to 1, the video will be played. Now I add another picture on top of the vide in order to cover the borders. So, I import this picture that I have prepared. I add a picture from the toolbox and in pic, I select that imported picture. All we have to do now is to add a button that will turn the EN variable of the video to 1 and 0 for play and pause. I add a button. Then I import 2 pictures fro the button as well as we have seen in the previous tutorial. I change the button attributes from color to picture and add those pictures. I drag the button on the bottom left corner.

Part 4 - Play button and TFT file

The video object name is v0, so in the touch event of the button I type the code below. If the v0.value is 0, I change it to 1 and if is already a 1 I change it to 0. That will play and stop the video. I create the TFT file and copy that to the SD card and then to the display. When I power it on, as you will see, we have the video and when I push the button, I can play or stop the video. If I connect a speaker to the audio output on the back side of the display, we can also hear the sound of the video. The refresh rate is not that good but aby way, for what I need this is pretty nice, right.

Nextion software new page

Part 5 - Play the Video

That's how easy is to play videos on this screen. I don't know why the refresh rate is so slow. But it will be good for my porojects that I want to make. I hope you like this tutorial and maybe you have learned something new. If my videos help you, consider supporting my work on my PATREON or a donation on my PayPal. Thanks again and see you later guys.

27/03/2021 | Views: 9351 | Arduino | by: ELECTRONOOBS      

Last tutorials

FOC control with Arduino + magnetic encoder feedback
All about Arduino PWM frequencies
Smallest ESC based on ARDUINO
Debug Arduino and ESP with PlatformIO
Homemade Best Two Hand Multimeter with Arduino


Affiliate Disclosure


PCBWAY PCB service

Curso Arduino Online nivel bajo