v4l2loopback

https://github.com/umlaeute/v4l2loopback/

 ffmpeg

ffmpeg -re -i testsrc.avi -f v4l2 /dev/video1
ffmpeg -loop 1 -re -i foo.jpg -f v4l2 -vcodec rawvideo -pix_fmt yuv420p /dev/video1

或者
gst-launch-1.0 -v filesrc location=~/Downloads/big_buck_bunny_720p_stereo.avi ! avidemux ! decodebin ! videoconvert ! "video/x-raw,format=YUY2" ! v4l2sink device=/dev/video1

gst-launch-1.0 -v multifilesrc location=test/%05d.png loop=1 caps="image/png,framerate=30/1" ! pngdec ! videoconvert ! "video/x-raw,format=YUY2" ! v4l2sink device=/dev/video1

emulator能否列出

emulator -webcam-list