v4l2-ctl --list-devices
mmal service 16.1 (platform:bcm2835-v4l2):
/dev/video0
HD Pro Webcam C920 (usb-3f980000.usb-1.2):
/dev/video1
v4l2-ctl --list-formats-ext
...
Index : 4
Type : Video Capture
Pixel Format: 'H264' (compressed)
Name : H264
Size: Stepwise 16x16 - 2592x1944 with step 2/2
...
v4l2-ctl --help-stream
v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat="H264" -d /dev/video1
v4l2-ctl -d /dev/video1 --stream-mmap=4 --stream-to=- |nc -l -k -v 2222
ffmpeg -r 30 -use_wallclock_as_timestamps 1 -copytb 0 -f v4l2 -video_size 1920x1080 -vcodec h264 -i /dev/video1 -vcodec copy -f flv - |nc -l -k -v 2222
mplayer -fps 200 ffmpeg://tcp://raspberrypi.local:2222
arecord -D plughw:0,0 -f cd |nc -l -k -v 2222
nc raspberrypi.local 2222 | play -
pi3+c920 live A/V stream to fb
# size=1280x720
# first input: video(v4l2)
# second input: audio(alsa)
v4l2-ctl --set-fmt-video=width=1280,height=720,pixelformat="H264" -d /dev/video1
v4l2-ctl -d /dev/video1 --stream-mmap=4 --stream-to=- | ffmpeg -f h264 -vcodec h264 -i pipe:0 -f alsa -ac 2 -i hw:0,0 -force_key_frames 00:00:00.000 -r 30 -acodec aac -b:a 128k -vcodec copy -f flv "rtmp:/rtmp-api.facebook.com:80/rtmp/"