Skip to content

Instantly share code, notes, and snippets.

@yellowcrescent
Created August 11, 2019 21:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yellowcrescent/76dccc24c641058cb70d0a73773a70bb to your computer and use it in GitHub Desktop.
Save yellowcrescent/76dccc24c641058cb70d0a73773a70bb to your computer and use it in GitHub Desktop.
magewell capture
#!/bin/bash
VDEV="/dev/video0"
ADEV="default:CARD=HDMI"
# input: cvbs (composite), yc (s-video), hdmi, component, auto
VINPUT=yc
AINPUT=line_in
# Set input to S-Video and AR to 4:3
mwcap-control --audio-input $AINPUT $VDEV
mwcap-control --video-input $VINPUT $VDEV
mwcap-control --video-input-aspect 4:3 $VDEV
#ffmpeg -re -f alsa -thread_queue_size 1024 -i $ADEV -ac 2 -ar 48000 -f video4linux2 -i $VDEV -c:v libx264 -preset:v ultrafast -crf 15 -c:a flac "$1"
# FFV1 + FLAC will produce a totally lossless capture
ffmpeg -f alsa -thread_queue_size 1024 -i $ADEV -f video4linux2 -i $VDEV -c:v ffv1 -c:a flac -ac 2 -ar 48000 "$1"
@Niedzwiedzw
Copy link

thanks, very useful :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment