How to catch stdout stream in ffmpeg then pipe it to v4l2loopback

本秂侑毒 提交于 2019-12-02 01:37:22

In your last command you are piping an MP4 to GStreamer. See the -f mp4 - part:

./capture -F -d /dev/video0 -o | ffmpeg -f h264 -i - -vcodec copy -f mp4 - | gst-launch-0.10 -v fdsrc ! v4l2sink device=/dev/video3

What you want to do is pipe the H.264 stream inside the MP4 instead.

Try replacing -f mp4 - with -f h264 -.

In fact you could probably skip entirely the creation of an MP4 and just do:

./capture -F -d /dev/video0 -o | gst-launch-0.10 -v fdsrc ! v4l2sink device=/dev/video3

since the -F option forces H.264.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!