from: https://blog.csdn.net/weiyuefei/article/details/64125208 ffmpeg循环推流方法 You should be able to use the -stream_loop -1 flag before the input (-i): ffmpeg -threads 2 -re -fflags +genpts -stream_loop -1 -i ./test.mp4 -c copy ./test.m3u8 The -fflags…
方法1:自定义异常 # -*- coding:utf-8 -*- """ 功能:python跳出循环 """ # 方法1:自定义异常 class Getoutofloop(Exception): pass try: for i in range(5): for j in range(5): if i == j == 2: raise Getoutofloop() else: print i, '----', j except Getoutoflo…
1.for (自定义条件) 循环 let arr = [1,2,3]; for(let i =0;i<arr.length;i++){ console.log(i,arr[i]) } 2.for in 循环 let obj = {name: 'xiao' ,age:'24'} for(let i in obj){ console.log(i,obj[i]); } //for in 循环主要用于遍历普通对象,i 代表对象的 key 值,obj[i] 代表对应的 value,当用它来遍历数组时候,…