Last active
April 8, 2024 15:05
-
-
Save unbelauscht/3e1344ac01a3add5a81a793e3a4ba2c9 to your computer and use it in GitHub Desktop.
stream webcam in h264 with hardware encoding to rtmp server like owncast
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
ffmpeg -f lavfi -i anullsrc -f v4l2 -r 5 -video_size 1920x1080 -i "/dev/video0" -c:v h264_omx -preset ultrafast -b:v 1000k -c:a aac -f flv 'rtmp://x.x.x.x/live/streamkey' | |
# rotate and crop | |
ffmpeg -f lavfi -i anullsrc -f v4l2 -r 1 -video_size 1920x1080 -i "/dev/video0" -vf "transpose=2,crop=1080:1080:960:540" -c:v h264_omx -preset ultrafast -b:v 1000k -c:a aac -f flv 'rtmp://x.x.x.x:xxxx/live/streamkey' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment