Created
July 8, 2022 01:07
-
-
Save makvoid/5a84cfe27ce4f7b16d26edcca1ebbbaf to your computer and use it in GitHub Desktop.
libcamera-vid to FFMPEG example commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# h264 | |
$ libcamera-vid -t 0 --width 1920 --height 1080 --autofocus -o - | ffmpeg -i - -f alsa -ac 1 -itsoffset 5 -i hw:1,0 -vcodec copy -acodec aac -strict -2 out.flv | |
# MJPEG | |
$ libcamera-vid -t 0 --width 1920 --height 1080 --autofocus --codec mjpeg -o - | ffmpeg -i - -f alsa -ac 1 -itsoffset 5 -i hw:1,0 -vcodec copy -acodec aac -strict -2 out.mp4 | |
# YUV420 | |
$ libcamera-vid -t 0 --width 1920 --height 1080 --autofocus --codec yuv420 -o - | ffmpeg -f rawvideo -pix_fmt yuv420p -s:v 1920x1080 -r 30 -i - -f alsa -ac 1 -itsoffset 5 -i hw:1,0 -vcodec copy -acodec aac -strict -2 out.avi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment