Shop OBEX P1 Docs P2 Docs Learn Events
Project: Propeller-powered video alarm clock — Parallax Forums

Project: Propeller-powered video alarm clock

Andrey DemenevAndrey Demenev Posts: 377
edited 2010-09-20 08:03 in Propeller 1
Project: Propeller-powered video alarm clock

Just a few words about how the project idea emerged. My son is a big fan of SpongeBob SquarePants series. Few days ago he saw a SpongeBob themed alarm clock in a store. Nothing original, just a usual Chineese electromechanical clock, but he liked it very much. When we returned to the store to buy the clock - it was already sold. We were told that they are not likely would have more of this clock. My son was very upset. Next day, I was tidying my box with electronic stuff, and found a LCD from Siemens mobile phone, and idea arised : what if I make an alarm clock that would not simply play a melody, but play a video? "SpongeBob...SpongeBob? Wake up, boy! You're burning me money!" :)

The LCD is 132x176, giving a good chance to acieve high enough FPS. Needless to say what processor has been chosen :) First, I have made some experiments to see how fast I can play video. The LCD can work in 8-bit(2-4-2) or 16-bit (5-6-5) RGB mode. I've tried 8-bit color - the quality was too bad. Next was to try 16-bit color. To keep things simple, I wanted to read entire frame to HUB RAM, and then output it to screen. In 16-bit mode, the full resolution frame would not fit the RAM (132*176*2 = 46464). So, using ffmpeg, I have resized the source video to 88x66, and converted to series of PNG images, one per frame. Then I wrote a program that took these images, converted to 16-bit color, and put them to one big file on SD card. The card was connected to Propeller, and the show has begun :) Quality of video is not brilliant with such low resolution, but enough to understand what is going on :) With serial processing (first read entire frame from card, then output to LCD) I have acieved 25 FPS at 96 MHz Propeller clock. If I do reading in parallel with writing to screen, I estimate about 10 FPS at full resolution (176x132). Theoretical limit with 24 MHz SPI clock is 64 FPS (24000000 / 176 / 132 / 16).

Here is a link to video (playing 88x66 16bit, 10 FPS, pixel doubling): http://www.youtube.com/watch?v=6dZjowqu3iA&feature=player_embedded

I'll post updates as the project progresses

Comments

  • SapiehaSapieha Posts: 2,964
    edited 2010-09-19 07:20
    Hi Andrey Demenev

    I think at if You have used Bill Hennings FlexMem that can be populated with 4 SPI Flash IC's that reads Parallel 4 bits at time You can achive speed needed for THAT full size video.


    Project: Propeller-powered video alarm clock

    Just a few words about how the project idea emerged. My son is a big fan of SpongeBob SquarePants series. Few days ago he saw a SpongeBob themed alarm clock in a store. Nothing original, just a usual Chineese electromechanical clock, but he liked it very much. When we returned to the store to buy the clock - it was already sold. We were told that they are not likely would have more of this clock. My son was very upset. Next day, I was tidying my box with electronic stuff, and found a LCD from Siemens mobile phone, and idea arised : what if I make an alarm clock that would not simply play a melody, but play a video? "SpongeBob...SpongeBob? Wake up, boy! You're burning me money!" :)

    The LCD is 132x176, giving a good chance to acieve high enough FPS. Needless to say what processor has been chosen :) First, I have made some experiments to see how fast I can play video. The LCD can work in 8-bit(2-4-2) or 16-bit (5-6-5) RGB mode. I've tried 8-bit color - the quality was too bad. Next was to try 16-bit color. To keep things simple, I wanted to read entire frame to HUB RAM, and then output it to screen. In 16-bit mode, the full resolution frame would not fit the RAM (132*176*2 = 46464). So, using ffmpeg, I have resized the source video to 88x66, and converted to series of PNG images, one per frame. Then I wrote a program that took these images, converted to 16-bit color, and put them to one big file on SD card. The card was connected to Propeller, and the show has begun :) Quality of video is not brilliant with such low resolution, but enough to understand what is going on :) With serial processing (first read entire frame from card, then output to LCD) I have acieved 25 FPS at 96 MHz Propeller clock. If I do reading in parallel with writing to screen, I estimate about 10 FPS at full resolution (176x132). Theoretical limit with 24 MHz SPI clock is 64 FPS (24000000 / 176 / 132 / 16).

    Here is a link to video (playing 88x66 16bit, 10 FPS, pixel doubling): http://www.youtube.com/watch?v=6dZjowqu3iA&feature=player_embedded

    I'll post updates as the project progresses
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2010-09-19 07:38
    Currently, the bottleneck is not in reading the frames - FSRW is fast enough, but in transferring the data to LCD. I need to optimize the output code, and possibly repack the frames in different format
  • SapiehaSapieha Posts: 2,964
    edited 2010-09-19 07:44
    Hi Andrey Demenev.

    Yes and NO.

    On that FlexMem You can have BIG enough Flach IC's to have entire Video in uncompressed form and transfer directly FLACH 2x4 bits to LCD without overhead to HUB ram.

    Currently, the bottleneck is not in reading the frames - FSRW is fast enough, but in transferring the data to LCD. I need to optimize the output code, and possibly repack the frames in different format
  • prof_brainoprof_braino Posts: 4,313
    edited 2010-09-19 08:10
    Project: Propeller-powered video alarm clock

    it was sold. My son was very upset. idea arised : play a video "SpongeBob..."

    Your son has a great dad
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2010-09-20 08:03
    OK, I have made it to play 176x132, 16-bit color at 20 FPS, with 16kHZ WAV sound. One cog writes to screen, another reads data from SD card, third cog plays sound, and fourth synchronizes the first three. I am planning to reuse the sound cog also for keyboard scanning and RTC communication

    http://www.youtube.com/watch?v=mwmBNqdt2Yg
Sign In or Register to comment.