감사합니다. Anthony 나는 설치된 py3에서 Python3 종속성을위한 python-ffmpeg를 설치하기 위해 Ffmpeg를 시도했습니다.
command = [FFMPEG_BIN,
'-y',
'-f', 'rawvideo',
'-vcodec', 'rawvideo',
'-s', dimension,
'-pix_fmt', 'bgr24',
'-r', '24',
'-i', '-',
'-an',
'-tune', 'zerolatency',
'-preset', 'ultrafast',
'-crf', '0',
'-b:v', '2000k',
'-qmin', '1',
'-qmax', '4',
'-qscale', '4',
'-vcodec', 'rawvideo',
feed]
self.proc = sp.Popen(command, stdout=sp.PIPE, stderr=None, stdin=sp.PIPE)
while True:
ret, frame = self.cap.read()
#some analysis done here
if ret:
self.proc.stdin.write(frame.tostring())
출력 vcodec은 anytype 일 수 있습니다. 이를 위해
는 this-
HTTPPort 1234
RTSPPort 1235
MaxClients 1000
MaxBandwidth 10000
<Feed feed1.ffm>
File /tmp/feed1.ffm
ACL allow 127.0.0.1
</Feed>
<Stream test1.sdp>
NoDefaults
Feed feed1.ffm
Format rtp
Noaudio
VideoCodec libx264
VideoSize 1920x1080
#VideoHighQuality
VideoBitRate 64
VideoFrameRate 17
VideoGopSize 25
VideoBufferSize 50000
AVOptionVideo flags +global_header
AVOptionVideo me_range 16
AVOptionVideo qdiff 4
AVOptionVideo qmin 30
AVOptionVideo qmax 34
ACL allow 192.168.0.0 192.168.255.255
PreRoll 0
</Stream>
처럼 /etc/ffserver.conf에 ffserver.conf 파일을 만드는 작업과이는 FFmpeg과 스위트를위한 작업처럼
보이는 ffserver 실행합니다. – Anthony