我正在尝试使用Apache Kafka
和FFmpeg
转换视频。我已经在系统上运行了程序,但是在服务器上运行时失败。我运行代码时遇到此错误:
Traceback (most recent call last):
File "/home/fu/kafka/kafkaVideo/ffmpeg-python-master/ffmpeg/send.py", line 30, in <module>
subprocess.call([sys.executable, start])
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1235, in _execute_child
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
frame send
frame send
frame send
frame send
...
raceback (most recent call last):
File "/home/fu/kafka/kafkaVideo/ffmpeg-python-master/ffmpeg/send.py", line 30, in <module>
subprocess.call([sys.executable, start])
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1235, in _execute_child
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
frame send
frame send
...
Traceback (most recent call last):
File "send.py", line 107, in <module>
publish_video(video_path)
File "send.py", line 48, in publish_video
subprocess.call([sys.executable, start])
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 1392, in wait
pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
return func(*args)``
OSError: [Errno 2] No such or directory
但是错误的第三部分在不同的调试中是不同的