Challenge 51 single-chip microcomputer (stc12c5a32s2) performance limit! Play video and audio at 19264 + SD + fat! Attached video modulo Software

Source: Internet
Author: User

Stc12c5a32s2 25fps smooth playback of audio and video.

The effect is as follows:

The SD card works in SPI mode and is driven by the MCU hardware SPI. The original fat driver supports clustering preprocessing in terms of outstanding performance. The STC microcontroller works under the 22.1184m crystal oscillator to estimate the throughput to 120 + kb/s, of course, this is the actual usage of the dry run estimation is not so high, the defect is that only 8.3 file names are supported, Chinese characters are not allowed, and the file is read-only. My lcd19264 is based on the ks0108 driver chip, and the driver also has many features in it. If you are interested, refer to it. There is nothing to say about PWM driver speakers ~ Direct push using a direct capacitive potentiometer.

The MUX format for playing is as follows. You can refer to the avmuxer source code on the third floor. In the fat 512b sector, the first 256b is 1/4 frames of video, the next 19264 B is left empty for backup (my LCD is 12864, And now I play a video), and the last B is a single-channel raw audio with an 8bit 12.8k sampling rate, which is played at 25 FPS. Why do you want to design it like this and sell it first? Hey ~~

The video can be generated using the lcdmodx on the second floor. Recently, I am working on this. For the Demo Video, note that I want to adjust the modulo rules. My 19264 video is "Byte vertical, horizontal scan; start at the top left and end at the bottom right; low position first ". Different screens require different drivers. For how to write your LCD driver, refer to my source code, it is OK as long as the interface is the same.

There is no good solution for audio generation at the moment, because this is not a standard audio format. I use audition to generate a single-channel raw audio (PCM WAV audio stream) with an 8bit 12.8k sampling rate ).

The third floor is the source code of avmuxer. I compiled it using vs2008. It is estimated that vc6 can be used as well. I didn't make a GUI and changed the file path when using it.

The schematic diagram is as follows:

Things are at school, and now it's hard to find a family happiness. I dug it on my neck ......

Keil51 uv4 51 project source package: videoplayer.rar (234 K) Downloads: 165

Schematic PDF: videoplayer.pdf (23 K) Downloads: 102

The circuit built on the cave board can look at the silent rotten apple that I used to send. Now I have added the PWM output and used the hardware spi I/O and FAT file systems.

Http://bbs.mydigit.cn/read.php? Tid = 242358

Video modulo software lcdmodx alpha

The converter only supports AVI files. before using the converter, you must first determine that the system has installed a video decoding package (such as decoder decoding and perfect decoding), and use purecodec20091225 ).
Recommended installation of perfect decoding http://www.newhua.com/soft/52770.htm

Demo

Lcdmodx 0.3.2.110712 alpha.rar (1819 K) Downloads: 80

Simple audio and video stream mixing source code:

# Include <windows. h> # include <tchar. h> # include <stdio. h> int apientry _ twinmain (hinstance, hinstance hprevinstance, lptstr lpcmdline, int ncmdshow) {file * fprv, * fupa, * FPW; byte buffer [512] = {0 }; tchar string [max_path]; DWORD I, j = 0; If (_ tfopen_s (& fupa, _ T ("D: \ Av. raw "), _ T (" rb ") // 8bit 12.8 kHz raw audio stream return 1; if (_ tfopen_s (& fprv, _ T (" D: \ Av. bin "), _ T (" rb ") // 25fps lcdmodx generates the file return 1; if (_ tfopen_s (& FPW, _ T ("D: \ Av. MUX "), _ T (" WB ") // output return 1; while (1) {If (! (Fread (buffer, sizeof (byte), 256, fprv) return 1; if (! (Fread (buffer + 384, sizeof (byte), 128, fupa) return 1; fwrite (buffer, sizeof (byte), 512, FPW );} fclose (fprv); fclose (fupa); fclose (FPW); Return 0 ;}

Reproduced from: http://bbs.mydigit.cn/read.php? Tid = 285953 & page = 1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.