You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.en.md
+15-38Lines changed: 15 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The data format is modified for playback.
15
15
## Overview
16
16
This application streams video files converted to the dedicated format gmv from SD.
17
17
It uses multi-cores to perform rendering with DMA and audio playback.
18
-
Old format (gcf + wav) can be played back (however, audio playback is restricted on machines without PSRAM).
18
+
***The old format gcf + wav is no longer playable since 0.1.1. Please regenerate it in gmv format or convert it using the gcf + wav => gmv conversion script.***
19
19
20
20
21
21
## Target devices
@@ -24,8 +24,6 @@ It must be able to run the libraries it depends on and have an SD card.
24
24
* M5Stack Gray
25
25
* M5Stack Core2
26
26
* M5Stack CoreS3
27
-
28
-
However, Basic and Gray, which do not have PSRAM, have significant limitations on the amount of time that audio can be played.
@@ -54,8 +52,7 @@ However, Basic and Gray, which do not have PSRAM, have significant limitations o
54
52
|S3\_release_DisplayModule| Support DisplayModule |
55
53
56
54
### Sample data for playback
57
-
Download [sample_003.zip](https://github.com/GOB52/M5Stack_FlipBookSD/files/11746898/sample_003.zip) and copy it to **/gcf** on your SD card.
58
-
55
+
Download [sample_0_1_1.zip](https://github.com/GOB52/M5Stack_FlipBookSD/files/11871296/sample_0_1_1.zip), unzip it and copy to **/gcf** on your SD card.
59
56
60
57
## How to make data
61
58
### Required tools
@@ -73,13 +70,13 @@ Video data can be in any format that can be processed by FFmpeg.
73
70
1. Copy video data to an arbitrarily created directory.
74
71
1. Copy [conv.sh](script/conv.sh) and [gmv.py](script/gmv.py) to the same directory.
75
72
1. Execute the shell script as follows
76
-
**bash conv.sh move_file_name frame_rate [jpeg_maxumu,_size (Default if not specified is 7168) ]**
73
+
**bash conv.sh move_file_name frame_rate [jpeg_maxumum_size (Default if not specified is 7168) ]**
77
74
78
75
| Argument | Required?| Description |
79
76
|---|---|---|
80
77
|move_file_path|YES|Source movie|
81
-
|frame_rate|YES|Output frame rate (1 - 30)|
82
-
|jpeg_maximum_size|NO|Maximum file size of one image to output (1024 - 10240)<BR>Larger size helps maintain quality but increases the likelihood of crashes (see Known Issues)|
78
+
|frame_rate|YES|Output frame rate (1.0 - 30.0)<br>**Integer or decimal numbers can be specified**|
79
+
|jpeg_maximum_size|NO|Maximum file size of one image to output (1024 - 10240)<BR>Larger sizes preserve quality but are more likely to cause processing delays (see "Known Issues").|
83
80
84
81
4. The files that named "videofilename.gmv" output to same directory.
85
82
5. Copy the above files to **/gcf** on the SD card.
@@ -91,7 +88,7 @@ cp bar.mp4 foo
91
88
cp script/conv.sh foo
92
89
cp script/gcf.py foo
93
90
cd foo
94
-
bash conv.sh bar.mp4 24
91
+
bash conv.sh bar.mp4 29.97
95
92
cp bar.gmv your_sd_card_path/gcf
96
93
```
97
94
@@ -111,21 +108,21 @@ You can change the output quality, filters, etc. to your liking. The best parame
111
108
### Data restrictions
112
109
* wav data quality (8KHz unsigned 8bit mono)
113
110
The quality of the audio data is lowered to reduce the processing load.
114
-
It is possible to edit the script to improve the quality, but the processing load may cause crashes. (See Known Issues).
111
+
Scripts can be edited to improve quality, but processing delays may occur due to processing load. (See Known Issues)
115
112
116
-
* Image size and frame rate
113
+
* Image size and frame rate
117
114
When converting a video to JPEG, the width is 320px and the height is a value that maintains the aspect ratio.
118
115
<ins>Currently, 320 x 240 can be played back at about 24 FPS, and 320 x 180 at about 30 FPS.</ins>
119
116
To change the image size, edit the parameter for FFmpeg in conv.sh. **(scale=)**
120
117
121
-
## Known issues
122
-
### Reset during playback
123
-
If a reset occurs during execution, the Serial monitor should display a message that the assertion was caught.
124
-
The cause is that drawing did not finish within the specified time, and the SD and Lcd buses collided.
125
-
If this occurs at a specific point in the video, it can be avoided by modifying the data side.
118
+
* Image size and output device size
119
+
If the image size is narrower or wider than the output device size, it will be centered.
126
120
127
-
Also, in rare cases, it may take a long time to read from SD, which may cause a reset as described above.
128
-
The cause of this is not known.There may be SD card compatibility issues.
121
+
## Known issues
122
+
### Audio is choppy or playback speed is slow.
123
+
This may be due to the processing not being completed in time within a frame.
124
+
In rare cases, it may take a long time to read from the SD card, which may cause some frames to not be processed in time.
125
+
There may be a problem with the compatibility or formatting of the SD card.
* Switch multi-core playback to single-core playback.
161
-
Switch the corresponding section of main.cpp to the one using a single core.
162
-
Playback speed will be reduced, but bus contention will be reliably avoided.
163
-
164
-
```cpp
165
-
src/main.cpp
166
-
staticvoidloopRender()
167
-
{
168
-
// ...
169
-
{
170
-
ScopedProfile(drawCycle);
171
-
//mainClass.drawJpg(buffers[(bufferIndex - 1 + NUMBER_OF_BUFFERS) % NUMBER_OF_BUFFERS], JPG_BUFFER_SIZE); // Process on multiple cores
172
-
mainClass.drawJpg(buffers[(bufferIndex - 1 + NUMBER_OF_BUFFERS) % NUMBER_OF_BUFFERS], JPG_BUFFER_SIZE, false); // Process on single core. Try it, if If assert occurs on xQueueSend call. (However, FPS will be reduced)
173
-
}
174
-
// ...
175
-
}
176
-
```
177
-
178
156
## How to operate
179
157
### Menu
180
158
| Button | Description |
@@ -194,7 +172,6 @@ static void loopRender()
194
172
195
173
196
174
## Conversion from old format (gcf + wav)
197
-
Currently, the old format (gcf + wav) can be played,
198
175
Pyhton script for conversion [gcf\_to\_gmv.py](script/gcf_to_gmv.py) and shell script for conversion of files in the current directory [convert\_gcf\_to\_gmv.sh](script/convert_gcf_to_gmv.sh) for converting files in the current directory.
//mainClass.drawJpg(buffers[(bufferIndex - 1 + NUMBER_OF_BUFFERS) % NUMBER_OF_BUFFERS], JPG_BUFFER_SIZE); // Process on multiple cores
175
-
mainClass.drawJpg(buffers[(bufferIndex - 1 + NUMBER_OF_BUFFERS) % NUMBER_OF_BUFFERS], JPG_BUFFER_SIZE, false); // Process on single core. Try it, if If assert occurs on xQueueSend call. (However, FPS will be reduced)
0 commit comments