我正在尝试对视频文件进行分段,以在浏览器中播放它。理想情况下,我想读取stdout并将其通过管道传输到浏览器,但是如果启用分段,它将不起作用:
$ ffmpeg -i test.mp4 -f segment -segment_format mp4 -segment_format_options movflags=+faststart+frag_keyframe+empty_moov+default_base_moof pipe:1
...
Output #0, segment, to 'pipe:1':
Output file #0 does not contain any stream
1)可以将分段文件写入stdout吗?文件分隔是否有特殊字符?
2)否则,如何仅通过读取字节流来检测新的关键帧?