Mp4ize (python)是用于将视频文件转换为 mp4 以在 iPhone 和 iPod 上使用的实用程序。我试图让它在 Windows 上运行。
python 脚本依赖于库fcntl,并且根据另一个问题(Windows 上的 fcntl 替代品),Windows 等价物是 win32api。另一个问题也说:
如果您提供有关 fcntl 调用的更多详细信息,人们可以找到 Windows 等效项。
而且由于我自己尝试重写代码没有运气,所以我想我会在这里问。
如何重写以下代码以在 Windows 上使用?
fcntl.fcntl( p.stderr.fileno(), fcntl.F_SETFL, fcntl.fcntl(p.stderr.fileno(), fcntl.F_GETFL) | os.O_NONBLOCK, )
有关完整的源代码,请参见此处。