每个人都有自己的知识体系。
Toggle navigation
Home
随笔
C#/.Net
树莓派 / Raspberry
皓月汉化组
Beego
Golang
OxideMod
apache
haproxy
windows
Java
Objective-C
日语/罗马音歌词/日语常识
MongoDB
python
电学
公告
Minecraft服务器-公告
NanoPi
C4D (CINEMA 4D)
生活
推流/m3u8/rtmp/rtsp
Unity3d
ffmpeg
数据结构
区块链
tarui
About Me
Archives
Tags
树莓派 python调用已编译的 ffmpeg推流到B站等直播间
2017-07-21 21:32:50
1303
0
0
akiragatsu
树莓派 python调用已编译的 ffmpeg推流到B站等直播间 实现 24小时 自动轮播、指定目录下面剧集 带有简易日志 #!/usr/bin/env python # Time-stamp: <2013-06-17 17:31:22 Monday by pein> # Email: <pein0119@gmail.com> pyt import os import os.path import io dir = raw_input("please input a directory:\n") nameList = [] def listDir(dirTemp): global nameList if not os.path.exists(dirTemp): print "file or directory isn't exist" return if os.path.isfile(dirTemp): nameList.append(dirTemp) return resultList = os.listdir(dirTemp) for fileOrDir in resultList: listDir(dirTemp + "/" +fileOrDir) return nameList def main(): while True: List = listDir(dir) List.sort() for file in List: print file fw = io.open("mylog",'a+',encoding='utf8') fw.write(unicode(file,'utf-8')) fw.write(unicode('\n','utf-8')) os.system('ffmpeg -re -i "'+ file + '" -vcodec copy -acodec aac -b:a 192k -f flv "rtmp://xxxxxxxx') main()
Pre:
定时提交“树莓派CPU、温度、内存使用率等数据”到服务器、并做网页监控图表
Next:
python 构造http get请求
0
likes
1303
Weibo
Wechat
Tencent Weibo
QQ Zone
RenRen
Submit
Sign in
to leave a comment.
No Leanote account?
Sign up now.
0
comments
More...
Table of content
No Leanote account? Sign up now.