add BearPi STemWin test demo

This commit is contained in:
morixinguan
2021-01-30 11:26:41 +08:00
parent a01cf34ab8
commit 424b4f729c
190 changed files with 143893 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: <X_SIZE>x<Y_SIZE>.bat
*
* Purpose: This file simply calls MakeMovie.bat with its own file name
* as parameter %2 which defines the resolution used by FFmpeg
* to create the JPEG files.
* By copying and renaming this file further resolutions can
* be simply achieved.
*
* Note: The file name of this file needs to match the size
* specification parameter '-s' for FFmpeg.exe.
*
******************************************************************************
:START
@%~dp0MakeMovie.bat %1 %~n0

View File

@@ -0,0 +1,21 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: <X_SIZE>x<Y_SIZE>.bat
*
* Purpose: This file simply calls MakeMovie.bat with its own file name
* as parameter %2 which defines the resolution used by FFmpeg
* to create the JPEG files.
* By copying and renaming this file further resolutions can
* be simply achieved.
*
* Note: The file name of this file needs to match the size
* specification parameter '-s' for FFmpeg.exe.
*
******************************************************************************
:START
@%~dp0MakeMovie.bat %1 %~n0

View File

@@ -0,0 +1,21 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: <X_SIZE>x<Y_SIZE>.bat
*
* Purpose: This file simply calls MakeMovie.bat with its own file name
* as parameter %2 which defines the resolution used by FFmpeg
* to create the JPEG files.
* By copying and renaming this file further resolutions can
* be simply achieved.
*
* Note: The file name of this file needs to match the size
* specification parameter '-s' for FFmpeg.exe.
*
******************************************************************************
:START
@%~dp0MakeMovie.bat %1 %~n0

View File

@@ -0,0 +1,21 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: <X_SIZE>x<Y_SIZE>.bat
*
* Purpose: This file simply calls MakeMovie.bat with its own file name
* as parameter %2 which defines the resolution used by FFmpeg
* to create the JPEG files.
* By copying and renaming this file further resolutions can
* be simply achieved.
*
* Note: The file name of this file needs to match the size
* specification parameter '-s' for FFmpeg.exe.
*
******************************************************************************
:START
@%~dp0MakeMovie.bat %1 %~n0

View File

@@ -0,0 +1,21 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: <X_SIZE>x<Y_SIZE>.bat
*
* Purpose: This file simply calls MakeMovie.bat with its own file name
* as parameter %2 which defines the resolution used by FFmpeg
* to create the JPEG files.
* By copying and renaming this file further resolutions can
* be simply achieved.
*
* Note: The file name of this file needs to match the size
* specification parameter '-s' for FFmpeg.exe.
*
******************************************************************************
:START
@%~dp0MakeMovie.bat %1 %~n0

View File

@@ -0,0 +1,21 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: <X_SIZE>x<Y_SIZE>.bat
*
* Purpose: This file simply calls MakeMovie.bat with its own file name
* as parameter %2 which defines the resolution used by FFmpeg
* to create the JPEG files.
* By copying and renaming this file further resolutions can
* be simply achieved.
*
* Note: The file name of this file needs to match the size
* specification parameter '-s' for FFmpeg.exe.
*
******************************************************************************
:START
@%~dp0MakeMovie.bat %1 %~n0

View File

@@ -0,0 +1,21 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: <X_SIZE>x<Y_SIZE>.bat
*
* Purpose: This file simply calls MakeMovie.bat with its own file name
* as parameter %2 which defines the resolution used by FFmpeg
* to create the JPEG files.
* By copying and renaming this file further resolutions can
* be simply achieved.
*
* Note: The file name of this file needs to match the size
* specification parameter '-s' for FFmpeg.exe.
*
******************************************************************************
:START
@%~dp0MakeMovie.bat %1 %~n0

View File

@@ -0,0 +1,21 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: <X_SIZE>x<Y_SIZE>.bat
*
* Purpose: This file simply calls MakeMovie.bat with its own file name
* as parameter %2 which defines the resolution used by FFmpeg
* to create the JPEG files.
* By copying and renaming this file further resolutions can
* be simply achieved.
*
* Note: The file name of this file needs to match the size
* specification parameter '-s' for FFmpeg.exe.
*
******************************************************************************
:START
@%~dp0MakeMovie.bat %1 %~n0

View File

@@ -0,0 +1,21 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: <X_SIZE>x<Y_SIZE>.bat
*
* Purpose: This file simply calls MakeMovie.bat with its own file name
* as parameter %2 which defines the resolution used by FFmpeg
* to create the JPEG files.
* By copying and renaming this file further resolutions can
* be simply achieved.
*
* Note: The file name of this file needs to match the size
* specification parameter '-s' for FFmpeg.exe.
*
******************************************************************************
:START
@%~dp0MakeMovie.bat %1 %~n0

View File

@@ -0,0 +1,21 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: <X_SIZE>x<Y_SIZE>.bat
*
* Purpose: This file simply calls MakeMovie.bat with its own file name
* as parameter %2 which defines the resolution used by FFmpeg
* to create the JPEG files.
* By copying and renaming this file further resolutions can
* be simply achieved.
*
* Note: The file name of this file needs to match the size
* specification parameter '-s' for FFmpeg.exe.
*
******************************************************************************
:START
@%~dp0MakeMovie.bat %1 %~n0

View File

@@ -0,0 +1,21 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: <X_SIZE>x<Y_SIZE>.bat
*
* Purpose: This file simply calls MakeMovie.bat with its own file name
* as parameter %2 which defines the resolution used by FFmpeg
* to create the JPEG files.
* By copying and renaming this file further resolutions can
* be simply achieved.
*
* Note: The file name of this file needs to match the size
* specification parameter '-s' for FFmpeg.exe.
*
******************************************************************************
:START
@%~dp0MakeMovie.bat %1 %~n0

View File

@@ -0,0 +1,83 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: MakeMovie.bat
*
* Parameters: 4 (3 optional)
* %1: Movie file to be converted
* %2: Size
* %3: Quality
* %4: Framerate
*
* Requirement: The free available tool FFmpeg is required for the conversion
* operation. FFmpeg is available under the following link:
*
* http://www.ffmpeg.org/
*
* Please note that Prep.bat needs to be adapted before using
* MakeMovie.bat.
*
* This file (MakeMovie.bat) normally do not need to be modified.
*
* Purpose: This batch file converts a video file to an (E)mWin (M)ovie (F)ile.
* It first uses FFmpeg for converting the given movie into single
* JPEG files. After that the emWin tool JPEG2Movie is used to
* convert these images into an emWin movie file.
*
* For details about all supported file types and the parameters
* resolution, quality and frame rate please refer to the FFmpeg
* documentation.
*
* Output: A copy of the converted file will be copied into the folder of
* the source file. The file name will be the same as the source file
* with a size postfix and the extension '.emf' (emWin movie file).
*
******************************************************************************
:START
CALL %~dp0PREP.BAT
IF "%2" == "" GOTO CONT2
SET SIZE=%2
GOTO NEXT2
:CONT2
SET SIZE=%DEFAULT_SIZE%
:NEXT2
IF "%3" == "" GOTO CONT3
SET QUALITY=%3
GOTO NEXT3
:CONT3
SET QUALITY=%DEFAULT_QUALITY%
:NEXT3
IF "%4" == "" GOTO CONT4
SET FRAMERATE=%4
GOTO NEXT4
:CONT4
SET FRAMERATE=%DEFAULT_FRAMERATE%
:NEXT4
DEL /Q "%OUTPUT%*.*"
"%FFMPEG%" -y -i %1 -r %FRAMERATE% -q %QUALITY% -s %SIZE% -f image2 -pix_fmt yuvj420p "%OUTPUT%img-%%05d.jpeg"
"%JPEG2MOVIE%" "%OUTPUT%"
IF ERRORLEVEL 1 GOTO ERROR
GOTO NOERROR
:ERROR
ECHO Error using JPEG2Movie!
PAUSE
:NOERROR
COPY /B %OUTPUT%*.emf %~dp1%~n1_%SIZE%.emf
SET SIZE=
SET QUALITY=
SET FRAMERATE=
SET FOLDER=
SET FFMPEG=
SET JPEG2MOVIE=

View File

@@ -0,0 +1,50 @@
@ECHO OFF
GOTO START
******************************************************************************
*
* File: Prep.bat
*
* Parameters: none
*
* Purpose: This batch file is called by MakeMovie.bat and sets the default
* values for working folder, FFmpeg and JPEG2MOVIE path. It needs
* to be adapted before MakeMovie.bat can be used.
*
******************************************************************************
:START
REM **************************************************************************
REM
REM Configuration: Default values for size, quality and framerate
REM
REM **************************************************************************
SET DEFAULT_SIZE=320x240
SET DEFAULT_QUALITY=5
SET DEFAULT_FRAMERATE=25
REM **************************************************************************
REM
REM Configuration: Working folder
REM
REM **************************************************************************
SET OUTPUT=C:\Movie\Output\
REM **************************************************************************
REM
REM Configuration: FFmpeg
REM
REM **************************************************************************
SET FFMPEG=C:\FFmpeg\ffmpeg.exe
REM **************************************************************************
REM
REM Configuration: JPEG2Movie
REM
REM **************************************************************************
SET JPEG2MOVIE=C:\Movie\JPEG2Movie.exe