Y series products support playing video and audio playback. The video format must be .mp4 format, support boot video and page video. The audio must be in .mp3 forma
Video

Location: control display area
“X” “Y” is the coordinates of the upper left corner of the video display area.
“W” “H” is the width and height of the video display, in pixels.
Name: default Video_Display, can be reset
DescipePointer: default is 0xFFFF
HeadVarAddress: the starting variable address of the attribute setting
Note: Other attribute variable addresses will be assigned directly, occupying the contiguous address space after the first address.
File number: the video file number to be operated;
Note: Video files must be in .mp4 format and must be named by numbers, for example: 1.mp4, 2.mp4
VolumeInitValue: Reserve,can not use.
FileNumMin: The minimum of the video list files number.
FileNumMax: The maximum of the video list files number.
InitState: control video playback status
NONE-No play PLAY-Start playback STOP-Stop playback
PAUSE - Pause playback NEXT - Next video LAST - Previous video
VolumeInitValue: Temporarily unavailable, reserved
PlayMode:
Single loop -- loop the current video
Play once – play the current video once
List loop – loops through the video in the current video list, which is set by the file number maximum and minimum values.
List play – the video in the list is looped once
FilePosition: The storage location of the video file can be stored in the onboard 9MB Flash or in the TF card.
[IN SHIP] - Onboard 9MB Flash [IN TF CARD] – TF card
ØSerial command control description (HEX format):
Note: The attribute parameters of video playback are stored in the variable space, occupying 5 consecutive storage spaces. The playback attribute can be modified by modifying the data in the variable addres.
Example (HEX format) | 5AA5 | 0B | 82 | 0000 | 0001 | 0100 | 0100 | 0001 | 0003 |
Name | Frame head | Data length | Command | Head address | File number | Initial sound | File location | File minimum | File maximum |
Occupied variable address |
|
|
|
| 0000 | 0001 | 0002 | 0003 | 0004 |
ØDescription:
Frame head: The instruction frame header is fixed to 5AA5 and can be modified by the TGUS host computer.
Data length: XX = number of all data bytes after the command and command;
Command: Write variable register 0x82, 1 byte;
Head address: the first address of the storage attribute;
File number: the video file number currently being operated;
[Play Control: Initial Sound]: Two attributes occupy a variable space together;
Play Control: variable high byte(NONE, PLAY, STOP, PAUSE, NEXT,LAST).
Initial sound: variable low byte, temporarily unadjustable;
[Play Mode: Play File Location]: Two attributes occupy a variable space together;
Play mode: variable high byte, single loop /play once /list loop /list play;
Play file location: variable low byte, 0x00-[IN SHIP] 0x01-[IN TF CARD];
Note: Some Y series products do not have a TF card holder, and the video can only be saved in the onboard flash.
Onboard Flash storage: After renaming the video file, copy it to the project TGUS_SET folder and download it along with the project file.
TF card storage mode: Create a TGUS_MEDIA folder in the TF card root directory and save the video files that need to be played in the created folder.
Play file minimum: occupy a variable space, the minimum value of the playlist;
Play file maximum: occupy a variable space, the minimum value of the playlist.
Audio

Location: control area
“X” “Y” is the coordinates of the upper left corner of the display area, and the audio is meaningless.
“W” “H” is the width and height of the display, the audio is meaningless.
Name: Default Audio_Display, can be reset
DescipePointer: default is 0xFFFF
HeadVarAddress: the audio file number to be operated;
Note: Other attribute variable addresses will be assigned directly, occupying the contiguous address space after the first address.
AudioFormats: (MP3/WAV)/(WAV 1M)
FileNumMin: The minimum of the audio list files number.
FileNumMax: The maximum of the audio list files number.
Note: Audio files must be in .mp3 format and must be named by numbers, for example: 1.mp3, 2.mp3
Note: The serial port call must be within the maximum and minimum values, otherwise it is invalid.
Note: Video playback takes up a lot of memory, and the video resolution should not exceed the length and width of the screen. Otherwise, unstable restart may occur.
InitState: control audio playback status
NONE-No play PLAY-Start playback
STOP-Stop playback PAUSE - Pause playback
NEXT-Next audio LAST - Previous audio
VolumeInitSound: Temporarily unavailable, reserved
PlayMode:
Single loop – loops the current audio
Play once – play the current audio once
List loop – loops through the audio in the current audio list, which is set by the file number maximum and minimum values.
List play – the audio loop in the list is played once
FilePosition: The storage location of the audio file can be stored in the onboard 9MB Flash or in the TF card.
[IN SHIP] - Onboard 9MB Flash
[IN TF CARD] – TF card
ØSerial command control description (HEX format):
Note: The attribute parameters of video playback are stored in the variable space, occupying 5 consecutive storage spaces. The playback attribute can be modified by modifying the data in the variable address.
Example (HEX format) | 5AA5 | 0B | 82 | 0000 | 0001 | 0100 | 0100 | 0001 | 0003 |
Name | Frame head | Data length | Command | Head address | File number | Initial sound | File location | File minimum | File maximum |
Occupied variable address |
|
|
|
| 0000 | 0001 | 0002 | 0003 | 0004 |
ØDescription:
Frame head: The instruction frame header is fixed to 5AA5 and can be modified by the TGUS host computer.
Data length: XX = number of all data bytes after the command and command;
Command: Write variable register 0x82, 1 byte;
Head address: the first address of the storage attribute;
File number: the file number currently being operated;
[Play Control: Initial Sound]: Two attributes occupy a variable space together;
Play Control: Variable High Byte, 0x00-NONE 0x01-PLAY 0x02-STOP 0x03-PAUSE 0x04-NEXT 0x05-LAST
Initial sound: variable low byte, temporarily unadjustable;
[Play Mode: Play File Location]: Two attributes occupy a variable space together;
Play mode: variable high byte, 0x00-single loop 0x01-play once 0x02-list loop 0x03-list play;
Play file location: variable low byte, 0x00-[IN SHIP] 0x01-[IN TF CARD];
Note: Some Y series products do not have a TF card holder, and audio can only be saved in the onboard flash.
Onboard Flash storage: After renaming the audio file, copy it to the project TGUS_SET folder and download it along with the project file.
TF card storage mode: Create a TGUS_MEDIA folder in the TF card root directory and save the audio files that need to be played in the created folder.
Play file minimum: occupy a variable space, the minimum value of the playlist;
Play file maximum: occupy a variable space, the minimum value of the playlist.