Super simple avi, mp4,... player with arduino

I did a lot of searching and browsing about Arduino playing video files. I understand that an Arduino is just not made for that... :smirk: / it is just not possible. Bu-ut ... : the video file that I want to show on a small (128x64 pix) will be nothing but or all black screen, or all white... fps does not need to be more than 5. This "video" should come from an SD card ...

Anyone ??? :innocent:

A lot (but REALLY ! a lot) of thanks in advance ! :slight_smile:

Why not simply fill the screen with black or white pixels ? No need for a video

Hey UKHeliBob,
thanks for your fast reply.
Maybe I should explain a lil bit more.
A friend asked me to make a programmable timer without having to program... At a certain (programmable !) time a lamp (or whatever) comes on, after another certain(programmable) time the lamp goes of, ... on ....off etc. For us "Arduino-ers" it would be easy: make an array, fill in the (new) times, shoot it in the Arduino, and run. But my friend doesn't want to go into "(re)programming" an Arduino. I could write a program on the arduino with keypads, displays etc, but this would make it more complicated than necessary.
BUT... My friend is a video editor, so she can make video's. If she makes a video that displays a white screen, the lamp (or whatever) comes on, when her video displays a black screen, the "lamp" goes out. Being a video editor, she can put her white screens wherever she wants on her timeline. The (B/W, 128 x 64pix) video file that she can make on her computer will go on an SD card, and this SD card will be read and displayed by an Arduino on a small (e.g.128x64pix) LCD. An LDR (light depend resistor) in front of the LCD will "see" black or white and triggers a relay, SSR or whatever.
So actually, she will use her video editor program to "program" the timer.
The Arduino video player does not have to work hard because

  1. it only has to play a video file and do nothing else.
    The "info" from the LDR doesn't have to go back in the Arduino. A relay or SSR connected to the LDR will switch things on or off.
  2. the frame rate can be very low (have to find out the lowest frame rate her video editor program can produce... -> in theory 1or 2 fps would be already enough !)
  3. it's only full 128 x 64 white or full 128 x 64 black
  4. the display won't be seen (it will be built in the box) and serves only to shine on an LDR.

Once this simple system works, we might try to stick 2 (or more) LDR's on the screen and have a video file where each half (quarter of the screen "shines (or not) " one of the LDRs... and thus operate 2 (or more) channels.
e.g with 4 "channels" : a white square top-left on the screen operates the green light, top-right a blue light, bottom-left = red, bottom-right = yellow... or of course any combination ...

I hope I was clear, (if not : ask more !) and again thanks for your interest !

The idea sounds quite crazy. What sort of time periods are we talking about here ?

I can quite understand that your friend may not be up to the task of editing the sketch to turn the "lamp" on and off but how about an Excel spreadsheet that contains the on/off times, saved to an SD card and read by the Arduino ? How about a web server running on the Arduino that allows start/end times to be set in a graphical front end ?

Hey UKHeliBob !

thanks again for you extremely fast reply ! (I think you answered BEFORE I clicked "Send" ... :slight_smile: )
I know, I know ... :smiley: spreadsheets, web servers etc... would work wonderful, but she's a video artist ... she uses her computer almost ONLY to make/edit video's ... She can put an SD card in and out a device, but that's about it ... So I thought : if video is her thing, let's use HER knowledge ...

I am still not convinced

A Web page allowing start and end times could be made to operate very like a video timeline

VBS, UKHeliBob,
I really see your point, UHB, I agree 101% with you. I worked for many different "artists". Often they want super complex things, but it has to made as simple as possible to operate. e.g. Sometimes even a start/stop button makes 'em go nuts...Mostly they DO know their stuff, but often they don't want to get involved in spreadsheets, websites,programming, sometimes even Word is a challenge.. etc... If I would make such a programmable timer for myself, I would use the arduino.exe to program. There are countless possibilities (array, web, xls, etc etc...) but here I have a project for an artist ... She is a professional photo/video artist, she KNOWS her video editing program inside out, but don't ask more... so this is MY challenge : Use the user's knowledge ...

it does not mean she is dumb, does it?

I'm sure she can't fill up a text file with timing in whatever unit (s, ms..) when you need to change the color.

this does not look like rocket science.

0
10
30
50
51
60
75
...

if you insist on video tools, her video software might also be able to export in XML some attributes of the timeline (use 1 white rectangle image that you keep on the timeline when light is on and nothing in the timeline when light is off) and you parse that XML file

:slight_smile: Nono, J-M-L ... she's not dumb at all ! But not like most of "us", she doesn't know/ is interested in electronics, programming etc. I'm sure you know smart people that "suffer from the same illness" :slight_smile: And of course, (at least) for you and me, it is not rocket science at all ! A 50-line .ino is all what's necessary !
So for me it's a challenge, for her : easy using with things she KNOWS inside out...
the Arduino ONLY has to play a

B/W video
from SD card (no need for folders, names : just 1 file per card.
128x64p
Whole screen black or white
fps : 1 is enough, but I guess that no video editor can produce this. I think the lowest is 15.

Workflow:
insert card in Arduino + card reader
switch ON
push START.

Nevertheless : thanks for your interest ! :slight_smile:

again I would tell her to write a text file using Notepad or TextEdit (is she on a Mac or PC?) with the timing, one per line, save that on the SD card.

why would you want to spend time trying to decode whatever video format to just extract timecode... I don't get it.

Wow ! that was fast. I think you replied before I clicked the "Reply" button. :slight_smile:

You're absolutely right, JML... That was my first answer when she asked me to build a programmable timer... (with many programmable ons and offs...)

I'll try to convince her (AGAIN !!! :fearful:)
PS : she uses a Mac.

Or maybe I should try this ...
:wink:

My tongue hurts......

she is indeed smart then :slight_smile: