File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ while not app.need_exit():
3939 img = ctx.image()
4040 disp.show(img)
4141 print (f ' need wait : { ctx.duration_us()} us ' )
42+ time.sleep_us(ctx.duration_us())
4243```
4344
4445Steps:
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ ffmpeg -i input_video.mp4 -c:v libx264 -x264opts "bframes=0" -c:a aac -strict ex
2525一个播放` mp4 ` 视频的示例,视频文件路径为` /root/output.mp4 `
2626
2727``` python
28- from maix import video, display, app
28+ from maix import video, display, app, time
2929
3030disp = display.Display()
3131d = video.Decoder(' /root/output.mp4' )
@@ -40,6 +40,7 @@ while not app.need_exit():
4040 img = ctx.image()
4141 disp.show(img)
4242 print (f ' need wait : { ctx.duration_us()} us ' )
43+ time.sleep_us(ctx.duration_us())
4344```
4445
4546步骤:
Original file line number Diff line number Diff line change @@ -266,5 +266,4 @@ def run(self):
266266
267267if __name__ == '__main__' :
268268 appication = App ()
269- appication .run ()
270- print ('===========' )
269+ appication .run ()
You can’t perform that action at this time.
0 commit comments