Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- # run as:
- # capture.sh /dev/video0 hw:2,0 output.mkv
- # Be sure pulseaudio is dead if this isn't working.
- VIDEO_DEVICE="$1"
- AUDIO_DEVICE="$2"
- OUTPUT_FILE="$3"
- v4l2-ctl --device "$VIDEO_DEVICE" --set-fmt-video=width=640,height=480
- ffmpeg -f v4l2 -i "$VIDEO_DEVICE" -f alsa -i "$AUDIO_DEVICE" -vcodec libx264 -crf 22 -acodec libfdk_aac -ab 128k "$OUTPUT_FILE"
Advertisement
Add Comment
Please, Sign In to add comment