我开始使用 Python Invoke
from invoke import task
@task
def build():
print("Building!")
Run Code Online (Sandbox Code Playgroud)
预期的产出是
$ invoke build
Building!
Run Code Online (Sandbox Code Playgroud)
但是,我的输出是
$ invoke build
Can't find any collection named 'tasks'!
Run Code Online (Sandbox Code Playgroud)
我不知道为什么.
令人惊奇的是,一旦我在virtualenv中调用,那么我可以在没有virtualenv的情况下构建.
> mkvirtualenv myenv
> invoke build
Building!
> deactivate myenv
> invoke build
Building!
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
我想使用 ffmpeg 将 RTP 流转码为 MP4(HTTP) 流,所以我可以在 html 视频标签中播放,
但我只能成功转码为 flv 格式。
下面是我的设置:
[/etc/ffserver.conf]
...
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 5M
ACL allow localhost
</Feed>
<Stream flv>
Feed feed1.ffm
Format flv
VideoFrameRate 40
VideoBitRate 128
VideoSize 1920x1080
AVOptionVideo flags +global_header
AudioBitRate 24
AudioChannels 2
AudioSampleRate 44100
AVOptionAudio flags +global_header
</Stream>
<Stream mp4>
Feed feed1.ffm
Format mp4
VideoFrameRate 40
VideoBitRate 128
VideoSize 1920x1080
AVOptionVideo flags +global_header
AudioBitRate 24
AudioChannels 2
AudioSampleRate 44100
AVOptionAudio flags +global_header
</Stream>
<Stream avi>
Feed feed1.ffm
Format …Run Code Online (Sandbox Code Playgroud) ffmpeg ×1
invoke ×1
pyinvoke ×1
python ×1
python-2.7 ×1
python-3.x ×1
rtp ×1
streaming ×1
video ×1